From 5a3a071fc3ad6d9efa115aa7fce445200fe42ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20St=C3=B6hr?= Date: Thu, 3 Jan 2013 02:46:48 +0100 Subject: [PATCH] installer: support emergency releases of LyX --- .../Win32/packaging/installer/include/declarations.nsh | 4 ++-- development/Win32/packaging/installer/include/init.nsh | 8 ++++++++ development/Win32/packaging/installer/settings.nsh | 10 ++++++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/development/Win32/packaging/installer/include/declarations.nsh b/development/Win32/packaging/installer/include/declarations.nsh index d40d0b70ca..02062d2605 100644 --- a/development/Win32/packaging/installer/include/declarations.nsh +++ b/development/Win32/packaging/installer/include/declarations.nsh @@ -46,8 +46,8 @@ Configuration of LyX installer # for the proposed install folder we use the scheme "LyX 2.0" while we need for the registry the scheme "LyX 2.0.4" # to check if it is exactly this version (to support side by side installations) !define APP_SERIES_NAME "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}" -!define APP_SERIES_KEY "${APP_VERSION_MAJOR}${APP_VERSION_MINOR}${APP_VERSION_REVISION}" -!define APP_SERIES_KEY2 "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_REVISION}" +!define APP_SERIES_KEY "${APP_VERSION_MAJOR}${APP_VERSION_MINOR}${APP_VERSION_REVISION}${APP_VERSION_EMERGENCY}" +!define APP_SERIES_KEY2 "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_REVISION}${APP_EMERGENCY_DOT}${APP_VERSION_EMERGENCY}" !define APP_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${APP_NAME}.exe" !define APP_DIR "${APP_NAME} ${APP_SERIES_NAME}" !define APP_DIR_USERDATA "${APP_NAME}${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}" diff --git a/development/Win32/packaging/installer/include/init.nsh b/development/Win32/packaging/installer/include/init.nsh index 9472d449bd..8b3125522b 100644 --- a/development/Win32/packaging/installer/include/init.nsh +++ b/development/Win32/packaging/installer/include/init.nsh @@ -610,8 +610,16 @@ Function .onInit ${if} $MultiUser.Privileges == "Admin" ${orif} $MultiUser.Privileges == "Power" ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" "DisplayVersion" + # also check for an emergency release + ${if} $0 == "" + ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$51" "DisplayVersion" + ${endif} ${else} ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" "DisplayVersion" + # also check for an emergency release + ${if} $0 == "" + ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$51" "DisplayVersion" + ${endif} ${endif} ${if} $0 != "" StrCpy $R5 $0 # store the read version number diff --git a/development/Win32/packaging/installer/settings.nsh b/development/Win32/packaging/installer/settings.nsh index d6c5190e0d..e95bfbf028 100644 --- a/development/Win32/packaging/installer/settings.nsh +++ b/development/Win32/packaging/installer/settings.nsh @@ -12,9 +12,11 @@ These typically need to be modified for each LyX release !define APP_VERSION_MAJOR 2 !define APP_VERSION_MINOR 0 !define APP_VERSION_REVISION 5 -!define APP_VERSION_BUILD 5 # Start with 1 for the installer releases of each version +!define APP_VERSION_EMERGENCY "1" # use "1" for an emergency release of LyX otherwise "" +!define APP_EMERGENCY_DOT "." # use "." for an emergency release of LyX otherwise "" +!define APP_VERSION_BUILD 1 # Start with 1 for the installer releases of each version -!define APP_VERSION "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_REVISION}" # Version to display +!define APP_VERSION "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_REVISION}${APP_EMERGENCY_DOT}${APP_VERSION_EMERGENCY}" # Version to display #-------------------------------- # Installer file name @@ -22,10 +24,10 @@ These typically need to be modified for each LyX release # Typical names for the release are "LyX-201-Installer-1.exe" etc. !ifndef ExeFile - !define ExeFile "LyX-${APP_VERSION_MAJOR}${APP_VERSION_MINOR}${APP_VERSION_REVISION}-Installer-${APP_VERSION_BUILD}.exe" + !define ExeFile "LyX-${APP_VERSION_MAJOR}${APP_VERSION_MINOR}${APP_VERSION_REVISION}${APP_VERSION_EMERGENCY}-Installer-${APP_VERSION_BUILD}.exe" !endif !ifndef BundleExeFile - !define BundleExeFile "LyX-${APP_VERSION_MAJOR}${APP_VERSION_MINOR}${APP_VERSION_REVISION}-Bundle-${APP_VERSION_BUILD}.exe" + !define BundleExeFile "LyX-${APP_VERSION_MAJOR}${APP_VERSION_MINOR}${APP_VERSION_REVISION}${APP_VERSION_EMERGENCY}-Bundle-${APP_VERSION_BUILD}.exe" !endif !ifndef MinimalExeFile !define /date MinimalExeFile "LyX-${APP_VERSION_MAJOR}${APP_VERSION_MINOR}svn-%Y%m%d-Installer-Minimal.exe"