David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 1 | #
|
| 2 | # Copyright (C) 2016 Valve Corporation
|
| 3 | #
|
| 4 | # Permission is hereby granted, free of charge, to any person obtaining a
|
| 5 | # copy of this software and associated documentation files (the "Software"),
|
| 6 | # to deal in the Software without restriction, including without limitation
|
| 7 | # the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
| 8 | # and/or sell copies of the Software, and to permit persons to whom the
|
| 9 | # Software is furnished to do so, subject to the following conditions:
|
| 10 | #
|
| 11 | # The above copyright notice and this permission notice shall be included
|
| 12 | # in all copies or substantial portions of the Software.
|
| 13 | #
|
| 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
| 17 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
| 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
| 20 | # DEALINGS IN THE SOFTWARE.
|
| 21 | #
|
| 22 | # Author: David Pinedo <david@LunarG.com>
|
| 23 | #
|
| 24 |
|
| 25 | # This Powershell script is used by the Vulkan Run Time Installer/Uninstaller to:
|
| 26 | # - Copy the most recent vulkan-<majorabi>-*.dll in C:\Windows\System32
|
| 27 | # to vulkan-<majorabi>.dll
|
| 28 | # - Copy the most recent version of vulkaninfo-<abimajor>-*.exe in
|
| 29 | # C:\Windows\System32 to vulkaninfo.exe
|
Mark Young | 4b8b548 | 2016-01-15 15:09:39 -0700 | [diff] [blame] | 30 | # - The same thing is done for those files in C:\Windows\SysWOW64 on a 64-bit
|
| 31 | # target.
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 32 | # - Set the layer registry entries to point to the layer json files
|
| 33 | # in the Vulkan SDK associated with the most recent vulkan*dll.
|
| 34 | #
|
Mark Young | af87f22 | 2016-01-20 16:33:18 -0700 | [diff] [blame^] | 35 | # This script takes the following parameters:
|
Mark Young | 4b8b548 | 2016-01-15 15:09:39 -0700 | [diff] [blame] | 36 | # $majorabi : a single string number specifying the major abi version.
|
Mark Young | af87f22 | 2016-01-20 16:33:18 -0700 | [diff] [blame^] | 37 | # $ossize : an integer indicating if the target is a 64 (64) or 32 (32) bit OS.
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 38 | #
|
| 39 |
|
Mark Young | 4b8b548 | 2016-01-15 15:09:39 -0700 | [diff] [blame] | 40 | Param(
|
| 41 | [string]$majorabi,
|
| 42 | [int]$ossize
|
| 43 | )
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 44 |
|
| 45 | $vulkandll = "vulkan-"+$majorabi+".dll"
|
| 46 |
|
| 47 | # The name of the versioned vulkan dll file is one of the following:
|
| 48 | #
|
David Pinedo | 3bdbe5d | 2016-01-12 16:14:53 -0700 | [diff] [blame] | 49 | # vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>-<prerelease>-<prebuildno>
|
| 50 | # vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>-<prerelease>
|
| 51 | # vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>-<prebuildno>
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 52 | # vulkan-<majorabi>-<major>-<minor>-<patch>-<buildno>.dll
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 53 | #
|
David Pinedo | 3bdbe5d | 2016-01-12 16:14:53 -0700 | [diff] [blame] | 54 | # <major>, <minor>, <patch>, <buildno> and <prebuildno> are 1 to 10 numeric digits.
|
| 55 | # <prerelease> is any combination of alpha and numeric characters.
|
| 56 | # If <prerelease> and/or <prebuildno> are present, this identifies a prerelease,
|
| 57 | # and the vulkan dll file will be considered less recent than one with the same
|
| 58 | # <major>, <minor>, <patch>, <buildno> numbers without the <prerelease> and/or
|
| 59 | # <prebuildno>.
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 60 |
|
| 61 |
|
| 62 | # We first create an array, with one array element for each vulkan-*dll in
|
Mark Young | 4b8b548 | 2016-01-15 15:09:39 -0700 | [diff] [blame] | 63 | # C:\Windows\System32 (and C:\Windows\SysWOW64 on 64-bit systems), with each element
|
| 64 | # containing:
|
David Pinedo | 3bdbe5d | 2016-01-12 16:14:53 -0700 | [diff] [blame] | 65 | # <major>=<minor>=<patch>=<buildno>=<prerelease>=<prebuildno>=
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 66 | # filename
|
David Pinedo | 3bdbe5d | 2016-01-12 16:14:53 -0700 | [diff] [blame] | 67 | # @<major>@<minor>@<patch>@<buildno>@<prerelease>@<prebuildno>@
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 68 | # [Note that the above three lines are one element in the array.]
|
| 69 | # The build identifiers separated by "=" are suitable for sorting, i.e.
|
David Pinedo | 3bdbe5d | 2016-01-12 16:14:53 -0700 | [diff] [blame] | 70 | # expanded to 10 digits with leading 0s. If <prerelease> or <prebuildno> are
|
| 71 | # not specified, "zzzzzzzzzz" is substituted for them, so that they sort
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 72 | # to a position after those that do specify them.
|
| 73 | # The build identifiers separated by "@" are the original values extracted
|
| 74 | # from the file name. They are used later to find the path to the SDK
|
| 75 | # install directory for the given filename.
|
| 76 |
|
Mark Young | d6897a3 | 2016-01-20 14:48:21 -0700 | [diff] [blame] | 77 | function UpdateVulkanSysFolder([string]$dir, [int]$writeSdkName)
|
Mark Young | a81e608 | 2016-01-15 12:35:39 -0700 | [diff] [blame] | 78 | {
|
| 79 | # Push the current path on the stack and go to $dir
|
| 80 | Push-Location -Path $dir
|
| 81 |
|
| 82 | # Create a list for all the DLLs in the folder
|
| 83 | $VulkanDllList=@()
|
| 84 |
|
| 85 | # Find all DLL objects in this directory
|
| 86 | dir -name vulkan-$majorabi-*.dll |
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 87 | ForEach-Object {
|
| 88 | $major=$_.Split('-')[2]
|
| 89 | $majorOrig=$major
|
| 90 | $minor=$_.Split('-')[3]
|
| 91 | $minorOrig=$minor
|
| 92 | $patch=$_.Split('-')[4]
|
David Pinedo | 3bdbe5d | 2016-01-12 16:14:53 -0700 | [diff] [blame] | 93 | $patchOrig=$patch
|
| 94 | $buildno=$_.Split('-')[5]
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 95 |
|
David Pinedo | 3bdbe5d | 2016-01-12 16:14:53 -0700 | [diff] [blame] | 96 | if ($buildno -match ".dll") {
|
| 97 | # <prerelease> and <prebuildno> are not in the name
|
| 98 | $buildno=$buildno -replace ".dll",""
|
| 99 | $buildnoOrig=$buildno
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 100 | $prerelease="z"*10
|
| 101 | $prereleaseOrig=""
|
David Pinedo | 3bdbe5d | 2016-01-12 16:14:53 -0700 | [diff] [blame] | 102 | $prebuildno="z"*10
|
| 103 | $prebuildnoOrig=""
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 104 | } else {
|
| 105 |
|
| 106 | # We assume we don't have more than 5 dashes
|
| 107 |
|
| 108 | $f=$_ -replace ".dll",""
|
David Pinedo | 3bdbe5d | 2016-01-12 16:14:53 -0700 | [diff] [blame] | 109 | $buildno=$f.Split('-')[5]
|
David Pinedo | 5da20dd | 2016-01-13 16:22:19 -0700 | [diff] [blame] | 110 | $buildnoOrig=$buildno
|
David Pinedo | 3bdbe5d | 2016-01-12 16:14:53 -0700 | [diff] [blame] | 111 | $prerelease=$f.Split('-')[6]
|
| 112 | $prebuildno=$f.Split('-')[7]
|
| 113 | if ($prebuildno.Length -eq 0) {
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 114 | if ($prerelease -match "^[0-9]") {
|
David Pinedo | 3bdbe5d | 2016-01-12 16:14:53 -0700 | [diff] [blame] | 115 | # prerelease starts with a digit, it must be the prebuildno
|
| 116 | $prebuildno=$prerelease
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 117 | $prerelease=""
|
| 118 | }
|
| 119 | }
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 120 | $prereleaseOrig=$prerelease
|
David Pinedo | 3bdbe5d | 2016-01-12 16:14:53 -0700 | [diff] [blame] | 121 | $prebuildnoOrig=$prebuildno
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 122 |
|
| 123 | if ($prerelease.Length -eq 0) {
|
| 124 | $prerelease="z"*10
|
| 125 | }
|
David Pinedo | 3bdbe5d | 2016-01-12 16:14:53 -0700 | [diff] [blame] | 126 | if ($prebuildno.Length -eq 0) {
|
| 127 | $prebuildno="z"*10
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 128 | }
|
| 129 | }
|
| 130 |
|
| 131 | $major = $major.padleft(10,'0')
|
| 132 | $minor = $minor.padleft(10,'0')
|
| 133 | $patch = $patch.padleft(10,'0')
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 134 | $buildno = $buildno.padleft(10,'0')
|
David Pinedo | 3bdbe5d | 2016-01-12 16:14:53 -0700 | [diff] [blame] | 135 | $prerelease = $prerelease.padleft(10,'0')
|
| 136 | $prebuildno = $prebuildno.padleft(10,'0')
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 137 |
|
| 138 | # Add a new element to the $VulkanDllList array
|
David Pinedo | 5da20dd | 2016-01-13 16:22:19 -0700 | [diff] [blame] | 139 | $VulkanDllList+="$major=$minor=$patch=$buildno=$prerelease=$prebuildno= $_ @$majorOrig@$minorOrig@$patchOrig@$buildnoOrig@$prereleaseOrig@$prebuildnoOrig@"
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 140 | }
|
| 141 |
|
Mark Young | a81e608 | 2016-01-15 12:35:39 -0700 | [diff] [blame] | 142 | # If $VulkanDllList contains at least one element, there's at least one vulkan*.dll file.
|
| 143 | # Copy the most recent vulkan*.dll (named in the last element of $VulkanDllList) to vulkan-$majorabi.dll.
|
| 144 | # TODO: In the future, also copy the corresponding vulkaninfo-*.exe to vulkaninfo.exe.
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 145 |
|
Mark Young | a81e608 | 2016-01-15 12:35:39 -0700 | [diff] [blame] | 146 | if ($VulkanDllList.Length -gt 0) {
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 147 |
|
Mark Young | a81e608 | 2016-01-15 12:35:39 -0700 | [diff] [blame] | 148 | # Sort the list. The most recent vulkan-*.dll will be in the last element of the list.
|
| 149 | [array]::sort($VulkanDllList)
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 150 |
|
Mark Young | a81e608 | 2016-01-15 12:35:39 -0700 | [diff] [blame] | 151 | # Put the name of the most recent vulkan-*.dll in $mrVulkanDLL.
|
| 152 | # The most recent vulkanDLL is the second word in the last element of the
|
| 153 | # sorted $VulkanDllList. Copy it to $vulkandll.
|
| 154 | $mrVulkanDll=$VulkanDllList[-1].Split(' ')[1]
|
| 155 | copy $mrVulkanDll $vulkandll
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 156 |
|
Mark Young | a81e608 | 2016-01-15 12:35:39 -0700 | [diff] [blame] | 157 | # Copy the most recent version of vulkaninfo-<abimajor>-*.exe to vulkaninfo.exe.
|
| 158 | # We create the source file name for the copy from $mrVulkanDll.
|
| 159 | $mrVulkaninfo=$mrVulkanDll -replace ".dll",".exe"
|
| 160 | $mrVulkaninfo=$mrVulkaninfo -replace "vulkan","vulkaninfo"
|
| 161 | copy $mrVulkaninfo vulkaninfo.exe
|
| 162 |
|
| 163 | # Create the name used in the registry for the SDK associated with $mrVulkanDll.
|
| 164 | $major=$VulkanDLLList[-1].Split('@')[1]
|
| 165 | $minor=$VulkanDLLList[-1].Split('@')[2]
|
| 166 | $patch=$VulkanDLLList[-1].Split('@')[3]
|
| 167 | $buildno=$VulkanDLLList[-1].Split('@')[4]
|
| 168 | $prerelease=$VulkanDLLList[-1].Split('@')[5]
|
| 169 | $prebuildno=$VulkanDLLList[-1].Split('@')[6]
|
Mark Young | d6897a3 | 2016-01-20 14:48:21 -0700 | [diff] [blame] | 170 |
|
| 171 | $sdktempname="VulkanSDK"+$major + "." + $minor + "." + $patch + "." + $buildno
|
Mark Young | a81e608 | 2016-01-15 12:35:39 -0700 | [diff] [blame] | 172 | if ($prerelease -ne "") {
|
Mark Young | d6897a3 | 2016-01-20 14:48:21 -0700 | [diff] [blame] | 173 | $sdktempname=$sdktempname + "." + $prerelease
|
Mark Young | a81e608 | 2016-01-15 12:35:39 -0700 | [diff] [blame] | 174 | }
|
| 175 | if ($prebuildno -ne "") {
|
Mark Young | d6897a3 | 2016-01-20 14:48:21 -0700 | [diff] [blame] | 176 | $sdktempname=$sdktempname + "." + $prebuildno
|
Mark Young | a81e608 | 2016-01-15 12:35:39 -0700 | [diff] [blame] | 177 | }
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 178 | }
|
Mark Young | a81e608 | 2016-01-15 12:35:39 -0700 | [diff] [blame] | 179 |
|
Mark Young | d6897a3 | 2016-01-20 14:48:21 -0700 | [diff] [blame] | 180 | # Return to our previous folder
|
| 181 | Pop-Location
|
| 182 |
|
| 183 | # Only update the overall script-scope SDK name if we're told to
|
| 184 | if ($writeSdkName -ne 0) {
|
| 185 | $script:sdkname = $sdktempname
|
| 186 | }
|
| 187 |
|
| 188 | return
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 189 | }
|
| 190 |
|
Mark Young | 4b8b548 | 2016-01-15 15:09:39 -0700 | [diff] [blame] | 191 | # We only care about SYSWOW64 if we're targeting a 64-bit OS
|
Mark Young | b628d16 | 2016-01-19 15:29:34 -0700 | [diff] [blame] | 192 | if ($ossize -eq 64) {
|
Mark Young | 4b8b548 | 2016-01-15 15:09:39 -0700 | [diff] [blame] | 193 | # Update the SYSWOW64 Vulkan DLLS/EXEs
|
Mark Young | d6897a3 | 2016-01-20 14:48:21 -0700 | [diff] [blame] | 194 | UpdateVulkanSysFolder c:\WINDOWS\SYSWOW64 0
|
Mark Young | 4b8b548 | 2016-01-15 15:09:39 -0700 | [diff] [blame] | 195 | }
|
| 196 |
|
| 197 | # Update the SYSTEM32 Vulkan DLLS/EXEs
|
Mark Young | d6897a3 | 2016-01-20 14:48:21 -0700 | [diff] [blame] | 198 | UpdateVulkanSysFolder c:\WINDOWS\SYSTEM32 1
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 199 |
|
| 200 | # Create an array of vulkan sdk install dirs
|
| 201 |
|
| 202 | $mrVulkanDllInstallDir=""
|
| 203 | $VulkanSdkDirs=@()
|
| 204 | Get-ChildItem -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall |
|
| 205 | ForEach-Object {
|
| 206 | $regkey=$_ -replace ".*\\",""
|
| 207 | if ($_ -match "\\VulkanSDK") {
|
| 208 | # Get the install path from UninstallString
|
| 209 | $tmp=Get-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$regkey -Name UninstallString
|
| 210 | $tmp=$tmp -replace "\\Uninstall.exe.*",""
|
| 211 | $tmp=$tmp -replace ".*=.",""
|
| 212 | $VulkanSdkDirs+=$tmp
|
Mark Young | d6897a3 | 2016-01-20 14:48:21 -0700 | [diff] [blame] | 213 | if ($regkey -eq $script:sdkname) {
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 214 | # Save away the sdk install dir for the the most recent vulkandll
|
| 215 | $mrVulkanDllInstallDir=$tmp
|
| 216 | }
|
| 217 | }
|
| 218 | }
|
| 219 |
|
| 220 | # Add C:\Vulkan\SDK\0.9.3 to list of SDK install dirs.
|
| 221 | # We do this because there is in a bug in SDK 0.9.3 in which layer
|
| 222 | # reg entries were not removed on uninstall. So we'll try to clean up
|
| 223 | # and remove them now.
|
| 224 | # This works only if 0.9.3 was installed to the default location.
|
| 225 | # If it was not installed to the default location, those entries will
|
| 226 | # need to be cleaned up manually.
|
| 227 |
|
| 228 | $VulkanSdkDirs+="C:\VulkanSDK\0.9.3"
|
| 229 |
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 230 | # Remove layer registry entries associated with all installed Vulkan SDKs.
|
| 231 | # Note that we remove only those entries created by Vulkan SDKs. If other
|
| 232 | # layers were installed that are not from an SDK, we don't mess with them.
|
| 233 |
|
| 234 | Get-Item -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ExplicitLayers | Select-Object -ExpandProperty Property |
|
| 235 | ForEach-Object {
|
| 236 | $regval=$_
|
| 237 | ForEach ($sdkdir in $VulkanSdkDirs) {
|
| 238 | if ($regval -like "$sdkdir\*.json") {
|
David Pinedo | 9bb478f | 2016-01-19 21:19:11 -0700 | [diff] [blame] | 239 | Remove-ItemProperty -ErrorAction SilentlyContinue -Path HKLM:\SOFTWARE\Khronos\Vulkan\ExplicitLayers -name $regval
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 240 | }
|
| 241 | }
|
| 242 | }
|
Mark Young | b628d16 | 2016-01-19 15:29:34 -0700 | [diff] [blame] | 243 | # Remove 32-bit layer registry entries if we're targeting a 64-bit OS
|
| 244 | if ($ossize -eq 64) {
|
| 245 | Get-Item -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Khronos\Vulkan\ExplicitLayers | Select-Object -ExpandProperty Property |
|
| 246 | ForEach-Object {
|
| 247 | $regval=$_
|
| 248 | ForEach ($sdkdir in $VulkanSdkDirs) {
|
| 249 | if ($regval -like "$sdkdir\*.json") {
|
Mark Young | d6897a3 | 2016-01-20 14:48:21 -0700 | [diff] [blame] | 250 | Remove-ItemProperty -ErrorAction SilentlyContinue -Path HKLM:\SOFTWARE\WOW6432Node\Khronos\Vulkan\ExplicitLayers -name $regval
|
Mark Young | b628d16 | 2016-01-19 15:29:34 -0700 | [diff] [blame] | 251 | }
|
| 252 | }
|
| 253 | }
|
| 254 | }
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 255 |
|
| 256 |
|
| 257 | # Create layer registry entries associated with Vulkan SDK from which $mrVulkanDll is from
|
| 258 |
|
| 259 | if ($mrVulkanDllInstallDir -ne "") {
|
David Pinedo | 9bb478f | 2016-01-19 21:19:11 -0700 | [diff] [blame] | 260 | New-Item -Force -ErrorAction SilentlyContinue -Path HKLM:\SOFTWARE\Khronos\Vulkan\ExplicitLayers | out-null
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 261 | Get-ChildItem $mrVulkanDllInstallDir\Bin -Filter *json |
|
| 262 | ForEach-Object {
|
| 263 | New-ItemProperty -Path HKLM:\SOFTWARE\Khronos\Vulkan\ExplicitLayers -Name $mrVulkanDllInstallDir\Bin\$_ -PropertyType DWord -Value 0 | out-null
|
| 264 | }
|
Mark Young | b628d16 | 2016-01-19 15:29:34 -0700 | [diff] [blame] | 265 |
|
| 266 | # Create registry entires for the WOW6432Node registry only if we're targeting a 64-bit OS
|
| 267 | if ($ossize -eq 64) {
|
| 268 | New-Item -Force -ErrorAction Ignore -Path HKLM:\SOFTWARE\WOW6432Node\Khronos\Vulkan\ExplicitLayers | out-null
|
| 269 | Get-ChildItem $mrVulkanDllInstallDir\Bin32 -Filter *json |
|
| 270 | ForEach-Object {
|
Mark Young | d6897a3 | 2016-01-20 14:48:21 -0700 | [diff] [blame] | 271 | New-ItemProperty -Path HKLM:\SOFTWARE\WOW6432Node\Khronos\Vulkan\ExplicitLayers -Name $mrVulkanDllInstallDir\Bin32\$_ -PropertyType DWord -Value 0 | out-null
|
Mark Young | b628d16 | 2016-01-19 15:29:34 -0700 | [diff] [blame] | 272 | }
|
| 273 | }
|
David Pinedo | c21fdb9 | 2016-01-04 16:31:57 -0700 | [diff] [blame] | 274 | }
|