Skip to content
qgroundcontrol_installer.nsi 1.19 KiB
Newer Older
Name "QGroundcontrol"

InstallDir $PROGRAMFILES\qgroundcontrol

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

LicenseData license.txt
Section
  SetOutPath $INSTDIR
  File /r release\*.*
Don Gagne's avatar
Don Gagne committed
  File deploy\px4driver.msi
pixhawk's avatar
pixhawk committed
  WriteUninstaller $INSTDIR\QGroundControl_uninstall.exe
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QGroundControl" "DisplayName" "QGroundControl"
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QGroundControl" "UninstallString" "$\"$INSTDIR\QGroundControl_uninstall.exe$\""
Don Gagne's avatar
Don Gagne committed
  ExecWait '"msiexec" /i "px4driver.msi"'
SectionEnd 

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

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