X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=win%2Fyaz.nsi;h=eaf68d81768583797722dbc9f9cdd1b557a69ea2;hb=323805b6779bcf1befdc7cdd7f10c23b06885e0d;hp=5a9f62fe9433cf702c96f92ed0abae329f52a662;hpb=da79b59082e749f9a9f40fd9805da5c81d34c4f3;p=yaz-moved-to-github.git diff --git a/win/yaz.nsi b/win/yaz.nsi index 5a9f62f..eaf68d8 100644 --- a/win/yaz.nsi +++ b/win/yaz.nsi @@ -7,6 +7,34 @@ !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 + + +RequestExecutionLevel admin + SetCompressor bzip2 Name "YAZ" @@ -170,12 +198,11 @@ SectionEnd UninstallText "This will uninstall YAZ ${VERSION} from your system" Section Uninstall -; add delete commands to delete whatever files/registry keys/etc you installed here. + ExecWait '"$INSTDIR\bin\yaz-ztest" -remove' + RMDir /r $SMPROGRAMS\YAZ Delete "$INSTDIR\uninst.exe" DeleteRegKey HKLM "SOFTWARE\Index Data\YAZ" DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" - ExecWait '"$INSTDIR\bin\yaz-ztest" -remove' - RMDir /r $SMPROGRAMS\YAZ RMDir /r $INSTDIR ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR\bin" IfFileExists $INSTDIR 0 Removed