Commit 840f4484 authored by Nate Weibley's avatar Nate Weibley

Update NSIS installer to modern UI

parent 7d4452f0
!include "MUI2.nsh"
Name "QGroundcontrol" Name "QGroundcontrol"
Var StartMenuFolder
InstallDir $PROGRAMFILES\qgroundcontrol InstallDir $PROGRAMFILES\qgroundcontrol
Page license !define MUI_HEADERIMAGE
Page directory !define MUI_HEADERIMAGE_BITMAP "installheader.bmp";
Page components
Page instfiles !insertmacro MUI_PAGE_LICENSE "license.txt"
UninstPage uninstConfirm !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
UninstPage instfiles !insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
LicenseData license.txt !insertmacro MUI_LANGUAGE "English"
Section Section
SetOutPath $INSTDIR SetOutPath $INSTDIR
...@@ -50,10 +57,10 @@ done: ...@@ -50,10 +57,10 @@ done:
SectionEnd SectionEnd
Section "Uninstall" Section "Uninstall"
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
SetShellVarContext all SetShellVarContext all
Delete $INSTDIR\QGroundControl_uninstall.exe
RMDir /r /REBOOTOK $INSTDIR RMDir /r /REBOOTOK $INSTDIR
RMDir /r /REBOOTOK "$SMPROGRAMS\QGroundControl\" RMDir /r /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\"
SetShellVarContext current SetShellVarContext current
RMDir /r /REBOOTOK "$APPDATA\QGROUNDCONTROL.ORG\" RMDir /r /REBOOTOK "$APPDATA\QGROUNDCONTROL.ORG\"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QGroundControl" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QGroundControl"
...@@ -61,8 +68,8 @@ SectionEnd ...@@ -61,8 +68,8 @@ SectionEnd
Section "create Start Menu Shortcuts" Section "create Start Menu Shortcuts"
SetShellVarContext all SetShellVarContext all
CreateDirectory "$SMPROGRAMS\QGroundControl" CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\QGroundControl\QGroundControl.lnk" "$INSTDIR\qgroundcontrol.exe" "" "$INSTDIR\qgroundcontrol.exe" 0 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\QGroundControl.lnk" "$INSTDIR\qgroundcontrol.exe" "" "$INSTDIR\qgroundcontrol.exe" 0
SectionEnd SectionEnd
Function .onInit Function .onInit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment