2011-01-03 04:13:09 +01:00
|
|
|
#
|
|
|
|
# Project: OpenPilot
|
|
|
|
# NSIS configuration file for OpenPilot GCS
|
Final step: lot of small fixes, last commit in this commit series
This is the first cleanup pass through makefiles and pios.
Probably it is difficult to track changes due to the nature of them.
I would recommend to look at resulting files and compiled code instead.
NOTE: original branch was rebased and lot of conflicts were fixed on
the way. So do not expect that every commit in this series will be
buildable (unlike original branch). Only final result was tested.
The main goal was to remove as much duplication of code (and copy/paste
errors) as possible, moving common parts out of Makefiles. It still is
not perfect, and mostly no code changes made - Makefiles and #ifdefs only.
But please while testing make sure that all code works as before, and no
modules/options are missed by accident.
Brief list of changes:
- Moved common parts of Makefiles into the set of *.mk files.
- Changed method of passing common vars from top Makefile to lower ones.
- Some pios cleanup, mostly #ifdefs, and all pios_config.h files.
- Many obsolete files removed (for instance, AHRS files, op_config.h).
- Many obsolete or unused macros removed or fixed/renamed (ALL_DIGNOSTICS).
- Unified pios_config.h template. Please don't remove lines for board
configs, only comment/uncomment them. Adding new PIOS options, please
propagate them to all board files keeping the same order.
- Some formatting, spacing, indentation (no line endings change yet).
- Some cosmetic fixes (no more C:\X\Y\filename.c printings on Windows).
- Added some library.mk files to move libs into AR achives later.
- EntireFlash target now uses cross-platform python script to generate bin
files. So it works on all supported platforms: Linux, OSX, Windows.
- Top level packaging is completely rewritten. Now it is a part of top
Makefile. As such, all dependencies are checked and accounted, no
more 'make -j' problems should occur.
- Default GCS_BUILD_CONF is release now, may be changed if necessary
using 'make GCS_BUILD_CONF=debug gcs'.
- GCS build paths are separated into debug and release, so no more obj
file clashes. Packaging system supports only release builds.
- New target is introduced: 'clean_package'. Now 'make package' does not
clean build directory. Use clean_package instead for distributable builds.
- Targets like 'all', 'opfw_resource', etc now will print extra contex
in parallel builds too.
- If any of 'package', 'clean_package', 'opfw_resource' targets are given
on command line, GCS build will depend on the resource, so all fw_*.opfw
targets will be built and embedded into GCS. By default GCS does not
depend on resource, and will be built w/o firmware (unless the resource
files already exist and the Qt resource file is generated).
- fw_simposix (ELF executable) is now packaged for linux. Run'n'play!
- Make help is refined and is now up to date.
Still broken:
- UnitTests, should be fixed
- SimPosix: buildable, but should be reworked.
Next planned passes to do:
- toolchain bootstrapping and packaging (including windows - WIP)
- CMSIS/StdPeriph lib cleanup
- more PIOS cleanup
- move libs into AR archives to save build time
- sim targets refactir and cleanup
- move android-related directories under <top>/android
- unit test targets fix
- source code line ending changes (there are many different, were not changed)
- coding style
Merging this, please use --no-ff git option to make it the real commit point
Conflicts:
A lot of... :-)
2013-03-24 12:02:08 +01:00
|
|
|
# The OpenPilot Team, http://www.openpilot.org, Copyright (C) 2010-2013.
|
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
|
|
|
; Tree root locations (relative to this script location)
|
2011-08-04 11:51:05 +02:00
|
|
|
!define PROJECT_ROOT "..\.."
|
2011-01-24 20:27:49 +01:00
|
|
|
!define NSIS_DATA_TREE "."
|
2013-03-30 16:33:38 +01:00
|
|
|
!define GCS_BUILD_TREE "..\..\build\openpilotgcs_release"
|
2012-07-09 10:51:45 +02:00
|
|
|
!define UAVO_SYNTH_TREE "..\..\build\uavobject-synthetics"
|
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
|
2012-07-10 17:14:54 +02:00
|
|
|
InstallDir "$PROGRAMFILES\OpenPilot"
|
2011-05-08 17:21:58 +02:00
|
|
|
|
2011-01-24 20:27:49 +01:00
|
|
|
; Get installation folder from registry if available
|
2012-07-10 17:14:54 +02:00
|
|
|
InstallDirRegKey HKLM "Software\OpenPilot" "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
|
|
|
|
2011-01-24 20:27:49 +01:00
|
|
|
; Program name and installer file
|
|
|
|
!define PRODUCT_NAME "OpenPilot GCS"
|
|
|
|
!define INSTALLER_NAME "OpenPilot GCS Installer"
|
2011-01-03 04:13:09 +01:00
|
|
|
|
2011-01-24 20:27:49 +01:00
|
|
|
; Read automatically generated version info
|
2011-05-28 02:14:51 +02:00
|
|
|
; !define PACKAGE_LBL "${DATE}-${TAG_OR_HASH8}"
|
|
|
|
; !define PACKAGE_DIR "..\..\build\package-$${PACKAGE_LBL}"
|
|
|
|
; !define OUT_FILE "OpenPilotGCS-$${PACKAGE_LBL}-install.exe"
|
|
|
|
; !define FIRMWARE_DIR "firmware-$${PACKAGE_LBL}"
|
2011-01-09 15:13:48 +01:00
|
|
|
; !define PRODUCT_VERSION "0.0.0.0"
|
2011-05-19 00:32:54 +02:00
|
|
|
; !define FILE_VERSION "${TAG_OR_BRANCH}:${HASH8} ${DATETIME}"
|
2012-12-14 01:20:54 +01:00
|
|
|
; !define BUILD_DESCRIPTION "${TAG_OR_BRANCH}:${HASH8} built from ${ORIGIN}, committed ${DATETIME} as ${HASH}"
|
2013-03-30 16:33:38 +01:00
|
|
|
!include "${GCS_BUILD_TREE}\..\openpilotgcs-synthetics\openpilotgcs.nsh"
|
2011-01-09 15:13:48 +01:00
|
|
|
|
2011-01-24 20:27:49 +01:00
|
|
|
Name "${PRODUCT_NAME}"
|
2012-12-10 15:00:03 +01:00
|
|
|
OutFile "${PACKAGE_DIR}\..\${OUT_FILE}"
|
2011-01-09 15:13:48 +01:00
|
|
|
|
|
|
|
VIProductVersion ${PRODUCT_VERSION}
|
|
|
|
VIAddVersionKey "ProductName" "${INSTALLER_NAME}"
|
2011-04-24 19:15:21 +02:00
|
|
|
VIAddVersionKey "FileVersion" "${FILE_VERSION}"
|
2011-01-09 15:13:48 +01:00
|
|
|
VIAddVersionKey "Comments" "${INSTALLER_NAME}. ${BUILD_DESCRIPTION}"
|
2011-01-03 04:13:09 +01:00
|
|
|
VIAddVersionKey "CompanyName" "The OpenPilot Team, http://www.openpilot.org"
|
2011-01-09 15:13:48 +01:00
|
|
|
VIAddVersionKey "LegalTrademarks" "${PRODUCT_NAME} is a trademark of The OpenPilot Team"
|
Final step: lot of small fixes, last commit in this commit series
This is the first cleanup pass through makefiles and pios.
Probably it is difficult to track changes due to the nature of them.
I would recommend to look at resulting files and compiled code instead.
NOTE: original branch was rebased and lot of conflicts were fixed on
the way. So do not expect that every commit in this series will be
buildable (unlike original branch). Only final result was tested.
The main goal was to remove as much duplication of code (and copy/paste
errors) as possible, moving common parts out of Makefiles. It still is
not perfect, and mostly no code changes made - Makefiles and #ifdefs only.
But please while testing make sure that all code works as before, and no
modules/options are missed by accident.
Brief list of changes:
- Moved common parts of Makefiles into the set of *.mk files.
- Changed method of passing common vars from top Makefile to lower ones.
- Some pios cleanup, mostly #ifdefs, and all pios_config.h files.
- Many obsolete files removed (for instance, AHRS files, op_config.h).
- Many obsolete or unused macros removed or fixed/renamed (ALL_DIGNOSTICS).
- Unified pios_config.h template. Please don't remove lines for board
configs, only comment/uncomment them. Adding new PIOS options, please
propagate them to all board files keeping the same order.
- Some formatting, spacing, indentation (no line endings change yet).
- Some cosmetic fixes (no more C:\X\Y\filename.c printings on Windows).
- Added some library.mk files to move libs into AR achives later.
- EntireFlash target now uses cross-platform python script to generate bin
files. So it works on all supported platforms: Linux, OSX, Windows.
- Top level packaging is completely rewritten. Now it is a part of top
Makefile. As such, all dependencies are checked and accounted, no
more 'make -j' problems should occur.
- Default GCS_BUILD_CONF is release now, may be changed if necessary
using 'make GCS_BUILD_CONF=debug gcs'.
- GCS build paths are separated into debug and release, so no more obj
file clashes. Packaging system supports only release builds.
- New target is introduced: 'clean_package'. Now 'make package' does not
clean build directory. Use clean_package instead for distributable builds.
- Targets like 'all', 'opfw_resource', etc now will print extra contex
in parallel builds too.
- If any of 'package', 'clean_package', 'opfw_resource' targets are given
on command line, GCS build will depend on the resource, so all fw_*.opfw
targets will be built and embedded into GCS. By default GCS does not
depend on resource, and will be built w/o firmware (unless the resource
files already exist and the Qt resource file is generated).
- fw_simposix (ELF executable) is now packaged for linux. Run'n'play!
- Make help is refined and is now up to date.
Still broken:
- UnitTests, should be fixed
- SimPosix: buildable, but should be reworked.
Next planned passes to do:
- toolchain bootstrapping and packaging (including windows - WIP)
- CMSIS/StdPeriph lib cleanup
- more PIOS cleanup
- move libs into AR archives to save build time
- sim targets refactir and cleanup
- move android-related directories under <top>/android
- unit test targets fix
- source code line ending changes (there are many different, were not changed)
- coding style
Merging this, please use --no-ff git option to make it the real commit point
Conflicts:
A lot of... :-)
2013-03-24 12:02:08 +01:00
|
|
|
VIAddVersionKey "LegalCopyright" "© 2010-2013 The OpenPilot Team"
|
2011-01-09 15:13:48 +01:00
|
|
|
VIAddVersionKey "FileDescription" "${INSTALLER_NAME}"
|
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
|
|
|
|
|
Final step: lot of small fixes, last commit in this commit series
This is the first cleanup pass through makefiles and pios.
Probably it is difficult to track changes due to the nature of them.
I would recommend to look at resulting files and compiled code instead.
NOTE: original branch was rebased and lot of conflicts were fixed on
the way. So do not expect that every commit in this series will be
buildable (unlike original branch). Only final result was tested.
The main goal was to remove as much duplication of code (and copy/paste
errors) as possible, moving common parts out of Makefiles. It still is
not perfect, and mostly no code changes made - Makefiles and #ifdefs only.
But please while testing make sure that all code works as before, and no
modules/options are missed by accident.
Brief list of changes:
- Moved common parts of Makefiles into the set of *.mk files.
- Changed method of passing common vars from top Makefile to lower ones.
- Some pios cleanup, mostly #ifdefs, and all pios_config.h files.
- Many obsolete files removed (for instance, AHRS files, op_config.h).
- Many obsolete or unused macros removed or fixed/renamed (ALL_DIGNOSTICS).
- Unified pios_config.h template. Please don't remove lines for board
configs, only comment/uncomment them. Adding new PIOS options, please
propagate them to all board files keeping the same order.
- Some formatting, spacing, indentation (no line endings change yet).
- Some cosmetic fixes (no more C:\X\Y\filename.c printings on Windows).
- Added some library.mk files to move libs into AR achives later.
- EntireFlash target now uses cross-platform python script to generate bin
files. So it works on all supported platforms: Linux, OSX, Windows.
- Top level packaging is completely rewritten. Now it is a part of top
Makefile. As such, all dependencies are checked and accounted, no
more 'make -j' problems should occur.
- Default GCS_BUILD_CONF is release now, may be changed if necessary
using 'make GCS_BUILD_CONF=debug gcs'.
- GCS build paths are separated into debug and release, so no more obj
file clashes. Packaging system supports only release builds.
- New target is introduced: 'clean_package'. Now 'make package' does not
clean build directory. Use clean_package instead for distributable builds.
- Targets like 'all', 'opfw_resource', etc now will print extra contex
in parallel builds too.
- If any of 'package', 'clean_package', 'opfw_resource' targets are given
on command line, GCS build will depend on the resource, so all fw_*.opfw
targets will be built and embedded into GCS. By default GCS does not
depend on resource, and will be built w/o firmware (unless the resource
files already exist and the Qt resource file is generated).
- fw_simposix (ELF executable) is now packaged for linux. Run'n'play!
- Make help is refined and is now up to date.
Still broken:
- UnitTests, should be fixed
- SimPosix: buildable, but should be reworked.
Next planned passes to do:
- toolchain bootstrapping and packaging (including windows - WIP)
- CMSIS/StdPeriph lib cleanup
- more PIOS cleanup
- move libs into AR archives to save build time
- sim targets refactir and cleanup
- move android-related directories under <top>/android
- unit test targets fix
- source code line ending changes (there are many different, were not changed)
- coding style
Merging this, please use --no-ff git option to make it the real commit point
Conflicts:
A lot of... :-)
2013-03-24 12:02:08 +01:00
|
|
|
BrandingText "© 2010-2013 The OpenPilot Team, http://www.openpilot.org"
|
2011-01-03 04:13:09 +01:00
|
|
|
|
2011-01-24 20:27:49 +01:00
|
|
|
!define MUI_ICON "${NSIS_DATA_TREE}\resources\openpilot.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"
|
2011-01-03 04:13:09 +01:00
|
|
|
!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
|
2011-01-24 20:27:49 +01:00
|
|
|
!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSIS_DATA_TREE}\resources\welcome.bmp"
|
2011-01-03 04:13:09 +01:00
|
|
|
!define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
|
2011-01-24 20:27:49 +01:00
|
|
|
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSIS_DATA_TREE}\resources\welcome.bmp"
|
2011-01-03 04:13:09 +01:00
|
|
|
!define MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH
|
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"
|
|
|
|
!define MUI_LANGDLL_REGISTRY_KEY "Software\OpenPilot"
|
|
|
|
!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
|
2012-07-10 17:14:54 +02:00
|
|
|
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\HISTORY.txt"
|
2011-05-08 17:17:03 +02:00
|
|
|
!define MUI_FINISHPAGE_RUN_FUNCTION "RunApplication"
|
|
|
|
|
2011-01-03 04:13:09 +01:00
|
|
|
;--------------------------------
|
|
|
|
; Pages
|
|
|
|
|
|
|
|
!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
|
|
|
|
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"
|
|
|
|
File "${PROJECT_ROOT}\HISTORY.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
|
|
|
|
SetOutPath "$INSTDIR\lib\openpilotgcs\plugins"
|
2011-01-24 20:27:49 +01:00
|
|
|
File /r "${GCS_BUILD_TREE}\lib\openpilotgcs\plugins\*.dll"
|
|
|
|
File /r "${GCS_BUILD_TREE}\lib\openpilotgcs\plugins\*.pluginspec"
|
2011-01-03 04:13:09 +01:00
|
|
|
SectionEnd
|
|
|
|
|
2012-07-10 17:14:54 +02:00
|
|
|
; Copy GCS resources
|
2012-07-20 21:37:36 +02:00
|
|
|
Section "-Resources" InSecResources
|
2012-08-19 21:14:11 +02:00
|
|
|
SetOutPath "$INSTDIR\share\openpilotgcs\default_configurations"
|
|
|
|
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\default_configurations\*"
|
2012-08-20 11:19:21 +02:00
|
|
|
SetOutPath "$INSTDIR\share\openpilotgcs\stylesheets"
|
|
|
|
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\stylesheets\*"
|
2011-01-03 04:13:09 +01:00
|
|
|
SetOutPath "$INSTDIR\share\openpilotgcs\diagrams"
|
2011-01-24 20:27:49 +01:00
|
|
|
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\diagrams\*"
|
2011-01-03 04:13:09 +01:00
|
|
|
SetOutPath "$INSTDIR\share\openpilotgcs\dials"
|
2011-01-24 20:27:49 +01:00
|
|
|
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\dials\*"
|
2011-01-03 04:13:09 +01:00
|
|
|
SetOutPath "$INSTDIR\share\openpilotgcs\mapicons"
|
2011-01-24 20:27:49 +01:00
|
|
|
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\mapicons\*"
|
2011-01-03 04:13:09 +01:00
|
|
|
SetOutPath "$INSTDIR\share\openpilotgcs\models"
|
2011-01-24 20:27:49 +01:00
|
|
|
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\models\*"
|
2011-01-03 04:13:09 +01:00
|
|
|
SetOutPath "$INSTDIR\share\openpilotgcs\pfd"
|
2011-01-24 20:27:49 +01:00
|
|
|
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\pfd\*"
|
2011-01-03 04:13:09 +01:00
|
|
|
SectionEnd
|
|
|
|
|
2012-07-10 17:14:54 +02:00
|
|
|
; Copy Notify plugin sound files
|
2012-07-20 21:37:36 +02:00
|
|
|
Section "-Sound files" InSecSounds
|
2011-01-03 04:13:09 +01:00
|
|
|
SetOutPath "$INSTDIR\share\openpilotgcs\sounds"
|
2011-01-24 20:27:49 +01:00
|
|
|
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\sounds\*"
|
2011-01-03 04:13:09 +01:00
|
|
|
SectionEnd
|
|
|
|
|
2012-07-10 17:14:54 +02:00
|
|
|
; Copy localization files
|
|
|
|
; Disabled until GCS source is stable and properly localized
|
2012-07-20 21:37:36 +02:00
|
|
|
Section "-Localization" InSecLocalization
|
2011-01-03 04:13:09 +01:00
|
|
|
SetOutPath "$INSTDIR\share\openpilotgcs\translations"
|
2011-07-22 21:24:48 +02:00
|
|
|
; File /r "${GCS_BUILD_TREE}\share\openpilotgcs\translations\openpilotgcs_*.qm"
|
|
|
|
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\translations\qt_*.qm"
|
2011-01-03 04:13:09 +01:00
|
|
|
SectionEnd
|
|
|
|
|
2012-07-10 17:14:54 +02:00
|
|
|
; Copy firmware files
|
2013-05-26 21:47:43 +02:00
|
|
|
Section /o "-Firmware" InSecFirmware
|
2011-08-01 11:40:45 +02:00
|
|
|
SetOutPath "$INSTDIR\firmware"
|
2013-03-21 22:11:30 +01:00
|
|
|
File /r "${PACKAGE_DIR}\${FIRMWARE_DIR}\*"
|
2012-07-09 10:51:45 +02: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"
|
|
|
|
File "${PROJECT_ROOT}\flight\Project\Windows USB\OpenPilot-CDC.inf"
|
2011-05-25 16:57:54 +02:00
|
|
|
SectionEnd
|
|
|
|
|
2012-07-10 17:14:54 +02:00
|
|
|
; Preinstall OpenPilot CDC driver
|
|
|
|
Section "CDC driver" InSecInstallDrivers
|
|
|
|
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
|
|
|
|
|
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"
|
2011-01-03 04:13:09 +01:00
|
|
|
CreateDirectory "$SMPROGRAMS\OpenPilot"
|
2011-01-09 15:13:48 +01:00
|
|
|
CreateShortCut "$SMPROGRAMS\OpenPilot\OpenPilot GCS.lnk" "$INSTDIR\bin\openpilotgcs.exe" \
|
|
|
|
"" "$INSTDIR\bin\openpilotgcs.exe" 0 "" "" "${PRODUCT_NAME} ${PRODUCT_VERSION}. ${BUILD_DESCRIPTION}"
|
2012-06-25 11:07:26 +02:00
|
|
|
CreateShortCut "$SMPROGRAMS\OpenPilot\OpenPilot GCS (clean configuration).lnk" "$INSTDIR\bin\openpilotgcs.exe" \
|
|
|
|
"-clean-config" "$INSTDIR\bin\openpilotgcs.exe" 0 "" "" "${PRODUCT_NAME} ${PRODUCT_VERSION}. ${BUILD_DESCRIPTION}"
|
2011-08-04 11:51:05 +02:00
|
|
|
CreateShortCut "$SMPROGRAMS\OpenPilot\OpenPilot ChangeLog.lnk" "$INSTDIR\HISTORY.txt" \
|
|
|
|
"" "$INSTDIR\bin\openpilotgcs.exe" 0
|
|
|
|
CreateShortCut "$SMPROGRAMS\OpenPilot\OpenPilot Website.lnk" "http://www.openpilot.org" \
|
|
|
|
"" "$INSTDIR\bin\openpilotgcs.exe" 0
|
|
|
|
CreateShortCut "$SMPROGRAMS\OpenPilot\OpenPilot Wiki.lnk" "http://wiki.openpilot.org" \
|
|
|
|
"" "$INSTDIR\bin\openpilotgcs.exe" 0
|
|
|
|
CreateShortCut "$SMPROGRAMS\OpenPilot\OpenPilot Forums.lnk" "http://forums.openpilot.org" \
|
|
|
|
"" "$INSTDIR\bin\openpilotgcs.exe" 0
|
2011-01-09 15:13:48 +01:00
|
|
|
CreateShortCut "$DESKTOP\OpenPilot GCS.lnk" "$INSTDIR\bin\openpilotgcs.exe" \
|
|
|
|
"" "$INSTDIR\bin\openpilotgcs.exe" 0 "" "" "${PRODUCT_NAME} ${PRODUCT_VERSION}. ${BUILD_DESCRIPTION}"
|
2011-01-03 04:13:09 +01:00
|
|
|
CreateShortCut "$SMPROGRAMS\OpenPilot\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
Section ; create uninstall info
|
|
|
|
; Write the installation path into the registry
|
|
|
|
WriteRegStr HKCU "Software\OpenPilot" "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
|
2011-01-03 04:13:09 +01:00
|
|
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenPilot" "DisplayName" "OpenPilot GCS"
|
|
|
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenPilot" "UninstallString" '"$INSTDIR\Uninstall.exe"'
|
2013-05-25 18:13:43 +02:00
|
|
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenPilot" "DisplayIcon" '"$INSTDIR\bin\openpilotgcs.exe"'
|
|
|
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenPilot" "Publisher" "OpenPilot Team"
|
|
|
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenPilot" "DisplayVersion" "Stumpy"
|
2013-05-29 11:05:35 +02:00
|
|
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenPilot" "URLInfoAbout" "http://www.openpilot.org"
|
2013-05-25 18:13:43 +02:00
|
|
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenPilot" "HelpLink" "http://wiki.openpilot.org"
|
|
|
|
WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenPilot" "EstimatedSize" 100600
|
2011-01-03 04:13:09 +01:00
|
|
|
WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenPilot" "NoModify" 1
|
|
|
|
WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenPilot" "NoRepair" 1
|
|
|
|
|
|
|
|
; 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)
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${InSecResources} $(DESC_InSecResources)
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${InSecSounds} $(DESC_InSecSounds)
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${InSecLocalization} $(DESC_InSecLocalization)
|
2011-05-25 16:57:54 +02:00
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${InSecFirmware} $(DESC_InSecFirmware)
|
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)
|
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
|
|
|
|
2011-01-28 19:18:08 +01:00
|
|
|
Section "un.OpenPilot GCS" 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"
|
2011-08-04 11:51:05 +02:00
|
|
|
Delete /rebootok "$INSTDIR\HISTORY.txt"
|
2011-01-03 04:13:09 +01:00
|
|
|
Delete /rebootok "$INSTDIR\Uninstall.exe"
|
|
|
|
|
|
|
|
; Remove directory
|
|
|
|
RMDir /rebootok "$INSTDIR"
|
|
|
|
|
|
|
|
; Remove registry keys
|
|
|
|
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenPilot"
|
|
|
|
DeleteRegKey HKCU "Software\OpenPilot"
|
|
|
|
|
|
|
|
; Remove shortcuts, if any
|
2012-10-15 21:51:30 +02:00
|
|
|
SetShellVarContext all
|
2011-01-03 04:13:09 +01:00
|
|
|
Delete /rebootok "$DESKTOP\OpenPilot GCS.lnk"
|
|
|
|
Delete /rebootok "$SMPROGRAMS\OpenPilot\*"
|
|
|
|
RMDir /rebootok "$SMPROGRAMS\OpenPilot"
|
|
|
|
SectionEnd
|
|
|
|
|
2011-01-28 19:18:08 +01:00
|
|
|
Section "un.Maps cache" UnSecCache
|
2011-01-03 04:13:09 +01:00
|
|
|
; Remove maps cache
|
2012-10-15 21:51:30 +02:00
|
|
|
SetShellVarContext current
|
2011-05-08 14:31:57 +02:00
|
|
|
RMDir /r /rebootok "$APPDATA\OpenPilot\mapscache"
|
2011-01-03 04:13:09 +01:00
|
|
|
SectionEnd
|
|
|
|
|
2011-01-28 19:18:08 +01:00
|
|
|
Section /o "un.Configuration" UnSecConfig
|
2011-01-03 04:13:09 +01:00
|
|
|
; Remove configuration
|
2012-10-15 21:51:30 +02:00
|
|
|
SetShellVarContext current
|
|
|
|
Delete /rebootok "$APPDATA\OpenPilot\OpenPilotGCS*.db"
|
|
|
|
Delete /rebootok "$APPDATA\OpenPilot\OpenPilotGCS*.xml"
|
|
|
|
Delete /rebootok "$APPDATA\OpenPilot\OpenPilotGCS*.ini"
|
2011-01-03 04:13:09 +01:00
|
|
|
SectionEnd
|
|
|
|
|
2011-05-08 15:33:55 +02:00
|
|
|
Section "-un.Profile" UnSecProfile
|
|
|
|
; Remove OpenPilot user profile subdirectory if empty
|
2012-10-15 21:51:30 +02:00
|
|
|
SetShellVarContext current
|
2011-05-08 15:33:55 +02:00
|
|
|
RMDir "$APPDATA\OpenPilot"
|
|
|
|
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
|
|
|
|
|
|
|
|
Exec '"$INSTDIR\bin\openpilotgcs.exe"'
|
|
|
|
|
|
|
|
FunctionEnd
|