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

Update NSIS installer to modern UI

parent 7d4452f0
!include "MUI2.nsh"
Name "QGroundcontrol"
Var StartMenuFolder
InstallDir $PROGRAMFILES\qgroundcontrol
Page license
Page directory
Page components
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "installheader.bmp";
!insertmacro MUI_PAGE_LICENSE "license.txt"
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
LicenseData license.txt
!insertmacro MUI_LANGUAGE "English"
Section
SetOutPath $INSTDIR
......@@ -50,10 +57,10 @@ done:
SectionEnd
Section "Uninstall"
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
SetShellVarContext all
Delete $INSTDIR\QGroundControl_uninstall.exe
RMDir /r /REBOOTOK $INSTDIR
RMDir /r /REBOOTOK "$SMPROGRAMS\QGroundControl\"
RMDir /r /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\"
SetShellVarContext current
RMDir /r /REBOOTOK "$APPDATA\QGROUNDCONTROL.ORG\"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QGroundControl"
......@@ -61,8 +68,8 @@ SectionEnd
Section "create Start Menu Shortcuts"
SetShellVarContext all
CreateDirectory "$SMPROGRAMS\QGroundControl"
CreateShortCut "$SMPROGRAMS\QGroundControl\QGroundControl.lnk" "$INSTDIR\qgroundcontrol.exe" "" "$INSTDIR\qgroundcontrol.exe" 0
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\QGroundControl.lnk" "$INSTDIR\qgroundcontrol.exe" "" "$INSTDIR\qgroundcontrol.exe" 0
SectionEnd
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