From 81539ec43593ae0049567b2ae1e8918df0b621ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20St=C3=B6hr?= Date: Fri, 3 May 2013 01:11:32 +0200 Subject: [PATCH] installer: fix an issue - also take care of emergency releases when updating LyX - add some prerequisites for a new feature --- .../Win32/packaging/installer/include/init.nsh | 12 +++++++++++- .../Win32/packaging/installer/setup/configure.nsh | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/development/Win32/packaging/installer/include/init.nsh b/development/Win32/packaging/installer/include/init.nsh index ef98cdac62..542709286c 100644 --- a/development/Win32/packaging/installer/include/init.nsh +++ b/development/Win32/packaging/installer/include/init.nsh @@ -610,7 +610,16 @@ Function .onInit MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" Abort ${endif} - + + # FIXME: check that LyX is not currently running + #System::Call 'kernel32::CreateMutexA(i 0, i 0, t "LyX.exe.Instance") i .r1 ?e' + #Pop $R0 + #MessageBox MB_OK "$R0" + #${if} $R0 != "0" + # MessageBox MB_OK|MB_ICONSTOP "$(LyXRunning)" + # Abort + #${endif} + !insertmacro MULTIUSER_INIT # check if this LyX version is already installed @@ -653,6 +662,7 @@ Function .onInit # we don't stop here because we want the latest installed version ${endif} ${next} + ${if} $OldVersionNumber > ${APP_SERIES_KEY} # store the version number and reformat it temporarily for the error message StrCpy $R0 $OldVersionNumber diff --git a/development/Win32/packaging/installer/setup/configure.nsh b/development/Win32/packaging/installer/setup/configure.nsh index 8df91d6c4f..6037ee2c03 100644 --- a/development/Win32/packaging/installer/setup/configure.nsh +++ b/development/Win32/packaging/installer/setup/configure.nsh @@ -54,6 +54,8 @@ Section -InstallData # if we install over an existing version, remove the old uninstaller information ${if} $OldVersionNumber != "" DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}$OldVersionNumber" + # also delete in the case of an emergency release + DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}$OldVersionNumber1" ${endif} SectionEnd