2014-11-21 17:51:36 +01:00
|
|
|
#
|
2016-01-22 09:07:47 +01:00
|
|
|
# Project: LibrePilot
|
|
|
|
# NSIS configuration file for LibrePilot GCS
|
2015-04-13 11:57:57 +02:00
|
|
|
# The OpenPilot Team, http://www.openpilot.org, Copyright (C) 2010-2015.
|
2016-01-22 09:07:47 +01:00
|
|
|
# The LibrePilot Team, http://www.librepilot.org, Copyright (C) 2015-2016.
|
2011-01-03 04:13:09 +01:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful, but
|
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
# for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License along
|
|
|
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
#
|
|
|
|
|
|
|
|
# This script requires Unicode NSIS 2.46 or higher:
|
|
|
|
# http://www.scratchpaper.com/
|
|
|
|
|
|
|
|
# TODO:
|
|
|
|
# - install only built/used modules, not a whole directory.
|
|
|
|
# - remove only installed files, not a whole directory.
|
|
|
|
|
2012-07-10 17:14:54 +02:00
|
|
|
;--------------------------------
|
|
|
|
; Includes
|
|
|
|
|
|
|
|
!include "x64.nsh"
|
|
|
|
|
2011-01-03 04:13:09 +01:00
|
|
|
;--------------------------------
|
2011-01-24 20:27:49 +01:00
|
|
|
; Paths
|
2011-05-08 17:21:58 +02:00
|
|
|
|
2011-01-24 20:27:49 +01:00
|
|
|
!define NSIS_DATA_TREE "."
|
2013-03-21 22:11:30 +01:00
|
|
|
!define AEROSIMRC_TREE "${GCS_BUILD_TREE}\misc\AeroSIM-RC"
|
2011-01-03 04:13:09 +01:00
|
|
|
|
2011-01-24 20:27:49 +01:00
|
|
|
; Default installation folder
|
2015-11-25 17:06:17 +01:00
|
|
|
!ifdef W64
|
|
|
|
InstallDir "$PROGRAMFILES64\${ORG_BIG_NAME}"
|
|
|
|
!else
|
|
|
|
InstallDir "$PROGRAMFILES32\${ORG_BIG_NAME}"
|
|
|
|
!endif
|
2011-05-08 17:21:58 +02:00
|
|
|
|
2011-01-24 20:27:49 +01:00
|
|
|
; Get installation folder from registry if available
|
2015-07-12 18:15:53 +02:00
|
|
|
InstallDirRegKey HKLM "Software\${ORG_BIG_NAME}" "Install Location"
|
2011-01-03 04:13:09 +01:00
|
|
|
|
|
|
|
;--------------------------------
|
2011-01-24 20:27:49 +01:00
|
|
|
; Version information
|
2011-01-03 04:13:09 +01:00
|
|
|
|
2015-08-22 22:04:48 +02:00
|
|
|
Name "${GCS_BIG_NAME}"
|
|
|
|
OutFile "${OUT_FILE}"
|
2011-01-09 15:13:48 +01:00
|
|
|
|
2015-08-22 22:04:48 +02:00
|
|
|
VIProductVersion ${VERSION_FOUR_NUM}
|
|
|
|
VIAddVersionKey "ProductName" "${GCS_BIG_NAME}"
|
|
|
|
VIAddVersionKey "ProductVersion" "${VERSION_FOUR_NUM}"
|
2015-07-09 02:28:09 +02:00
|
|
|
VIAddVersionKey "CompanyName" "The LibrePilot Team, http://www.librepilot.org"
|
2016-01-22 09:07:47 +01:00
|
|
|
VIAddVersionKey "LegalCopyright" "© 2015-2016 The LibrePilot Team"
|
2015-08-22 22:04:48 +02:00
|
|
|
VIAddVersionKey "FileDescription" "${GCS_BIG_NAME} Installer"
|
2011-01-03 04:13:09 +01:00
|
|
|
|
|
|
|
;--------------------------------
|
2011-01-24 20:27:49 +01:00
|
|
|
; Installer interface and base settings
|
2011-01-03 04:13:09 +01:00
|
|
|
|
2011-01-24 20:27:49 +01:00
|
|
|
!include "MUI2.nsh"
|
|
|
|
!define MUI_ABORTWARNING
|
2011-01-03 04:13:09 +01:00
|
|
|
|
|
|
|
; Adds an XP manifest to the installer
|
|
|
|
XPStyle on
|
|
|
|
|
|
|
|
; Request application privileges for Windows Vista/7
|
2012-07-10 17:14:54 +02:00
|
|
|
RequestExecutionLevel admin
|
2011-01-03 04:13:09 +01:00
|
|
|
|
|
|
|
; Compression level
|
|
|
|
SetCompressor /solid lzma
|
2011-05-08 17:21:58 +02:00
|
|
|
|
2011-01-03 04:13:09 +01:00
|
|
|
;--------------------------------
|
|
|
|
; Branding
|
|
|
|
|
2016-01-22 09:07:47 +01:00
|
|
|
BrandingText "© 2015-2016 The LibrePilot Team, http://www.librepilot.org"
|
2011-01-03 04:13:09 +01:00
|
|
|
|
2015-07-09 02:28:09 +02:00
|
|
|
!define MUI_ICON "${NSIS_DATA_TREE}\resources\installer_icon.ico"
|
2011-01-03 04:13:09 +01:00
|
|
|
!define MUI_HEADERIMAGE
|
2011-01-24 20:27:49 +01:00
|
|
|
!define MUI_HEADERIMAGE_BITMAP "${NSIS_DATA_TREE}\resources\header.bmp"
|
|
|
|
!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSIS_DATA_TREE}\resources\welcome.bmp"
|
|
|
|
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSIS_DATA_TREE}\resources\welcome.bmp"
|
2013-06-22 04:14:23 +02:00
|
|
|
|
|
|
|
!define HEADER_BGCOLOR "0x8C8C8C"
|
|
|
|
!define HEADER_FGCOLOR "0x343434"
|
|
|
|
|
|
|
|
!macro SetHeaderColors un
|
|
|
|
Function ${un}SetHeaderColors
|
|
|
|
GetDlgItem $r3 $HWNDPARENT 1034
|
|
|
|
SetCtlColors $r3 ${HEADER_BGCOLOR} ${HEADER_FGCOLOR}
|
|
|
|
GetDlgItem $r3 $HWNDPARENT 1037
|
|
|
|
SetCtlColors $r3 ${HEADER_BGCOLOR} ${HEADER_FGCOLOR}
|
|
|
|
GetDlgItem $r3 $HWNDPARENT 1038
|
|
|
|
SetCtlColors $r3 ${HEADER_BGCOLOR} ${HEADER_FGCOLOR}
|
|
|
|
FunctionEnd
|
|
|
|
!macroend
|
|
|
|
|
|
|
|
!insertmacro SetHeaderColors ""
|
|
|
|
!insertmacro SetHeaderColors "un."
|
2011-05-08 17:21:58 +02:00
|
|
|
|
2011-01-03 04:13:09 +01:00
|
|
|
;--------------------------------
|
2011-01-24 20:27:49 +01:00
|
|
|
; Language selection dialog settings
|
2011-01-03 04:13:09 +01:00
|
|
|
|
|
|
|
; Remember the installer language
|
|
|
|
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
|
2015-07-12 18:15:53 +02:00
|
|
|
!define MUI_LANGDLL_REGISTRY_KEY "Software\${ORG_BIG_NAME}"
|
2011-01-03 04:13:09 +01:00
|
|
|
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
|
2011-05-08 17:39:06 +02:00
|
|
|
!define MUI_LANGDLL_ALWAYSSHOW
|
2011-01-03 04:13:09 +01:00
|
|
|
|
2011-05-08 17:17:03 +02:00
|
|
|
;--------------------------------
|
|
|
|
; Settings for MUI_PAGE_FINISH
|
|
|
|
!define MUI_FINISHPAGE_RUN
|
2013-06-01 22:26:43 +02:00
|
|
|
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\WHATSNEW.txt"
|
2011-05-08 17:17:03 +02:00
|
|
|
!define MUI_FINISHPAGE_RUN_FUNCTION "RunApplication"
|
|
|
|
|
2011-01-03 04:13:09 +01:00
|
|
|
;--------------------------------
|
|
|
|
; Pages
|
|
|
|
|
2013-06-22 04:14:23 +02:00
|
|
|
!define MUI_PAGE_CUSTOMFUNCTION_PRE "SetHeaderColors"
|
|
|
|
|
2011-01-03 04:13:09 +01:00
|
|
|
!insertmacro MUI_PAGE_WELCOME
|
|
|
|
!insertmacro MUI_PAGE_LICENSE "$(LicenseFile)"
|
|
|
|
!insertmacro MUI_PAGE_COMPONENTS
|
|
|
|
!insertmacro MUI_PAGE_DIRECTORY
|
|
|
|
!insertmacro MUI_PAGE_INSTFILES
|
|
|
|
!insertmacro MUI_PAGE_FINISH
|
2011-05-08 17:21:58 +02:00
|
|
|
|
2013-06-22 04:14:23 +02:00
|
|
|
!define MUI_PAGE_CUSTOMFUNCTION_PRE "un.SetHeaderColors"
|
|
|
|
|
2011-01-03 04:13:09 +01:00
|
|
|
!insertmacro MUI_UNPAGE_WELCOME
|
|
|
|
!insertmacro MUI_UNPAGE_CONFIRM
|
|
|
|
!insertmacro MUI_UNPAGE_COMPONENTS
|
|
|
|
!insertmacro MUI_UNPAGE_INSTFILES
|
|
|
|
!insertmacro MUI_UNPAGE_FINISH
|
|
|
|
|
|
|
|
;--------------------------------
|
|
|
|
; Supported languages, license files and translations
|
|
|
|
|
2011-01-24 20:27:49 +01:00
|
|
|
!include "${NSIS_DATA_TREE}\translations\languages.nsh"
|
2011-05-08 17:21:58 +02:00
|
|
|
|
2011-01-03 04:13:09 +01:00
|
|
|
;--------------------------------
|
2011-01-24 20:27:49 +01:00
|
|
|
; Reserve files
|
2011-05-08 17:21:58 +02:00
|
|
|
|
2011-01-03 04:13:09 +01:00
|
|
|
; If you are using solid compression, files that are required before
|
|
|
|
; the actual installation should be stored first in the data block,
|
|
|
|
; because this will make your installer start faster.
|
2011-05-08 17:21:58 +02:00
|
|
|
|
2011-01-03 04:13:09 +01:00
|
|
|
!insertmacro MUI_RESERVEFILE_LANGDLL
|
|
|
|
|
|
|
|
;--------------------------------
|
2011-01-24 20:27:49 +01:00
|
|
|
; Installer sections
|
2011-01-03 04:13:09 +01:00
|
|
|
|
2012-07-10 17:14:54 +02:00
|
|
|
; Copy GCS core files
|
2011-01-03 04:13:09 +01:00
|
|
|
Section "Core files" InSecCore
|
|
|
|
SectionIn RO
|
|
|
|
SetOutPath "$INSTDIR\bin"
|
2011-01-24 20:27:49 +01:00
|
|
|
File /r "${GCS_BUILD_TREE}\bin\*"
|
2011-08-04 11:51:05 +02:00
|
|
|
SetOutPath "$INSTDIR"
|
2013-06-01 22:26:43 +02:00
|
|
|
File "${PROJECT_ROOT}\LICENSE.txt"
|
2015-07-31 18:32:15 +02:00
|
|
|
File "/oname=README.txt" "${PROJECT_ROOT}\README.md"
|
2013-06-01 22:26:43 +02:00
|
|
|
File "${PROJECT_ROOT}\WHATSNEW.txt"
|
|
|
|
File "${PROJECT_ROOT}\MILESTONES.txt"
|
2013-06-03 15:45:43 +02:00
|
|
|
File "${PROJECT_ROOT}\GPLv3.txt"
|
2011-01-03 04:13:09 +01:00
|
|
|
SectionEnd
|
|
|
|
|
2012-07-10 17:14:54 +02:00
|
|
|
; Copy GCS plugins
|
2012-07-20 21:37:36 +02:00
|
|
|
Section "-Plugins" InSecPlugins
|
2011-01-03 04:13:09 +01:00
|
|
|
SectionIn RO
|
2015-05-20 22:18:58 +02:00
|
|
|
SetOutPath "$INSTDIR\lib\${GCS_SMALL_NAME}\plugins"
|
|
|
|
File /r "${GCS_BUILD_TREE}\lib\${GCS_SMALL_NAME}\plugins\*.dll"
|
|
|
|
File /r "${GCS_BUILD_TREE}\lib\${GCS_SMALL_NAME}\plugins\*.pluginspec"
|
2011-01-03 04:13:09 +01:00
|
|
|
SectionEnd
|
|
|
|
|
2016-01-21 00:59:01 +01:00
|
|
|
; Copy GCS third party libs
|
|
|
|
Section "-Libs" InSecLibs
|
|
|
|
SectionIn RO
|
|
|
|
SetOutPath "$INSTDIR\lib\${GCS_SMALL_NAME}\osg"
|
|
|
|
File /r "${GCS_BUILD_TREE}\lib\${GCS_SMALL_NAME}\osg\*.dll"
|
|
|
|
SectionEnd
|
|
|
|
|
2012-07-10 17:14:54 +02:00
|
|
|
; Copy GCS resources
|
2012-07-20 21:37:36 +02:00
|
|
|
Section "-Resources" InSecResources
|
2015-07-17 00:26:47 +02:00
|
|
|
SetOutPath "$INSTDIR\share"
|
|
|
|
File /r "${GCS_BUILD_TREE}\share\${GCS_SMALL_NAME}"
|
2011-01-03 04:13:09 +01:00
|
|
|
SectionEnd
|
|
|
|
|
2012-07-10 17:14:54 +02:00
|
|
|
; Copy utility files
|
2012-07-09 10:51:45 +02:00
|
|
|
Section "-Utilities" InSecUtilities
|
|
|
|
SetOutPath "$INSTDIR\utilities"
|
|
|
|
File "/oname=OPLogConvert-${PACKAGE_LBL}.m" "${UAVO_SYNTH_TREE}\matlab\OPLogConvert.m"
|
|
|
|
SectionEnd
|
|
|
|
|
2012-07-10 17:14:54 +02:00
|
|
|
; Copy driver files
|
2012-07-09 10:51:45 +02:00
|
|
|
Section "-Drivers" InSecDrivers
|
|
|
|
SetOutPath "$INSTDIR\drivers"
|
2016-09-21 09:39:56 +02:00
|
|
|
File /r "${PROJECT_ROOT}\flight\Project\WindowsUSB\*"
|
2011-05-25 16:57:54 +02:00
|
|
|
SectionEnd
|
|
|
|
|
2012-07-10 17:14:54 +02:00
|
|
|
; Preinstall OpenPilot CDC driver
|
2016-09-21 22:54:33 +02:00
|
|
|
Section /o "CDC driver" InSecInstallDrivers
|
2012-07-10 17:14:54 +02:00
|
|
|
InitPluginsDir
|
|
|
|
SetOutPath "$PLUGINSDIR"
|
|
|
|
${If} ${RunningX64}
|
|
|
|
File "/oname=dpinst.exe" "${NSIS_DATA_TREE}\redist\dpinst_x64.exe"
|
|
|
|
${Else}
|
|
|
|
File "/oname=dpinst.exe" "${NSIS_DATA_TREE}\redist\dpinst_x86.exe"
|
|
|
|
${EndIf}
|
|
|
|
ExecWait '"$PLUGINSDIR\dpinst.exe" /lm /path "$INSTDIR\drivers"'
|
|
|
|
SectionEnd
|
|
|
|
|
2014-07-04 17:21:39 +02:00
|
|
|
; Copy Opengl32.dll if needed (disabled by default)
|
|
|
|
Section /o "Mesa OpenGL driver" InSecInstallOpenGL
|
|
|
|
SetOutPath "$INSTDIR\bin"
|
2015-11-25 11:25:38 +01:00
|
|
|
File /r "${GCS_BUILD_TREE}\bin\opengl32\opengl32.dll"
|
2014-07-04 17:21:39 +02:00
|
|
|
SectionEnd
|
2014-07-05 14:12:27 +02:00
|
|
|
|
2012-07-20 21:37:36 +02:00
|
|
|
; AeroSimRC plugin files
|
|
|
|
Section "AeroSimRC plugin" InSecAeroSimRC
|
|
|
|
SetOutPath "$INSTDIR\misc\AeroSIM-RC"
|
|
|
|
File /r "${AEROSIMRC_TREE}\*"
|
|
|
|
SectionEnd
|
|
|
|
|
2011-01-03 04:13:09 +01:00
|
|
|
Section "Shortcuts" InSecShortcuts
|
|
|
|
; Create desktop and start menu shortcuts
|
2011-01-09 15:13:48 +01:00
|
|
|
SetOutPath "$INSTDIR"
|
2015-07-12 18:15:53 +02:00
|
|
|
CreateDirectory "$SMPROGRAMS\${ORG_BIG_NAME}"
|
|
|
|
CreateShortCut "$SMPROGRAMS\${ORG_BIG_NAME}\${GCS_BIG_NAME}.lnk" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" \
|
2015-08-22 22:04:48 +02:00
|
|
|
"" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0
|
2015-07-12 18:15:53 +02:00
|
|
|
CreateShortCut "$SMPROGRAMS\${ORG_BIG_NAME}\${GCS_BIG_NAME} (clean configuration).lnk" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" \
|
2015-08-22 22:04:48 +02:00
|
|
|
"-reset" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0
|
2015-07-17 00:29:44 +02:00
|
|
|
CreateShortCut "$SMPROGRAMS\${ORG_BIG_NAME}\License.lnk" "$INSTDIR\LICENSE.txt" \
|
2015-05-20 22:18:58 +02:00
|
|
|
"" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0
|
2015-07-17 00:29:44 +02:00
|
|
|
CreateShortCut "$SMPROGRAMS\${ORG_BIG_NAME}\ReadMe.lnk" "$INSTDIR\README.txt" \
|
2015-05-20 22:18:58 +02:00
|
|
|
"" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0
|
2015-07-17 00:29:44 +02:00
|
|
|
CreateShortCut "$SMPROGRAMS\${ORG_BIG_NAME}\ReleaseNotes.lnk" "$INSTDIR\WHATSNEW.txt" \
|
2015-05-20 22:18:58 +02:00
|
|
|
"" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0
|
2015-07-17 00:29:44 +02:00
|
|
|
CreateShortCut "$SMPROGRAMS\${ORG_BIG_NAME}\Milestones.lnk" "$INSTDIR\MILESTONES.txt" \
|
2015-05-20 22:18:58 +02:00
|
|
|
"" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0
|
2015-07-17 00:29:44 +02:00
|
|
|
CreateShortCut "$SMPROGRAMS\${ORG_BIG_NAME}\Website.lnk" "http://www.librepilot.org" \
|
2015-05-20 22:18:58 +02:00
|
|
|
"" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0
|
2015-10-25 23:04:24 +01:00
|
|
|
CreateShortCut "$SMPROGRAMS\${ORG_BIG_NAME}\Wiki.lnk" "https://librepilot.atlassian.net/wiki/display/LPDOC/LibrePilot+Documentation" \
|
2015-05-20 22:18:58 +02:00
|
|
|
"" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0
|
2015-10-25 23:04:24 +01:00
|
|
|
CreateShortCut "$SMPROGRAMS\${ORG_BIG_NAME}\Forums.lnk" "http://forum.librepilot.org" \
|
2015-05-20 22:18:58 +02:00
|
|
|
"" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0
|
|
|
|
CreateShortCut "$DESKTOP\${GCS_BIG_NAME}.lnk" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" \
|
2015-08-22 22:04:48 +02:00
|
|
|
"" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0
|
2015-07-12 18:15:53 +02:00
|
|
|
CreateShortCut "$SMPROGRAMS\${ORG_BIG_NAME}\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
|
2011-01-03 04:13:09 +01:00
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
Section ; create uninstall info
|
|
|
|
; Write the installation path into the registry
|
2015-07-17 00:31:47 +02:00
|
|
|
WriteRegStr HKCU "Software\${ORG_BIG_NAME}" "Install Location" $INSTDIR
|
2011-05-08 17:21:58 +02:00
|
|
|
|
2013-05-25 18:13:43 +02:00
|
|
|
; Write the uninstall keys for Windows
|
2015-07-12 18:15:53 +02:00
|
|
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${ORG_BIG_NAME}" "DisplayName" "${GCS_BIG_NAME}"
|
|
|
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${ORG_BIG_NAME}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
|
|
|
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${ORG_BIG_NAME}" "DisplayIcon" '"$INSTDIR\bin\${GCS_SMALL_NAME}.exe"'
|
|
|
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${ORG_BIG_NAME}" "Publisher" "LibrePilot Team"
|
|
|
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${ORG_BIG_NAME}" "URLInfoAbout" "http://www.librepilot.org"
|
2015-10-25 23:04:24 +01:00
|
|
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${ORG_BIG_NAME}" "HelpLink" "https://librepilot.atlassian.net/wiki/display/LPDOC/LibrePilot+Documentation"
|
2015-07-12 18:15:53 +02:00
|
|
|
WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${ORG_BIG_NAME}" "EstimatedSize" 100600
|
|
|
|
WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${ORG_BIG_NAME}" "NoModify" 1
|
|
|
|
WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${ORG_BIG_NAME}" "NoRepair" 1
|
2011-01-03 04:13:09 +01:00
|
|
|
|
|
|
|
; Create uninstaller
|
|
|
|
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
;--------------------------------
|
|
|
|
; Installer section descriptions
|
|
|
|
|
|
|
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${InSecCore} $(DESC_InSecCore)
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${InSecPlugins} $(DESC_InSecPlugins)
|
2016-01-21 00:59:01 +01:00
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${InSecLibs} $(DESC_InSecLibs)
|
2011-01-03 04:13:09 +01:00
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${InSecResources} $(DESC_InSecResources)
|
2012-07-09 10:51:45 +02:00
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${InSecUtilities} $(DESC_InSecUtilities)
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${InSecDrivers} $(DESC_InSecDrivers)
|
2012-07-10 17:14:54 +02:00
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${InSecInstallDrivers} $(DESC_InSecInstallDrivers)
|
2014-07-04 17:21:39 +02:00
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${InSecInstallOpenGL} $(DESC_InSecInstallOpenGL)
|
2012-07-20 21:37:36 +02:00
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${InSecAeroSimRC} $(DESC_InSecAeroSimRC)
|
2011-01-03 04:13:09 +01:00
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${InSecShortcuts} $(DESC_InSecShortcuts)
|
|
|
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
2011-05-08 17:21:58 +02:00
|
|
|
|
2011-01-03 04:13:09 +01:00
|
|
|
;--------------------------------
|
2011-01-24 20:27:49 +01:00
|
|
|
; Installer functions
|
2011-01-03 04:13:09 +01:00
|
|
|
|
|
|
|
Function .onInit
|
|
|
|
|
2012-07-10 17:14:54 +02:00
|
|
|
SetShellVarContext all
|
2011-01-03 04:13:09 +01:00
|
|
|
!insertmacro MUI_LANGDLL_DISPLAY
|
|
|
|
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
;--------------------------------
|
2011-01-24 20:27:49 +01:00
|
|
|
; Uninstaller sections
|
2011-01-03 04:13:09 +01:00
|
|
|
|
2015-05-20 22:18:58 +02:00
|
|
|
Section "un.${GCS_BIG_NAME}" UnSecProgram
|
2011-01-03 04:13:09 +01:00
|
|
|
; Remove installed files and/or directories
|
|
|
|
RMDir /r /rebootok "$INSTDIR\bin"
|
|
|
|
RMDir /r /rebootok "$INSTDIR\lib"
|
|
|
|
RMDir /r /rebootok "$INSTDIR\share"
|
2011-05-25 16:57:54 +02:00
|
|
|
RMDir /r /rebootok "$INSTDIR\firmware"
|
2012-07-09 10:51:45 +02:00
|
|
|
RMDir /r /rebootok "$INSTDIR\utilities"
|
|
|
|
RMDir /r /rebootok "$INSTDIR\drivers"
|
2012-07-20 21:37:36 +02:00
|
|
|
RMDir /r /rebootok "$INSTDIR\misc"
|
2013-06-01 22:26:43 +02:00
|
|
|
Delete /rebootok "$INSTDIR\*.txt"
|
2011-01-03 04:13:09 +01:00
|
|
|
Delete /rebootok "$INSTDIR\Uninstall.exe"
|
|
|
|
|
|
|
|
; Remove directory
|
|
|
|
RMDir /rebootok "$INSTDIR"
|
|
|
|
|
|
|
|
; Remove registry keys
|
2015-07-12 18:15:53 +02:00
|
|
|
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${ORG_BIG_NAME}"
|
|
|
|
DeleteRegKey HKCU "Software\${ORG_BIG_NAME}"
|
2011-01-03 04:13:09 +01:00
|
|
|
|
|
|
|
; Remove shortcuts, if any
|
2012-10-15 21:51:30 +02:00
|
|
|
SetShellVarContext all
|
2015-05-20 22:18:58 +02:00
|
|
|
Delete /rebootok "$DESKTOP\${GCS_BIG_NAME}.lnk"
|
2015-07-12 18:15:53 +02:00
|
|
|
Delete /rebootok "$SMPROGRAMS\${ORG_BIG_NAME}\*"
|
|
|
|
RMDir /rebootok "$SMPROGRAMS\${ORG_BIG_NAME}"
|
2011-01-03 04:13:09 +01:00
|
|
|
SectionEnd
|
|
|
|
|
2011-01-28 19:18:08 +01:00
|
|
|
Section "un.Maps cache" UnSecCache
|
2016-01-22 09:07:47 +01:00
|
|
|
; Remove local app data (maps cache, ...)
|
2012-10-15 21:51:30 +02:00
|
|
|
SetShellVarContext current
|
2016-07-11 23:09:21 +02:00
|
|
|
; disable status updates as there is potentially a lot of cached files...
|
|
|
|
SetDetailsPrint none
|
2015-07-17 00:31:47 +02:00
|
|
|
RMDir /r /rebootok "$LOCALAPPDATA\${ORG_BIG_NAME}\${GCS_BIG_NAME}"
|
2016-07-11 23:09:21 +02:00
|
|
|
SetDetailsPrint both
|
2015-05-20 22:18:58 +02:00
|
|
|
; Only remove if no other versions have data here
|
2015-07-17 00:31:47 +02:00
|
|
|
RMDir /rebootok "$LOCALAPPDATA\${ORG_BIG_NAME}"
|
2011-01-03 04:13:09 +01:00
|
|
|
SectionEnd
|
|
|
|
|
2013-12-18 20:14:26 +01:00
|
|
|
Section "un.GCS Layout" UnSecConfig
|
|
|
|
; Remove GCS configuration files
|
2012-10-15 21:51:30 +02:00
|
|
|
SetShellVarContext current
|
2015-07-17 00:31:47 +02:00
|
|
|
Delete /rebootok "$APPDATA\${ORG_BIG_NAME}\${GCS_BIG_NAME}.db"
|
|
|
|
Delete /rebootok "$APPDATA\${ORG_BIG_NAME}\${GCS_BIG_NAME}.xml"
|
2011-01-03 04:13:09 +01:00
|
|
|
SectionEnd
|
|
|
|
|
2011-05-08 15:33:55 +02:00
|
|
|
Section "-un.Profile" UnSecProfile
|
2015-07-17 00:31:47 +02:00
|
|
|
; Remove ${ORG_BIG_NAME} user profile subdirectory if empty
|
2012-10-15 21:51:30 +02:00
|
|
|
SetShellVarContext current
|
2015-07-17 00:31:47 +02:00
|
|
|
RMDir /rebootok "$APPDATA\${ORG_BIG_NAME}"
|
2011-05-08 15:33:55 +02:00
|
|
|
SectionEnd
|
|
|
|
|
2011-01-03 04:13:09 +01:00
|
|
|
;--------------------------------
|
|
|
|
; Uninstall section descriptions
|
|
|
|
|
|
|
|
!insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${UnSecProgram} $(DESC_UnSecProgram)
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${UnSecCache} $(DESC_UnSecCache)
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${UnSecConfig} $(DESC_UnSecConfig)
|
|
|
|
!insertmacro MUI_UNFUNCTION_DESCRIPTION_END
|
2011-05-08 17:21:58 +02:00
|
|
|
|
2011-01-03 04:13:09 +01:00
|
|
|
;--------------------------------
|
2011-01-24 20:27:49 +01:00
|
|
|
; Uninstaller functions
|
2011-01-03 04:13:09 +01:00
|
|
|
|
|
|
|
Function un.onInit
|
|
|
|
|
2012-07-10 17:14:54 +02:00
|
|
|
SetShellVarContext all
|
2011-01-03 04:13:09 +01:00
|
|
|
!insertmacro MUI_UNGETLANGUAGE
|
2011-05-08 17:21:58 +02:00
|
|
|
|
2011-01-03 04:13:09 +01:00
|
|
|
FunctionEnd
|
2011-05-08 17:17:03 +02:00
|
|
|
|
|
|
|
;--------------------------------
|
|
|
|
; Function to run the application from installer
|
|
|
|
|
|
|
|
Function RunApplication
|
|
|
|
|
2015-05-20 22:18:58 +02:00
|
|
|
Exec '"$INSTDIR\bin\${GCS_SMALL_NAME}.exe"'
|
2011-05-08 17:17:03 +02:00
|
|
|
|
|
|
|
FunctionEnd
|