mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-18 22:16:18 -05:00
feat: build and smoke test native Windows ARM64 packages
This commit is contained in:
10 files changed
+139
-22
No files matched your search
@@ -12,6 +12,9 @@ RequestExecutionLevel admin
|
||||
!ifndef PRODUCT_VERSION
|
||||
!error "PRODUCT_VERSION is required"
|
||||
!endif
|
||||
!ifndef TARGET_ARCH
|
||||
!define TARGET_ARCH "x64"
|
||||
!endif
|
||||
!ifndef BUILD_VERSION
|
||||
!define BUILD_VERSION "${PRODUCT_VERSION}.0"
|
||||
!endif
|
||||
@@ -43,10 +46,21 @@ ShowUninstDetails show
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
Function .onInit
|
||||
${IfNot} ${RunningX64}
|
||||
MessageBox MB_OK|MB_ICONSTOP "GP Connect requires 64-bit Windows."
|
||||
!if "${TARGET_ARCH}" == "arm64"
|
||||
${IfNot} ${IsNativeARM64}
|
||||
MessageBox MB_OK|MB_ICONSTOP "This GP Connect installer requires Windows 11 on ARM64." /SD IDOK
|
||||
SetErrorLevel 1
|
||||
Abort
|
||||
${EndIf}
|
||||
!else if "${TARGET_ARCH}" == "x64"
|
||||
${IfNot} ${IsNativeAMD64}
|
||||
MessageBox MB_OK|MB_ICONSTOP "This GP Connect installer requires x64 Windows." /SD IDOK
|
||||
SetErrorLevel 1
|
||||
Abort
|
||||
${EndIf}
|
||||
!else
|
||||
!error "Unsupported TARGET_ARCH"
|
||||
!endif
|
||||
SetRegView 64
|
||||
FunctionEnd
|
||||
|
||||
|
||||
@@ -232,11 +232,15 @@ try {
|
||||
throw 'Use the Windows installer to update this installation.'
|
||||
}
|
||||
if (!$Version) { $Version = $info.version }
|
||||
if ($info.product -ne 'GP Connect' -or $info.architecture -ne 'x64' -or !$Version -or $info.version -ne $Version) {
|
||||
$architecture = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant()
|
||||
if ($info.product -ne 'GP Connect' -or $info.architecture -notin @('x64','arm64') -or $info.architecture -ne $architecture -or !$Version -or $info.version -ne $Version) {
|
||||
throw 'The package version or architecture does not match this installer.'
|
||||
}
|
||||
if (![Environment]::Is64BitProcess -or [Environment]::OSVersion.Version.Build -lt 19041) {
|
||||
throw 'GP Connect requires Windows 10 build 19041 or newer, x64.'
|
||||
throw 'GP Connect requires Windows 10 build 19041 or newer.'
|
||||
}
|
||||
if ($architecture -eq 'arm64' -and [Environment]::OSVersion.Version.Build -lt 22000) {
|
||||
throw 'GP Connect for ARM64 requires Windows 11.'
|
||||
}
|
||||
$payload = @(Get-ChildItem -LiteralPath $source -Force | Where-Object {
|
||||
($_.PSIsContainer -and $_.Name -eq 'licenses') -or
|
||||
|
||||
Reference in new issue
Block a user