diff options
| author | David Lönnhager <david.l@mullvad.net> | 2020-02-04 11:42:00 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2020-02-04 14:52:42 +0100 |
| commit | 159a06c7251e6255b3645c17d5813a682abda440 (patch) | |
| tree | c6935dea8935989116ee7d3235b89f7099205a4a | |
| parent | 714623975b1470b47ccdc2f552ba4004c16e5be7 (diff) | |
| download | mullvadvpn-159a06c7251e6255b3645c17d5813a682abda440.tar.xz mullvadvpn-159a06c7251e6255b3645c17d5813a682abda440.zip | |
Update installer.nsh
| -rw-r--r-- | dist-assets/windows/installer.nsh | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/dist-assets/windows/installer.nsh b/dist-assets/windows/installer.nsh index 3d093f0e3d..751d88122a 100644 --- a/dist-assets/windows/installer.nsh +++ b/dist-assets/windows/installer.nsh @@ -60,27 +60,27 @@ !define BreakInstallation '!insertmacro "BreakInstallation"' # -# ExtractDriver +# ExtractTapDriver # # Extract the correct driver for the current platform -# placing it into $TEMP\driver +# placing it into $TEMP\tap-driver # -!macro ExtractDriver +!macro ExtractTapDriver - SetOutPath "$TEMP\driver" + SetOutPath "$TEMP\tap-driver" File "${BUILD_RESOURCES_DIR}\..\windows\driverlogic\bin\x64-Release\driverlogic.exe" - File "${BUILD_RESOURCES_DIR}\binaries\x86_64-pc-windows-msvc\driver\*" + File "${BUILD_RESOURCES_DIR}\binaries\x86_64-pc-windows-msvc\tap-driver\*" ${If} ${AtLeastWin10} - File "${BUILD_RESOURCES_DIR}\binaries\x86_64-pc-windows-msvc\driver\win10\*" + File "${BUILD_RESOURCES_DIR}\binaries\x86_64-pc-windows-msvc\tap-driver\win10\*" ${Else} - File "${BUILD_RESOURCES_DIR}\binaries\x86_64-pc-windows-msvc\driver\win8\*" + File "${BUILD_RESOURCES_DIR}\binaries\x86_64-pc-windows-msvc\tap-driver\win8\*" ${EndIf} !macroend -!define ExtractDriver '!insertmacro "ExtractDriver"' +!define ExtractTapDriver '!insertmacro "ExtractTapDriver"' # # ExtractWintun @@ -165,7 +165,7 @@ Push $0 Push $1 - nsExec::ExecToStack '"$TEMP\driver\driverlogic.exe" remove ${TAP_HARDWARE_ID}' + nsExec::ExecToStack '"$TEMP\tap-driver\driverlogic.exe" remove ${TAP_HARDWARE_ID}' Pop $0 Pop $1 @@ -188,7 +188,7 @@ log::Log "RemoveVanillaTap()" - nsExec::ExecToStack '"$TEMP\driver\driverlogic.exe" remove-vanilla-tap' + nsExec::ExecToStack '"$TEMP\tap-driver\driverlogic.exe" remove-vanilla-tap' Pop $0 Pop $1 @@ -203,13 +203,13 @@ ${If} $0 == ${DL_DELETE_NO_ADAPTERS_REMAIN} log::Log "Removing vanilla TAP adapter driver since it is no longer in use" - nsExec::ExecToStack '"$TEMP\driver\driverlogic.exe" remove ${DEPRECATED_TAP_HARDWARE_ID}' + nsExec::ExecToStack '"$TEMP\tap-driver\driverlogic.exe" remove ${DEPRECATED_TAP_HARDWARE_ID}' Pop $0 Pop $1 ${If} $0 != ${DL_GENERAL_SUCCESS} - StrCpy $R0 "Failed to remove driver: $1" + StrCpy $R0 "Failed to remove TAP driver: $1" log::Log $R0 Goto RemoveVanillaTap_return @@ -231,17 +231,17 @@ !define RemoveVanillaTap '!insertmacro "RemoveVanillaTap"' # -# InstallDriver +# InstallTapDriver # -# Install tunnel driver or update it if already present on the system +# Install OpenVPN TAP adapter driver # # Returns: 0 in $R0 on success, otherwise an error message in $R0 # -!macro InstallDriver +!macro InstallTapDriver - Var /GLOBAL InstallDriver_TapName + Var /GLOBAL InstallTapDriver_TapName - log::Log "InstallDriver()" + log::Log "InstallTapDriver()" Push $0 Push $1 @@ -257,7 +257,7 @@ ${IfNot} ${AtLeastWin10} log::Log "Adding OpenVPN certificate to the certificate store" - nsExec::ExecToStack '"$SYSDIR\certutil.exe" -f -addstore TrustedPublisher "$TEMP\driver\driver.cer"' + nsExec::ExecToStack '"$SYSDIR\certutil.exe" -f -addstore TrustedPublisher "$TEMP\tap-driver\driver.cer"' Pop $0 Pop $1 @@ -268,7 +268,7 @@ ${EndIf} log::Log "Creating new virtual adapter" - nsExec::ExecToStack '"$TEMP\driver\driverlogic.exe" install "$TEMP\driver\OemVista.inf"' + nsExec::ExecToStack '"$TEMP\tap-driver\driverlogic.exe" install "$TEMP\tap-driver\OemVista.inf"' Pop $0 Pop $1 @@ -276,11 +276,11 @@ ${If} $0 != ${DL_GENERAL_SUCCESS} StrCpy $R0 "Failed to create virtual adapter: error $0" log::LogWithDetails $R0 $1 - Goto InstallDriver_return + Goto InstallTapDriver_return ${EndIf} log::Log "Identifying recently added adapter" - nsExec::ExecToStack '"$TEMP\driver\driverlogic.exe" find-tap' + nsExec::ExecToStack '"$TEMP\tap-driver\driverlogic.exe" find-tap' Pop $0 Pop $1 @@ -288,10 +288,10 @@ ${If} $0 != ${DL_GENERAL_SUCCESS} StrCpy $R0 "Failed to identify new adapter: $1" log::Log $R0 - Goto InstallDriver_return + Goto InstallTapDriver_return ${EndIf} - StrCpy $InstallDriver_TapName $1 + StrCpy $InstallTapDriver_TapName $1 log::Log "New virtual adapter is named $\"$1$\"" log::Log "Renaming adapter to $\"Mullvad$\"" @@ -305,26 +305,26 @@ StrCpy $R0 "Failed to rename virtual adapter: error $0" log::LogWithDetails $R0 $1 - ${ForceRenameAdapter} $InstallDriver_TapName "Mullvad" + ${ForceRenameAdapter} $InstallTapDriver_TapName "Mullvad" ${If} $R0 != 0 - Goto InstallDriver_return + Goto InstallTapDriver_return ${EndIf} ${EndIf} - log::Log "InstallDriver() completed successfully" + log::Log "InstallTapDriver() completed successfully" Push 0 Pop $R0 - InstallDriver_return: + InstallTapDriver_return: Pop $1 Pop $0 !macroend -!define InstallDriver '!insertmacro "InstallDriver"' +!define InstallTapDriver '!insertmacro "InstallTapDriver"' # # RemoveWintun @@ -755,8 +755,8 @@ ${RemoveRelayCache} - ${ExtractDriver} - ${InstallDriver} + ${ExtractTapDriver} + ${InstallTapDriver} ${If} $R0 != 0 MessageBox MB_OK "Fatal error during driver installation: $R0" @@ -838,7 +838,7 @@ ${RemoveCLIFromEnvironPath} # Remove the TAP adapter - ${ExtractDriver} + ${ExtractTapDriver} ${RemoveBrandedTap} # If not ran silently |
