!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
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
-; 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"
-; 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
+