summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYedidyah Bar David <didi@redhat.com>2015-11-12 09:06:27 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2015-11-19 14:29:03 +0100
commit84eaba0a5da654a250f6615d3215ad0bd3de3d67 (patch)
tree38d11d7df9bf4dddadaa129abc30ce7e2e415bc1
parent09348d8884851fc99f4739e7a6b48ba889d9cf45 (diff)
Allow custom installer filename and displayed name version
Allow passing: DISPLAYED_VERSION (defaults to $VERSION): what's written to the registry. This is what is shown to the user e.g. in the control panel. EXE_VERSION (defaults to -$VERSION): appended to installer filename. Not touching VERSION, which reflects the version of the installer's source code. Change-Id: Id60a990aea8e9148c0cd47dd685f9681395ac624 Signed-off-by: Yedidyah Bar David <didi@redhat.com>
-rw-r--r--win-guest-tools.nsis12
1 files changed, 10 insertions, 2 deletions
diff --git a/win-guest-tools.nsis b/win-guest-tools.nsis
index ab20dcf..b234afa 100644
--- a/win-guest-tools.nsis
+++ b/win-guest-tools.nsis
@@ -40,6 +40,7 @@ SetCompressor /SOLID lzma
!include "WinVer.nsh"
!include "x64.nsh"
+
!ifdef SPICE
!define FILENAME "spice-guest-tools"
!define NAME "SPICE Guest Tools"
@@ -55,11 +56,18 @@ SetCompressor /SOLID lzma
!else
!error "OVIRT or SPICE symbol should passed to makensis with the -D flag"
!endif
+
!define VERSION "0.103"
+!ifndef DISPLAYED_VERSION
+!define DISPLAYED_VERSION "${VERSION}"
+!endif
+!ifndef EXE_VERSION
+!define EXE_VERSION "-${VERSION}"
+!endif
Name "${NAME}"
Caption "${NAME} Installer"
-OutFile "${FILENAME}-${VERSION}.exe"
+OutFile "${FILENAME}${EXE_VERSION}.exe"
InstallDir "$PROGRAMFILES\${NAME}"
BrandingText " "
@@ -184,7 +192,7 @@ Section "install"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${REGKEYNAME}" \
"DisplayName" "${NAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${REGKEYNAME}" \
- "DisplayVersion" "${VERSION}"
+ "DisplayVersion" "${DISPLAYED_VERSION}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${REGKEYNAME}" \
"Publisher" "${PUBLISHER}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${REGKEYNAME}" \