mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 14:36:15 -05:00
Release 3.6.0
This commit is contained in:
58 files changed
+2191
-642
No files matched your search
@@ -22,7 +22,7 @@ $info = Get-Content (Join-Path $destination 'build-info.json') -Raw | ConvertFro
|
||||
if ($info.architecture -ne $Architecture -or [string]$info.build_version -ne $Build) { throw 'The installed package identity does not match.' }
|
||||
if ($env:WINDOWS_SIGNING_PUBLISHER) {
|
||||
$signed = @($Installer)
|
||||
foreach ($name in @('gpgui.exe', 'gpauth.exe', 'gpservice.exe', 'gp-posture.exe', 'libopenconnect-5.dll', 'uninstall.exe')) {
|
||||
foreach ($name in @('gpgui.exe', 'gpauth.exe', 'gpservice.exe', 'gp-posture.exe', 'libopenconnect-5.dll', 'uninstall.exe', 'cli\gpclient.exe', 'cli\libopenconnect-5.dll')) {
|
||||
$signed += Join-Path $destination $name
|
||||
}
|
||||
& (Join-Path $PSScriptRoot 'test-windows-signature.ps1') -Files $signed -Publisher $env:WINDOWS_SIGNING_PUBLISHER
|
||||
@@ -41,6 +41,18 @@ foreach ($name in @('gpgui.exe', 'gpauth.exe')) {
|
||||
$process = Start-Process (Join-Path $destination $name) -ArgumentList '--version' -PassThru -Wait
|
||||
if ($process.ExitCode -ne 0) { throw "The installed $name cannot start." }
|
||||
}
|
||||
$cli = Join-Path $destination 'cli\gpclient.exe'
|
||||
Push-Location $env:TEMP
|
||||
try {
|
||||
$version = & $cli --version
|
||||
if ($LASTEXITCODE -ne 0 -or $version -notmatch "^gpclient $([regex]::Escape($info.version))\s") {
|
||||
throw 'The installed CLI failed its version check.'
|
||||
}
|
||||
$help = & $cli connect --help | Out-String
|
||||
if ($LASTEXITCODE -ne 0 -or $help -notmatch '--cookie-only' -or $help -match '--background') {
|
||||
throw 'The installed Windows CLI failed its connect help check.'
|
||||
}
|
||||
} finally { Pop-Location }
|
||||
$helper = Join-Path $destination 'gp-posture.exe'
|
||||
$output = Join-Path $env:TEMP 'gp-posture-install-test.json'
|
||||
$process = Start-Process $helper -PassThru -Wait -RedirectStandardOutput $output
|
||||
@@ -52,7 +64,8 @@ $state = Join-Path $env:LOCALAPPDATA 'GP Connect\config\protected-state'
|
||||
New-Item -ItemType Directory -Force $state | Out-Null
|
||||
$marker = Join-Path $state 'ci-install-retention'
|
||||
[IO.File]::WriteAllText($marker, 'retain user settings')
|
||||
$process = Start-Process (Join-Path $destination 'uninstall.exe') -ArgumentList '/S' -PassThru -Wait
|
||||
# Start-Process otherwise uses the executable's directory, which the uninstaller must move.
|
||||
$process = Start-Process (Join-Path $destination 'uninstall.exe') -WorkingDirectory (Split-Path $destination) -ArgumentList '/S' -PassThru -Wait
|
||||
if ($process.ExitCode -ne 0) { throw 'The uninstaller failed.' }
|
||||
if ((Get-Service GPConnect -ErrorAction SilentlyContinue) -or (Test-Path $destination) -or (Test-Path ($destination + '.previous'))) {
|
||||
throw 'The uninstaller left service registration or runtime files.'
|
||||
@@ -62,4 +75,4 @@ if ((Test-Path $shortcut) -or (Test-Path 'HKLM:\SOFTWARE\Microsoft\Windows\Curre
|
||||
}
|
||||
if ([IO.File]::ReadAllText($marker) -ne 'retain user settings') { throw 'The uninstaller changed user state.' }
|
||||
Remove-Item $marker
|
||||
Write-Host "Installed $Architecture runtime and service, launched both applications, and uninstalled successfully."
|
||||
Write-Host "Installed $Architecture runtime and service, launched the desktop, authenticator and CLI, and uninstalled successfully."
|
||||
Reference in new issue
Block a user