From 52e35b3aa838ea1198aec9a97c36cf3d167071a2 Mon Sep 17 00:00:00 2001 From: Ivan Habunek Date: Thu, 13 Sep 2012 09:30:03 -0700 Subject: Minor improvements to the NSIS installer script VIProductVersion requires to have the version number in x.x.x.x format so I added a separate constant SUBSURFACE_VIPRODUCTVERSION for that purpose. Also renamed VERSION to SUBSURFACE_VERSION for consistency. As Lubomir suggested on the mailing list, the installer will now delete any DLL files found in the target folder to prevent buildup of old versions of libraries when upgrading subsurface. Signed-Off-By: Ivan Habunek Cleaned up whitespace issues Signed-off-by: Dirk Hohndel --- packaging/windows/subsurface.nsi | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/packaging/windows/subsurface.nsi b/packaging/windows/subsurface.nsi index c48747746..1828c118a 100644 --- a/packaging/windows/subsurface.nsi +++ b/packaging/windows/subsurface.nsi @@ -17,12 +17,16 @@ #-------------------------------- # General - !define VERSION "1.2" + # Program version + !define SUBSURFACE_VERSION "1.2" + + # VIProductVersion requires version in x.x.x.x format + !define SUBSURFACE_VIPRODUCTVERSION "1.2.0.0" # Installer name and filename Name "Subsurface" - Caption "Subsurface ${VERSION} Setup" - OutFile "subsurface-${VERSION}.exe" + Caption "Subsurface ${SUBSURFACE_VERSION} Setup" + OutFile "subsurface-${SUBSURFACE_VERSION}.exe" # Icon to use for the installer !define MUI_ICON "subsurface.ico" @@ -39,12 +43,12 @@ #-------------------------------- # Version information - VIProductVersion "${VERSION}" + VIProductVersion "${SUBSURFACE_VIPRODUCTVERSION}" VIAddVersionKey "ProductName" "Subsurface" VIAddVersionKey "FileDescription" "Subsurface - an open source dive log program." - VIAddVersionKey "FileVersion" "${VERSION}" + VIAddVersionKey "FileVersion" "${SUBSURFACE_VERSION}" VIAddVersionKey "LegalCopyright" "GPL v.2" - VIAddVersionKey "ProductVersion" "${VERSION}" + VIAddVersionKey "ProductVersion" "${SUBSURFACE_VERSION}" #-------------------------------- # Settings @@ -88,6 +92,10 @@ Section # Installation path SetOutPath "$INSTDIR" + # Delete any already installed DLLs to avoid buildup of various + # versions of the same library when upgrading + Delete "$INSTDIR\*.dll" + # Files to include in installer file /oname=subsurface.exe ..\..\subsurface.exe file /oname=subsurface.ico subsurface.ico -- cgit v1.2.3-70-g09d2