summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2020-10-27 16:44:59 +0100
committerDavid Lönnhager <david.l@mullvad.net>2020-10-27 16:44:59 +0100
commit116ae8d935a3a46492cce3258427d6bcbaab4796 (patch)
tree2027bc10af3f6e12b9445e5913f8475e5644048a
parent1b9e83c9a4c62e8c7071944e7f12f52743d35803 (diff)
parentb2d4ddf56a45aeb27780bed315256b957c0f4fc2 (diff)
downloadmullvadvpn-116ae8d935a3a46492cce3258427d6bcbaab4796.tar.xz
mullvadvpn-116ae8d935a3a46492cce3258427d6bcbaab4796.zip
Merge branch 'cleanup-installer'
-rw-r--r--dist-assets/windows/installer.nsh27
1 files changed, 18 insertions, 9 deletions
diff --git a/dist-assets/windows/installer.nsh b/dist-assets/windows/installer.nsh
index 9294db690d..a8925cd039 100644
--- a/dist-assets/windows/installer.nsh
+++ b/dist-assets/windows/installer.nsh
@@ -82,6 +82,21 @@
!define ExtractWintun '!insertmacro "ExtractWintun"'
#
+# ExtractMullvadSetup
+#
+# Extract mullvad-setup into $TEMP
+#
+!macro ExtractMullvadSetup
+
+ SetOutPath "$TEMP"
+ File "${BUILD_RESOURCES_DIR}\mullvad-setup.exe"
+ File "${BUILD_RESOURCES_DIR}\..\windows\winfw\bin\x64-Release\winfw.dll"
+
+!macroend
+
+!define ExtractMullvadSetup '!insertmacro "ExtractMullvadSetup"'
+
+#
# RemoveBrandedTap
#
# Try to remove the Mullvad TAP adapter driver
@@ -572,9 +587,6 @@
Push $0
Push $1
- SetOutPath "$TEMP"
- File "${BUILD_RESOURCES_DIR}\mullvad-setup.exe"
- File "${BUILD_RESOURCES_DIR}\..\windows\winfw\bin\x64-Release\winfw.dll"
nsExec::ExecToStack '"$TEMP\mullvad-setup.exe" reset-firewall'
Pop $0
Pop $1
@@ -598,9 +610,6 @@
Push $0
Push $1
- SetOutPath "$TEMP"
- File "${BUILD_RESOURCES_DIR}\mullvad-setup.exe"
- File "${BUILD_RESOURCES_DIR}\..\windows\winfw\bin\x64-Release\winfw.dll"
nsExec::ExecToStack '"$TEMP\mullvad-setup.exe" clear-history'
Pop $0
Pop $1
@@ -744,6 +753,7 @@
${If} $BlockFilterResult == 0
${OrIf} $PersistentBlockFilterResult == 0
MessageBox MB_ICONEXCLAMATION|MB_YESNO "Do you wish to unblock your internet access? Doing so will leave you with an unsecure connection." IDNO customInstall_abortInstallation_skip_firewall_revert
+ ${ExtractMullvadSetup}
${ClearFirewallRules}
${EndIf}
@@ -790,11 +800,10 @@
log::Log "Running uninstaller for ${PRODUCT_NAME} ${VERSION}"
+ ${ExtractMullvadSetup}
+
${If} $FullUninstall != 1
# Save the target tunnel state if we're upgrading
- SetOutPath "$TEMP"
- File "${BUILD_RESOURCES_DIR}\mullvad-setup.exe"
- File "${BUILD_RESOURCES_DIR}\..\windows\winfw\bin\x64-Release\winfw.dll"
nsExec::ExecToStack '"$TEMP\mullvad-setup.exe" prepare-restart'
Pop $0
Pop $1