diff options
| author | David Lönnhager <david.l@mullvad.net> | 2021-08-13 17:06:57 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2021-09-28 12:41:47 +0200 |
| commit | ce84bcf44cd923f5d178c8a39eaec6eee8165e5f (patch) | |
| tree | 0fe0b776d5b4c3df0eece0ba010df450eb52c29c /dist-assets | |
| parent | 77eddaf311f1c77132b500dbc35d4f3af41c2069 (diff) | |
| download | mullvadvpn-ce84bcf44cd923f5d178c8a39eaec6eee8165e5f.tar.xz mullvadvpn-ce84bcf44cd923f5d178c8a39eaec6eee8165e5f.zip | |
Update installer for wgnt
Diffstat (limited to 'dist-assets')
| -rw-r--r-- | dist-assets/windows/installer.nsh | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/dist-assets/windows/installer.nsh b/dist-assets/windows/installer.nsh index 5f0151f009..c1dac59bf8 100644 --- a/dist-assets/windows/installer.nsh +++ b/dist-assets/windows/installer.nsh @@ -13,6 +13,7 @@ # !define WINTUN_POOL "Mullvad" +!define WG_NT_POOL "Mullvad" # "sc" exit code !define SERVICE_STARTED 0 @@ -59,19 +60,20 @@ !define PERSISTENT_BLOCK_OUTBOUND_IPV4_FILTER_GUID "{79860c64-9a5e-48a3-b5f3-d64b41659aa5}" # -# ExtractWintun +# ExtractWireGuard # -# Extract Wintun installer into $TEMP +# Extract Wintun and WireGuardNT installer into $TEMP # -!macro ExtractWintun +!macro ExtractWireGuard SetOutPath "$TEMP" File "${BUILD_RESOURCES_DIR}\binaries\x86_64-pc-windows-msvc\wintun\wintun.dll" + File "${BUILD_RESOURCES_DIR}\binaries\x86_64-pc-windows-msvc\wireguard-nt\wireguard.dll" File "${BUILD_RESOURCES_DIR}\..\windows\driverlogic\bin\x64-Release\driverlogic.exe" !macroend -!define ExtractWintun '!insertmacro "ExtractWintun"' +!define ExtractWireGuard '!insertmacro "ExtractWireGuard"' # # ExtractMullvadSetup @@ -222,6 +224,41 @@ !define RemoveWintun '!insertmacro "RemoveWintun"' # +# RemoveWireGuardNt +# +# Try to remove WireGuardNT +# +!macro RemoveWireGuardNt + Push $0 + Push $1 + + log::Log "RemoveWireGuardNt()" + + nsExec::ExecToStack '"$TEMP\driverlogic.exe" wg-nt-cleanup ${WG_NT_POOL}' + Pop $0 + Pop $1 + + ${If} $0 != ${DL_GENERAL_SUCCESS} + IntFmt $0 "0x%X" $0 + StrCpy $R0 "Failed to remove WireGuardNT pool: error $0" + log::LogWithDetails $R0 $1 + Goto RemoveWireGuardNt_return_only + ${EndIf} + + log::Log "RemoveWireGuardNt() completed successfully" + + Push 0 + Pop $R0 + + RemoveWireGuardNt_return_only: + + Pop $1 + Pop $0 + +!macroend + +!define RemoveWireGuardNt '!insertmacro "RemoveWireGuardNt"' +# # RemoveAbandonedWintunAdapter # # Removes old Wintun interface, even if it belongs to a different pool. @@ -1244,8 +1281,9 @@ ${ClearFirewallRules} ${RemoveWireGuardKey} - ${ExtractWintun} + ${ExtractWireGuard} ${RemoveWintun} + ${RemoveWireGuardNt} ${ExtractSplitTunnelDriver} ${RemoveSplitTunnelDriver} |
