aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Pinedo <david@lunarg.com>2016-02-08 12:20:11 -0700
committerDavid Pinedo <david@lunarg.com>2016-02-09 18:04:39 -0700
commit9dcc5ce5f9bcabf56bd9371f432e4fd90f76ffd9 (patch)
treee1ef6d406def2f737db7616533bb7c44f51ccf36
parent492c3f3f6a9c03efdfa0d56ada3ed10b5f4c25d9 (diff)
downloadusermoji-9dcc5ce5f9bcabf56bd9371f432e4fd90f76ffd9.tar.xz
winrtinstaller: install to to same dir if already installed. PUBLISHER changed.
PUBLISHER is set to YourComany, Inc by default
-rw-r--r--windowsRuntimeInstaller/InstallerRT.nsi12
1 files changed, 11 insertions, 1 deletions
diff --git a/windowsRuntimeInstaller/InstallerRT.nsi b/windowsRuntimeInstaller/InstallerRT.nsi
index 959c4263..da48b4b9 100644
--- a/windowsRuntimeInstaller/InstallerRT.nsi
+++ b/windowsRuntimeInstaller/InstallerRT.nsi
@@ -43,6 +43,7 @@
!define VERSION_MINOR "0"
!define VERSION_PATCH "1"
!define VERSION_BUILDNO "0.pre.1"
+!define PUBLISHER "YourCompany, Inc."
#!define VERSION_BUILDNO "0"
!define PRODUCTVERSION "${VERSION_API_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_BUILDNO}"
@@ -209,6 +210,14 @@ Section
${Endif}
+ ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "InstallDir"
+ strcmp $INSTDIR $0 notinstalled
+ ${If} $0 != ""
+ MessageBox MB_OK "The Window Vulkan Runtime is already installed to $0. It will be re-installed to the same folder." /SD IDOK
+ ${Endif}
+ Strcpy $INSTDIR $0
+notinstalled:
+
SetOutPath "$INSTDIR"
File ${ICOFILE}
File VULKANRT_LICENSE.RTF
@@ -234,10 +243,11 @@ Section
# Modify registry for Programs and Features
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "DisplayName" "Vulkan Run Time Libraries ${PRODUCTVERSION}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "UninstallString" "$INSTDIR\Uninstall${PRODUCTNAME}.exe"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "Publisher" "LunarG, Inc."
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "Publisher" "${PUBLISHER}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "DisplayVersion" "${PRODUCTVERSION}"
WriteRegDword HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "EstimatedSize" ${ESTIMATEDSIZE}
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "DisplayIcon" "$\"$INSTDIR\${ICOFILE}$\""
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}${PRODUCTVERSION}" "InstallDir" "$INSTDIR"
Call UninstallIfError
# Set up version number for file names