From da79b59082e749f9a9f40fd9805da5c81d34c4f3 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Sat, 20 Jun 2015 17:29:59 +0200 Subject: [PATCH] Windows: Change check for vcredist YAZ-848 Use key for installer: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\UUID --- win/yaz.nsi | 12 ++++-------- win/yaz.win32.nsi | 6 +++--- win/yaz.win64.nsi | 7 ++++--- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/win/yaz.nsi b/win/yaz.nsi index 1a31506..5a9f62f 100644 --- a/win/yaz.nsi +++ b/win/yaz.nsi @@ -5,10 +5,6 @@ !include EnvVarUpdate.nsh !include version.nsi -; !define VS_REDIST_EXE "vcredist_x86.exe" -; !define VS_REDIST_FULL "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\1033\${VS_REDIST_EXE}" -; !define VS_REDIST_KEY "SOFTWARE\Microsoft\VisualStudio\12.0\VC\Runtimes\x86" - !include "MUI.nsh" SetCompressor bzip2 @@ -87,10 +83,10 @@ Section "YAZ Runtime" YAZ_Runtime SetOutPath $INSTDIR\bin !if "${VS_REDIST_FULL}" != "" File "${VS_REDIST_FULL}" - ReadRegStr $1 HKLM "${VS_REDIST_KEY}" "Installed" - StrCmp $1 1 installed_redist - ExecWait '"$INSTDIR\bin\${VS_REDIST_EXE}" /passive /nostart' -installed_redist: + ReadRegDword $1 HKLM "${VS_REDIST_KEY}" "Version" + ${If} $1 == "" + ExecWait '"$INSTDIR\bin\${VS_REDIST_EXE}" /passive /nostart' + ${endif} Delete "$INSTDIR\bin\${VS_REDIST_EXE}" !endif IfFileExists "$INSTDIR\bin\yaz-ztest.exe" 0 Noservice diff --git a/win/yaz.win32.nsi b/win/yaz.win32.nsi index fc647d2..c0a6c00 100644 --- a/win/yaz.win32.nsi +++ b/win/yaz.win32.nsi @@ -1,7 +1,7 @@ -; YAZ for Windows 32 bit, VS 2013 +; YAZ for Windows 32 bit, VS 2015 !define VS_REDIST_EXE "vcredist_x86.exe" -!define VS_REDIST_FULL "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\1033\${VS_REDIST_EXE}" -!define VS_REDIST_KEY "SOFTWARE\Microsoft\VisualStudio\12.0\VC\Runtimes\x86" +!define VS_REDIST_FULL "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\1033\${VS_REDIST_EXE}" +!define VS_REDIST_KEY "SOFTWARE\Classes\Installer\Products\21EE4A31AE32173319EEFE3BD6FDFFE3" InstallDir "$PROGRAMFILES\YAZ" diff --git a/win/yaz.win64.nsi b/win/yaz.win64.nsi index d995cf9..1f0c33d 100644 --- a/win/yaz.win64.nsi +++ b/win/yaz.win64.nsi @@ -1,9 +1,10 @@ -; YAZ for Windows 64 bit, VS 2013 +; YAZ for Windows 64 bit, VS 2015 !define VS_REDIST_EXE "vcredist_x64.exe" -!define VS_REDIST_FULL "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\1033\${VS_REDIST_EXE}" -!define VS_REDIST_KEY "SOFTWARE\Microsoft\VisualStudio\12.0\VC\Runtimes\x64" +!define VS_REDIST_FULL "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\1033\${VS_REDIST_EXE}" +!define VS_REDIST_KEY "SOFTWARE\Classes\Installer\Products\75B815F0A80081D379E08346B5DB5B6E" InstallDir "$PROGRAMFILES64\YAZ" !include yaz.nsi + -- 1.7.10.4