qgroundcontrol_installer.nsi 1.12 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
Name "QGroundcontrol"

InstallDir $PROGRAMFILES\qgroundcontrol

Page license 
Page directory
Page components
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles

12
LicenseData license.txt
13

14
Section
15
  SetOutPath $INSTDIR
16
  File /r release\*.*
pixhawk's avatar
pixhawk committed
17
  WriteUninstaller $INSTDIR\QGroundControl_uninstall.exe
18 19
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QGroundControl" "DisplayName" "QGroundControl"
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QGroundControl" "UninstallString" "$\"$INSTDIR\QGroundControl_uninstall.exe$\""
20 21 22
SectionEnd 

Section "Uninstall"
23
  SetShellVarContext all
pixhawk's avatar
pixhawk committed
24
  Delete $INSTDIR\QGroundControl_uninstall.exe
Don Gagne's avatar
Don Gagne committed
25 26
  RMDir /r /REBOOTOK $INSTDIR
  RMDir /r /REBOOTOK "$SMPROGRAMS\QGroundControl\"
27
  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QGroundControl"
28 29 30
SectionEnd

Section "create Start Menu Shortcuts"
31
  SetShellVarContext all
pixhawk's avatar
pixhawk committed
32 33
  CreateDirectory "$SMPROGRAMS\QGroundControl"
  CreateShortCut "$SMPROGRAMS\QGroundControl\QGroundControl.lnk" "$INSTDIR\qgroundcontrol.exe" "" "$INSTDIR\qgroundcontrol.exe" 0
34
SectionEnd