Windows: one NSI file again YAZ-848
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 22 Jun 2015 09:41:37 +0000 (11:41 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 22 Jun 2015 09:41:37 +0000 (11:41 +0200)
win/makefile
win/yaz.nsi
win/yaz.win32.nsi [deleted file]
win/yaz.win64.nsi [deleted file]

index 9e80ca9..f773d03 100644 (file)
@@ -53,13 +53,13 @@ YAZ4J_DIR="..\..\yaz4j"
 YAZPATH="$(MAKEDIR)\.."
 
 
-dist: yaz.win32.nsi yaz.nsi version.nsi distclean
+dist: yaz.nsi version.nsi distclean
        nmake DEBUG=0 allj
-       $(NSIS) yaz.win32.nsi
+       nmake nsis
 
-dist64: yaz.win64.nsi yaz.nsi version.nsi distclean
+dist64: yaz.nsi version.nsi distclean
        nmake make64
-       $(NSIS) yaz.win64.nsi
+       nmake nsis64
 
 make64:
        nmake DEBUG=0 HAVE_LIBXSLT=1 HAVE_LIBXML2=1 HAVE_ICONV=0 HAVE_ICU=1 LIBXML2_DIR=c:\libxml2-2.9.2.win64 LIBXSLT_DIR=c:\libxslt-1.1.28.win64 ICU_LIB=\icu\lib64 ICU_INCLUDE=\icu\include ICU_BIN=\icu\bin64 allj
@@ -69,11 +69,11 @@ distclean:
        nmake DEBUG=1 clean
        nmake DEBUG=0 clean
 
-nsis: all yaz.win32.nsi version.nsi
-       $(NSIS) yaz.win32.nsi
+nsis: version.nsi
+       $(NSIS) /DVSARCH=x86 /DVSVER=12 yaz.nsi
 
-nsis64: yaz.win64.nsi version.nsi
-       $(NSIS) yaz.win64.nsi
+nsis64: version.nsi
+       $(NSIS) /DVSARCH=x64 /DVSVER=12 yaz.nsi
 
 nsishelp:
        $(NSIS)
index 5a9f62f..a01dcdd 100644 (file)
@@ -7,6 +7,32 @@
 
 !include "MUI.nsh"
 
+!define VS_REDIST_EXE vcredist_${VSARCH}.exe
+!define VS_REDIST_FULL "c:\Program Files (x86)\Microsoft Visual Studio ${VSVER}.0\VC\redist\1033\${VS_REDIST_EXE}"
+
+; For example can be found with regedit:
+;  Microsoft Visual C++ 2013 x86 Minimum Runtime
+!if "${VSARCH}" = "x64"
+; 64-bit
+!if "${VSVER}" = "12"
+!define VS_REDIST_KEY "SOFTWARE\Classes\Installer\Products\6E8D947A316B3EB3F8F540C548BE2AB9"
+!endif
+!if "${VSVER}" = "14"
+!endif
+
+InstallDir "$PROGRAMFILES64\YAZ"
+!else
+; 32-bit
+!if "${VSVER}" = "12"
+!define VS_REDIST_KEY "SOFTWARE\Classes\Installer\Products\21EE4A31AE32173319EEFE3BD6FDFFE3"
+!endif
+!if "${VSVER}" = "14"
+!endif
+
+InstallDir "$PROGRAMFILES\YAZ"
+!endif
+
+
 SetCompressor bzip2
 
 Name "YAZ"
diff --git a/win/yaz.win32.nsi b/win/yaz.win32.nsi
deleted file mode 100644 (file)
index c0a6c00..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-; 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 14.0\VC\redist\1033\${VS_REDIST_EXE}"
-!define VS_REDIST_KEY "SOFTWARE\Classes\Installer\Products\21EE4A31AE32173319EEFE3BD6FDFFE3"
-
-InstallDir "$PROGRAMFILES\YAZ"
-
-!include yaz.nsi
-
diff --git a/win/yaz.win64.nsi b/win/yaz.win64.nsi
deleted file mode 100644 (file)
index 1f0c33d..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-; 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 14.0\VC\redist\1033\${VS_REDIST_EXE}"
-!define VS_REDIST_KEY "SOFTWARE\Classes\Installer\Products\75B815F0A80081D379E08346B5DB5B6E"
-
-InstallDir "$PROGRAMFILES64\YAZ"
-
-!include yaz.nsi
-
-