1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

nsis: CDC driver, per-machine installation, release notes

Now CDC driver will be pre-installed during the install process.

Since driver installation requires elevated (admin) privileges
on Windows Vista/7, the software will also be installed into the
Program Files folder instead of user local profile. Former did not
require admin rights, but now it does not matter, so Program Files
folder is preferred.

HISTORY.txt file will be shown after installation.
This commit is contained in:
Oleg Semyonov 2012-07-10 18:14:54 +03:00
parent 4d169dbd54
commit 0c8cc5768c
10 changed files with 48 additions and 8 deletions

View File

@ -1,5 +1,13 @@
Short summary of changes. For a complete list see the git log.
2012-07-10
On Windows the installation mode was changed from per-user to per-machine
(for all users) installation. It is recommended to completely uninstall
previous version before installing new one to remove per-user installed
files. Per-machine installation requires elevated (administrator) previleges
during install. But since the same rights are now required to install
optional CDC driver (virtual communication port), it was deemed acceptable.
2012-06-04
AeroSimRC support merged into next

View File

@ -21,14 +21,15 @@
# This script requires Unicode NSIS 2.46 or higher:
# http://www.scratchpaper.com/
# Features:
# - Installs to the user local appdata path, no admin rights required.
#
# TODO:
# - optionally install for all users (to Program Files with admin rights on Vista/7).
# - install only built/used modules, not a whole directory.
# - remove only installed files, not a whole directory.
;--------------------------------
; Includes
!include "x64.nsh"
;--------------------------------
; Paths
@ -39,10 +40,10 @@
!define UAVO_SYNTH_TREE "..\..\build\uavobject-synthetics"
; Default installation folder
InstallDir "$LOCALAPPDATA\OpenPilot"
InstallDir "$PROGRAMFILES\OpenPilot"
; Get installation folder from registry if available
InstallDirRegKey HKCU "Software\OpenPilot" "Install Location"
InstallDirRegKey HKLM "Software\OpenPilot" "Install Location"
;--------------------------------
; Version information
@ -83,7 +84,7 @@
XPStyle on
; Request application privileges for Windows Vista/7
RequestExecutionLevel user
RequestExecutionLevel admin
; Compression level
SetCompressor /solid lzma
@ -91,7 +92,7 @@
;--------------------------------
; Branding
BrandingText "© 2010-2011 The OpenPilot Team, http://www.openpilot.org"
BrandingText "© 2010-2012 The OpenPilot Team, http://www.openpilot.org"
!define MUI_ICON "${NSIS_DATA_TREE}\resources\openpilot.ico"
!define MUI_HEADERIMAGE
@ -114,6 +115,7 @@
;--------------------------------
; Settings for MUI_PAGE_FINISH
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\HISTORY.txt"
!define MUI_FINISHPAGE_RUN_FUNCTION "RunApplication"
;--------------------------------
@ -149,6 +151,7 @@
;--------------------------------
; Installer sections
; Copy GCS core files
Section "Core files" InSecCore
SectionIn RO
SetOutPath "$INSTDIR\bin"
@ -157,6 +160,7 @@ Section "Core files" InSecCore
File "${PROJECT_ROOT}\HISTORY.txt"
SectionEnd
; Copy GCS plugins
Section "Plugins" InSecPlugins
SectionIn RO
SetOutPath "$INSTDIR\lib\openpilotgcs\plugins"
@ -164,6 +168,7 @@ Section "Plugins" InSecPlugins
File /r "${GCS_BUILD_TREE}\lib\openpilotgcs\plugins\*.pluginspec"
SectionEnd
; Copy GCS resources
Section "Resources" InSecResources
SetOutPath "$INSTDIR\share\openpilotgcs\diagrams"
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\diagrams\*"
@ -177,17 +182,21 @@ Section "Resources" InSecResources
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\pfd\*"
SectionEnd
; Copy Notify plugin sound files
Section "Sound files" InSecSounds
SetOutPath "$INSTDIR\share\openpilotgcs\sounds"
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\sounds\*"
SectionEnd
; Copy localization files
; Disabled until GCS source is stable and properly localized
Section "Localization" InSecLocalization
SetOutPath "$INSTDIR\share\openpilotgcs\translations"
; File /r "${GCS_BUILD_TREE}\share\openpilotgcs\translations\openpilotgcs_*.qm"
File /r "${GCS_BUILD_TREE}\share\openpilotgcs\translations\qt_*.qm"
SectionEnd
; Copy firmware files
Section "Firmware" InSecFirmware
; SetOutPath "$INSTDIR\firmware\${FIRMWARE_DIR}"
; File /r "${PACKAGE_DIR}\${FIRMWARE_DIR}\*"
@ -196,16 +205,30 @@ Section "Firmware" InSecFirmware
File "${PACKAGE_DIR}\${FIRMWARE_DIR}\fw_pipxtreme-${PACKAGE_LBL}.opfw"
SectionEnd
; Copy utility files
Section "-Utilities" InSecUtilities
SetOutPath "$INSTDIR\utilities"
File "/oname=OPLogConvert-${PACKAGE_LBL}.m" "${UAVO_SYNTH_TREE}\matlab\OPLogConvert.m"
SectionEnd
; Copy driver files
Section "-Drivers" InSecDrivers
SetOutPath "$INSTDIR\drivers"
File "${PROJECT_ROOT}\flight\Project\Windows USB\OpenPilot-CDC.inf"
SectionEnd
; 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
Section "Shortcuts" InSecShortcuts
; Create desktop and start menu shortcuts
SetOutPath "$INSTDIR"
@ -253,6 +276,7 @@ SectionEnd
!insertmacro MUI_DESCRIPTION_TEXT ${InSecFirmware} $(DESC_InSecFirmware)
!insertmacro MUI_DESCRIPTION_TEXT ${InSecUtilities} $(DESC_InSecUtilities)
!insertmacro MUI_DESCRIPTION_TEXT ${InSecDrivers} $(DESC_InSecDrivers)
!insertmacro MUI_DESCRIPTION_TEXT ${InSecInstallDrivers} $(DESC_InSecInstallDrivers)
!insertmacro MUI_DESCRIPTION_TEXT ${InSecShortcuts} $(DESC_InSecShortcuts)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
@ -261,6 +285,7 @@ SectionEnd
Function .onInit
SetShellVarContext all
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd
@ -322,6 +347,7 @@ SectionEnd
Function un.onInit
SetShellVarContext all
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd

