nsis: Add QEMU version information to Windows registry
authorStefan Weil <sw@weilnetz.de>
Sun, 3 May 2015 17:57:09 +0000 (19:57 +0200)
committerStefan Weil <sw@weilnetz.de>
Thu, 24 Sep 2015 18:52:28 +0000 (20:52 +0200)
The uninstall keys include an option key "DisplayVersion" which we set
now. By default the version value is read from file VERSION, but it is
also possible to pass VERSION=#.#.# to make.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Makefile
qemu.nsi

index 9e75362..68e2e1b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -623,6 +623,7 @@ endif # SIGNCODE
                 $(if $(DLL_PATH),-DDLLDIR="$(DLL_PATH)") \
                 -DSRCDIR="$(SRC_PATH)" \
                 -DOUTFILE="$(INSTALLER)" \
+                -DDISPLAYVERSION="$(VERSION)" \
                 $(SRC_PATH)/qemu.nsi
        rm -r ${INSTDIR}
 ifdef SIGNCODE
index cc5fafd..a20f6ef 100644 (file)
--- a/qemu.nsi
+++ b/qemu.nsi
@@ -139,6 +139,9 @@ Section "${PRODUCT} (required)"
 
     ; Write the uninstall keys for Windows
     WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "QEMU"
+!ifdef DISPLAYVERSION
+    WriteRegStr HKLM "${UNINST_KEY}" "DisplayVersion" "${DISPLAYVERSION}"
+!endif
     WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" '"${UNINST_EXE}"'
     WriteRegDWORD HKLM "${UNINST_KEY}" "NoModify" 1
     WriteRegDWORD HKLM "${UNINST_KEY}" "NoRepair" 1