Skip to content

Commit

Permalink
Update NSIS installer to modern UI
Browse files Browse the repository at this point in the history
  • Loading branch information
NaterGator committed Feb 5, 2016
1 parent 7d4452f commit 840f448
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions deploy/qgroundcontrol_installer.nsi
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
!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
Expand Down Expand Up @@ -50,19 +57,19 @@ 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"
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
Expand Down
Binary file added installheader.bmp
Binary file not shown.

0 comments on commit 840f448

Please sign in to comment.