diff options
author | kali <kali@win> | 2018-06-26 23:15:27 +0200 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2018-06-27 19:31:48 +0200 |
commit | 05bc3260b9c958a72096e7a28956f4666bd65603 (patch) | |
tree | 0f0dc160a353420a0469f7f96504ce9eae3832a5 /win/RiseupVPN-installer.nsi | |
parent | 3668e25f418bcf64535dfad082b5d0310b9a30cb (diff) |
[pkg] fix service run on install
Diffstat (limited to 'win/RiseupVPN-installer.nsi')
-rwxr-xr-x | win/RiseupVPN-installer.nsi | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/win/RiseupVPN-installer.nsi b/win/RiseupVPN-installer.nsi index 35a72b0..3561c57 100755 --- a/win/RiseupVPN-installer.nsi +++ b/win/RiseupVPN-installer.nsi @@ -3,7 +3,7 @@ Name "RiseupVPN" RequestExecutionLevel admin -Outfile RiseupVPN-installer.exe +Outfile "..\dist\RiseupVPN-installer.exe" ;TODO make the installdir configurable - and set it in the registry. InstallDir "C:\Program Files\RiseupVPN\" @@ -12,7 +12,6 @@ InstallDir "C:\Program Files\RiseupVPN\" !define MUI_PAGE_CUSTOMFUNCTION_PRE WelcomePageSetupLinkPre !define MUI_PAGE_CUSTOMFUNCTION_SHOW WelcomePageSetupLinkShow -; TODO fixme icons PATH !define MUI_ICON "..\assets\riseupvpn.ico" !define MUI_UNICON "..\assets\riseupvpn.ico" @@ -58,10 +57,15 @@ FunctionEnd Section "InstallFiles" SetOutPath $INSTDIR - WriteUninstaller $INSTDIR\uninstaller.exe + WriteUninstaller $INSTDIR\uninstall.exe + + ;Start Menu + createDirectory "$SMPROGRAMS\RiseupVPN\" + createShortCut "$SMPROGRAMS\RiseupVPN\RiseupVPN.lnk" "$INSTDIR\bitmask-systray.exe" "" "$INSTDIR\riseupvpn.ico" File "readme.txt" File "..\staging\nssm.exe" + File "..\assets\riseupvpn.ico" File ..\staging\bitmask_helper.exe
@@ -73,38 +77,41 @@ Section "InstallFiles" File ..\staging\liblzo2-2.dll
File ..\staging\libpkcs11-helper-1.dll
+ SectionEnd Section "InstallService" - ; TODO: make sure that this is not running before attempting - ; to install it. + ; Easy service management thanks to nssm + ExecWait '"$INSTDIR\nssm.exe" remove riseupvpn-helper confirm' ExecWait '"$INSTDIR\nssm.exe" install riseupvpn-helper "$INSTDIR\bitmask_helper.exe"' ExecWait '"$INSTDIR\nssm.exe" set riseupvpn-helper AppDirectory "$INSTDIR"' - ExecWait '"$INSTDIR"\nssm.exe start riseupvpn-helper' - ; Exec cmd.exe + ExecWait '"$INSTDIR\nssm.exe" start riseupvpn-helper' SectionEnd Section "Uninstall" ExecWait '"$INSTDIR"\nssm.exe stop riseupvpn-helper' - ExecWait '"$INSTDIR"\nssm.exe remove riseupvpn-helper' + ExecWait '"$INSTDIR"\nssm.exe remove riseupvpn-helper confirm' - Delete $INSTDIR\uninstaller.exe Delete $INSTDIR\readme.txt Delete $INSTDIR\nssm.exe - Delete $INSTDIR\bitmask_helper.exe
- Delete $INSTDIR\bitmask-systray.exe
+ Delete $INSTDIR\riseupvpn.ico Delete $INSTDIR\openssl.exe
Delete $INSTDIR\openvpn.exe
Delete $INSTDIR\ssleay32.dll
Delete $INSTDIR\libeay32.dll
Delete $INSTDIR\liblzo2-2.dll
Delete $INSTDIR\libpkcs11-helper-1.dll
+ Delete $INSTDIR\bitmask_helper.exe + Delete $INSTDIR\bitmask-systray.exe + + ; uninstaller must be always the last thing to remove + Delete $INSTDIR\uninstall.exe SectionEnd - + ;---------------------------------------- ;Languages |