diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-01-07 15:20:33 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-01-07 15:20:33 +0800 |
| commit | 519e646fd6e22db3248a2d59cb7b1d0339b622ee (patch) | |
| tree | 257f621adb820c40ee231a295c3b8c5352352b1b /setup/windows | |
| parent | d226aad32d30a66ca027af27bacdcfec9dbfbbf4 (diff) | |
Add OpenSSL dependency check to Windows installer
The installer now verifies OpenSSL is available and shows a popup
warning if not found. This ensures users are aware of the dependency for
key generation functionality.
Diffstat (limited to 'setup/windows')
| -rw-r--r-- | setup/windows/inst.ps1 | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/setup/windows/inst.ps1 b/setup/windows/inst.ps1 index 2e15dc3..4cb4772 100644 --- a/setup/windows/inst.ps1 +++ b/setup/windows/inst.ps1 @@ -1,8 +1,19 @@ +# Execute uninstall script, attempt to remove leftover PROFILE entries . ".\uninst.ps1" +# Calculate directories $scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path - $parentDir = Split-Path -Parent $scriptDir -Add-Content -Path $PROFILE -Value "`n# JustEnoughVCS - Begin #" + +# Write configuration to PROFILE +Add-Content -Path $PROFILE -Value "# JustEnoughVCS - Begin #" Add-Content -Path $PROFILE -Value ". `"$parentDir\jv_cli.ps1`"" Add-Content -Path $PROFILE -Value "# JustEnoughVCS - End #" + +# Check dependencies, if OpenSSL is not found, show a prompt +try { + $null = Get-Command openssl -ErrorAction Stop +} catch { + $wshell = New-Object -ComObject Wscript.Shell + $wshell.Popup("OpenSSL was not found on your computer. JustEnoughVCS key generation depends on OpenSSL.", 0, "JustEnoughVCS Installation", 0x0 + 0x30) +} |
