diff options
| author | Odd Stranne <odd@mullvad.net> | 2018-11-06 21:57:16 +0100 |
|---|---|---|
| committer | Odd Stranne <odd@mullvad.net> | 2018-11-09 13:03:05 +0100 |
| commit | 652a11d3c508ad296d60c37ac0b84fa11451c81d (patch) | |
| tree | 79f181c60ba2bfef1778422ebb71a5e2adf1b6ca | |
| parent | d163a7572717ac1bca2aa5ddc6fa0f34af1d3a39 (diff) | |
| download | mullvadvpn-652a11d3c508ad296d60c37ac0b84fa11451c81d.tar.xz mullvadvpn-652a11d3c508ad296d60c37ac0b84fa11451c81d.zip | |
Update NSIS script with proper init/deinit of 'driverlogic' plugin
| -rw-r--r-- | dist-assets/windows/installer.nsh | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/dist-assets/windows/installer.nsh b/dist-assets/windows/installer.nsh index 1de27c2b14..2eff75e688 100644 --- a/dist-assets/windows/installer.nsh +++ b/dist-assets/windows/installer.nsh @@ -29,6 +29,10 @@ !define INI_GENERAL_ERROR 0 !define INI_SUCCESS 1 +#Return codes from driverlogic::Initialize/Deinitialize +!define DRIVERLOGIC_GENERAL_ERROR 0 +!define DRIVERLOGIC_SUCCESS 1 + # # BreakInstallation # @@ -83,6 +87,17 @@ Push $0 Push $1 + driverlogic::Initialize + + Pop $0 + Pop $1 + + ${If} $0 != ${DRIVERLOGIC_SUCCESS} + StrCpy $R0 "Failed to initialize plugin 'driverlogic': $1" + log::Log $R0 + Goto InstallDriver_return_only + ${EndIf} + log::Log "Listing virtual adapters" nsExec::ExecToStack '"$TEMP\driver\tapinstall.exe" hwids ${TAP_HARDWARE_ID}' @@ -96,7 +111,7 @@ ${EndIf} log::LogWithDetails "Virtual adapters listing" $1 - + log::Log "Calling on plugin to parse adapter data" driverlogic::EstablishBaseline $1 @@ -202,6 +217,18 @@ InstallDriver_return: + driverlogic::Deinitialize + + Pop $0 + Pop $1 + + ${If} $0 != ${DRIVERLOGIC_SUCCESS} + # Do not update $R0 + log::Log "Failed to deinitialize plugin 'driverlogic': $1" + ${EndIf} + + InstallDriver_return_only: + Pop $1 Pop $0 |