Binary file not shown.

Binary file not shown.

View File

@ -33,6 +33,7 @@
LangString DESC_InSecFirmware ${LANG_GERMAN} "OpenPilot firmware binaries."
LangString DESC_InSecUtilities ${LANG_GERMAN} "OpenPilot utilities (Matlab log parser)."
LangString DESC_InSecDrivers ${LANG_GERMAN} "OpenPilot hardware driver files (optional OpenPilot CDC driver)."
LangString DESC_InSecInstallDrivers ${LANG_GERMAN} "Install OpenPilot CDC driver (optional)."
LangString DESC_InSecShortcuts ${LANG_GERMAN} "Installiere Verknüpfungen unter Startmenü->Anwendungen."
;--------------------------------

View File

@ -33,6 +33,7 @@
LangString DESC_InSecFirmware ${LANG_ENGLISH} "OpenPilot firmware binaries."
LangString DESC_InSecUtilities ${LANG_ENGLISH} "OpenPilot utilities (Matlab log parser)."
LangString DESC_InSecDrivers ${LANG_ENGLISH} "OpenPilot hardware driver files (optional OpenPilot CDC driver)."
LangString DESC_InSecInstallDrivers ${LANG_ENGLISH} "Install OpenPilot CDC driver (optional)."
LangString DESC_InSecShortcuts ${LANG_ENGLISH} "Install application start menu shortcuts."
;--------------------------------

View File

@ -33,6 +33,7 @@
LangString DESC_InSecFirmware ${LANG_SPANISH} "OpenPilot firmware binaries."
LangString DESC_InSecUtilities ${LANG_SPANISH} "OpenPilot utilities (Matlab log parser)."
LangString DESC_InSecDrivers ${LANG_SPANISH} "OpenPilot hardware driver files (optional OpenPilot CDC driver)."
LangString DESC_InSecInstallDrivers ${LANG_SPANISH} "Install OpenPilot CDC driver (optional)."
LangString DESC_InSecShortcuts ${LANG_SPANISH} "Instalar accesos directos de la aplicación (menú inicio y escritorio)."
;--------------------------------

View File

@ -33,6 +33,7 @@
LangString DESC_InSecFirmware ${LANG_FRENCH} "OpenPilot firmware binaries."
LangString DESC_InSecUtilities ${LANG_FRENCH} "OpenPilot utilities (Matlab log parser)."
LangString DESC_InSecDrivers ${LANG_FRENCH} "OpenPilot hardware driver files (optional OpenPilot CDC driver)."
LangString DESC_InSecInstallDrivers ${LANG_FRENCH} "Install OpenPilot CDC driver (optional)."
LangString DESC_InSecShortcuts ${LANG_FRENCH} "Installer les raccourcis dans le menu démarrer."
;--------------------------------

View File

@ -33,6 +33,7 @@
LangString DESC_InSecFirmware ${LANG_RUSSIAN} "Файлы прошивок OpenPilot."
LangString DESC_InSecUtilities ${LANG_RUSSIAN} "Утилиты (конвертор логов для Matlab)."
LangString DESC_InSecDrivers ${LANG_RUSSIAN} "Файлы драйверов (опциональный драйвер CDC порта)."
LangString DESC_InSecInstallDrivers ${LANG_RUSSIAN} "Установка опционального OpenPilot CDC драйвера."
LangString DESC_InSecShortcuts ${LANG_RUSSIAN} "Установка ярлыков для приложения."
;--------------------------------

View File

@ -33,6 +33,7 @@
LangString DESC_InSecFirmware ${LANG_TRADCHINESE} "OpenPilot firmware binaries."
LangString DESC_InSecUtilities ${LANG_TRADCHINESE} "OpenPilot utilities (Matlab log parser)."
LangString DESC_InSecDrivers ${LANG_TRADCHINESE} "OpenPilot hardware driver files (optional OpenPilot CDC driver)."
LangString DESC_InSecInstallDrivers ${LANG_TRADCHINESE} "Install OpenPilot CDC driver (optional)."
LangString DESC_InSecShortcuts ${LANG_TRADCHINESE} "安装开始菜单的快捷方式."
;--------------------------------