aboutsummaryrefslogtreecommitdiff
path: root/windowsRuntimeInstaller
diff options
context:
space:
mode:
authorMark Young <marky@lunarg.com>2016-06-22 16:55:31 -0600
committerMark Young <marky@lunarg.com>2016-06-22 17:00:08 -0600
commite96e38763180cfb31eecc3007feee0083d72ff5f (patch)
tree5bd16ec90c8a9421d6d9383dd38ba1a427adfa9b /windowsRuntimeInstaller
parent39d958c00aeb2c995f0f3a598388d895de8abd6e (diff)
downloadusermoji-e96e38763180cfb31eecc3007feee0083d72ff5f.tar.xz
winsdk: Fix multiple RT uninstall issue
Change originally by David Pinedo. If the same Vulkan Run-time installer is executed multiple times, it will bump the install count for the RT installation. There was a problem during uninstall which failed to look at the install count and would always remove some important files. This fixes that issue. Change-Id: I4dda50b0dbdd9ec901aa25713be7d7348f3d67ec
Diffstat (limited to 'windowsRuntimeInstaller')
-rw-r--r--windowsRuntimeInstaller/InstallerRT.nsi31
1 files changed, 22 insertions, 9 deletions
diff --git a/windowsRuntimeInstaller/InstallerRT.nsi b/windowsRuntimeInstaller/InstallerRT.nsi
index 0bfd47fb..92da3934 100644
--- a/windowsRuntimeInstaller/InstallerRT.nsi
+++ b/windowsRuntimeInstaller/InstallerRT.nsi
@@ -618,31 +618,44 @@ Section "uninstall"
# Delete vulkaninfo.exe in C:\Windows\System32 and C:\Windows\SysWOW64
Delete /REBOOTOK $WINDIR\SysWow64\vulkaninfo.exe
- Delete /REBOOTOK "$WINDIR\SysWow64\vulkaninfo-$FileVersion.exe"
Delete /REBOOTOK $WINDIR\System32\vulkaninfo.exe
- Delete /REBOOTOK "$WINDIR\System32\vulkaninfo-$FileVersion.exe"
- # Delete vullkan dll files: vulkan-<majorabi>.dll and vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>.dll
+ # Delete vulkan-<majorabi>.dll in C:\Windows\System32 and C:\Windows\SysWOW64
Delete /REBOOTOK $WINDIR\SysWow64\vulkan-${VERSION_ABI_MAJOR}.dll
- Delete /REBOOTOK $WINDIR\SysWow64\vulkan-$FileVersion.dll
Delete /REBOOTOK $WINDIR\System32\vulkan-${VERSION_ABI_MAJOR}.dll
- Delete /REBOOTOK $WINDIR\System32\vulkan-$FileVersion.dll
# Else, running on a 32-bit OS machine
${Else}
# Delete vulkaninfo.exe in C:\Windows\System32
Delete /REBOOTOK $WINDIR\System32\vulkaninfo.exe
- Delete /REBOOTOK "$WINDIR\System32\vulkaninfo-$FileVersion.exe"
- # Delete vullkan dll files: vulkan-<majorabi>.dll and vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>.dll
+ # Delete vulkan-<majorabi>.dll in C:\Windows\System32
Delete /REBOOTOK $WINDIR\System32\vulkan-${VERSION_ABI_MAJOR}.dll
- Delete /REBOOTOK $WINDIR\System32\vulkan-$FileVersion.dll
${EndIf}
StrCpy $1 80
Call un.CheckForError
+ # If Ref Count is zero, remove files in C:\Windows\System32 and C:\Windows\SysWow64
+ ${If} $IC <= 0
+
+ ${If} ${RunningX64}
+ # Delete vulkaninfo.exe in C:\Windows\System32 and C:\Windows\SysWOW64
+ Delete /REBOOTOK "$WINDIR\SysWow64\vulkaninfo-$FileVersion.exe"
+ Delete /REBOOTOK "$WINDIR\System32\vulkaninfo-$FileVersion.exe"
+ # Delete vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>.dll from sys dirs
+ Delete /REBOOTOK $WINDIR\SysWow64\vulkan-$FileVersion.dll
+ Delete /REBOOTOK $WINDIR\System32\vulkan-$FileVersion.dll
+ ${Else}
+ # Delete vulkaninfo.exe in C:\Windows\System32
+ Delete /REBOOTOK "$WINDIR\System32\vulkaninfo-$FileVersion.exe"
+ # Delete vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>.dll from sys dir
+ Delete /REBOOTOK $WINDIR\System32\vulkan-$FileVersion.dll
+ ${EndIf}
+
+ ${Endif}
+
# Run the ConfigLayersAndVulkanDLL.ps1 script to copy the most recent version of
# vulkan-<abimajor>-*.dll to vulkan-<abimajor>.dll, and to set up layer registry
# entries to use layers from the corresponding SDK
@@ -664,7 +677,7 @@ Section "uninstall"
${Endif}
Call un.CheckForError
- # If Ref Count is zero, uninstall everything
+ # If Ref Count is zero, remove install dir
${If} $IC <= 0
# Remove files in install dir