windowssdk: Fix 32-bit install issue with Powershell script.
authorMark Young <marky@lunarg.com>
Tue, 9 Feb 2016 22:30:34 +0000 (15:30 -0700)
committerMark Young <marky@lunarg.com>
Tue, 9 Feb 2016 22:30:34 +0000 (15:30 -0700)
Fix the install Powershell script which populates the ExplicitLayers
registry entries.  There were 2 problems: 1) it was using newer
Powershell commands that failed on Windows 7, 2) it was trying to
populate the 32-bit data on a 32-bit system with the 64-bit Bin
folder.

windowsRuntimeInstaller/ConfigLayersAndVulkanDLL.ps1

index 7d90f62..bf29c6c 100644 (file)
@@ -265,18 +265,30 @@ if ($ossize -eq 64) {
 # Create layer registry entries associated with Vulkan SDK from which $mrVulkanDll is from\r
 \r
 if ($mrVulkanDllInstallDir -ne "") {\r
-    New-Item -Force -ErrorAction SilentlyContinue -Path HKLM:\SOFTWARE\Khronos\Vulkan\ExplicitLayers | out-null\r
-    Get-ChildItem $mrVulkanDllInstallDir\Bin -Filter VkLayer*json |\r
-       ForEach-Object {\r
-           New-ItemProperty -Path HKLM:\SOFTWARE\Khronos\Vulkan\ExplicitLayers -Name $mrVulkanDllInstallDir\Bin\$_ -PropertyType DWord -Value 0 | out-null\r
-       }\r
-\r
-    # Create registry entires for the WOW6432Node registry only if we're targeting a 64-bit OS\r
     if ($ossize -eq 64) {\r
-        New-Item -Force -ErrorAction Ignore -Path HKLM:\SOFTWARE\WOW6432Node\Khronos\Vulkan\ExplicitLayers | out-null\r
+    \r
+        # Create registry entires in normal registry location for 64-bit items on a 64-bit OS\r
+        New-Item -Force -ErrorAction SilentlyContinue -Path HKLM:\SOFTWARE\Khronos\Vulkan\ExplicitLayers | out-null\r
+        Get-ChildItem $mrVulkanDllInstallDir\Bin -Filter VkLayer*json |\r
+           ForEach-Object {\r
+               New-ItemProperty -Path HKLM:\SOFTWARE\Khronos\Vulkan\ExplicitLayers -Name $mrVulkanDllInstallDir\Bin\$_ -PropertyType DWord -Value 0 | out-null\r
+           }\r
+\r
+        # Create registry entires for the WOW6432Node registry location for 32-bit items on a 64-bit OS\r
+        New-Item -Force -ErrorAction SilentlyContinue -Path HKLM:\SOFTWARE\WOW6432Node\Khronos\Vulkan\ExplicitLayers | out-null\r
         Get-ChildItem $mrVulkanDllInstallDir\Bin32 -Filter VkLayer*json |\r
            ForEach-Object {\r
                New-ItemProperty -Path HKLM:\SOFTWARE\WOW6432Node\Khronos\Vulkan\ExplicitLayers -Name $mrVulkanDllInstallDir\Bin32\$_ -PropertyType DWord -Value 0 | out-null\r
            }\r
+           \r
+    } else {\r
+    \r
+        # Create registry entires in normal registry location for 32-bit items on a 32-bit OS\r
+        New-Item -Force -ErrorAction SilentlyContinue -Path HKLM:\SOFTWARE\Khronos\Vulkan\ExplicitLayers | out-null\r
+        Get-ChildItem $mrVulkanDllInstallDir\Bin32 -Filter VkLayer*json |\r
+           ForEach-Object {\r
+               New-ItemProperty -Path HKLM:\SOFTWARE\Khronos\Vulkan\ExplicitLayers -Name $mrVulkanDllInstallDir\Bin32\$_ -PropertyType DWord -Value 0 | out-null\r
+           }\r
+    \r
     }\r
 }\r