fix(windows): restore browser auth focus and configure tunnel branding

This commit is contained in:
Kevin Yue committed 2026-11-18 13:56:13 +08:00
1 parent 8bb061d53f
commit ab3908b809
8 files changed
+72 -5

No files matched your search

+3 -2
View File
@@ -5,7 +5,8 @@ param(
[string]$MsysRoot = 'C:\msys64',
[ValidateSet('mingw64','ucrt64','clangarm64')][string]$MsysSubsystem = 'mingw64',
[string]$Prefix,
[int]$Jobs = 4
[int]$Jobs = 4,
[ValidateNotNullOrEmpty()][string]$TunnelType = 'GP Connect'
)
$ErrorActionPreference = 'Stop'
$repo = Split-Path $PSScriptRoot -Parent
@@ -14,7 +15,7 @@ $Prefix = [System.IO.Path]::GetFullPath($Prefix)
$bash = Join-Path $MsysRoot 'usr\bin\bash.exe'
if (!(Test-Path $bash)) { throw 'MSYS2 is required to build OpenConnect.' }
$ErrorActionPreference = 'Continue'
& $bash "$PSScriptRoot/build-openconnect-windows.sh" $repo $Prefix $Jobs $MsysSubsystem
& $bash "$PSScriptRoot/build-openconnect-windows.sh" $repo $Prefix $Jobs $MsysSubsystem $TunnelType
$nativeExit = $LASTEXITCODE
$ErrorActionPreference = 'Stop'
if ($nativeExit -ne 0) { throw 'OpenConnect compilation failed.' }
+2 -1
View File
@@ -6,6 +6,7 @@ export PATH="/$subsystem/bin:/usr/bin:$PATH"
repo=$(cygpath -u "$1")
prefix=$(cygpath -u "$2")
jobs=$3
tunnel_type=$5
export ACLOCAL_PATH="/$subsystem/share/aclocal"
source_dir="$repo/crates/openconnect/deps/openconnect"
build_dir="$repo/target/openconnect-windows"
@@ -22,7 +23,7 @@ fi
--enable-shared --disable-static --disable-nls --disable-docs --disable-dsa-tests \
--without-libproxy --without-stoken --without-libpcsclite --without-libpskc \
--without-gssapi --with-gnutls --without-openssl --with-gnutls-tss2=no \
--with-vpnc-script=unused
--with-vpnc-script=unused --with-wintun-tunnel-type="$tunnel_type"
grep -q '^#define OPENCONNECT_GNUTLS 1$' config.h
make -j"$jobs" libopenconnect.la
make install-libLTLIBRARIES