1 # Downloading specified vulkan sdk and vulkan runtime 2 # Touch this file needs update both WINDOWS_X64_BUILD_TAG WINDOWS_X64_TEST_TAG 3 # This file needs run in administrator mode 4 5 $env:VULKAN_SDK_VERSION="1.3.275.0" 6 7 $ProgressPreference = "SilentlyContinue" 8 9 # Save environment VULKAN_SDK_VERSION to system 10 [System.Environment]::SetEnvironmentVariable('VULKAN_SDK_VERSION', "$env:VULKAN_SDK_VERSION", [System.EnvironmentVariableTarget]::Machine) 11 12 $VULKAN_SDK_URL="https://sdk.lunarg.com/sdk/download/$env:VULKAN_SDK_VERSION/windows/VulkanSDK-$env:VULKAN_SDK_VERSION-Installer.exe" 13 Write-Host "Downloading Vulkan-SDK $VULKAN_SDK_URL at:" 14 Get-Date 15 Invoke-WebRequest -Uri "$VULKAN_SDK_URL" -OutFile "${env:TMP}\vulkan_sdk.exe" | Out-Null 16 Write-Host "Installing Vulkan-SDK at:" 17 Get-Date 18 Start-Process -NoNewWindow -Wait "${env:TMP}\vulkan_sdk.exe" -ArgumentList "--am --al -c in" 19 if (!$?) { 20 Write-Host "Failed to install Vulkan SDK" 21 Exit 1 22 } 23 Remove-Item "${env:TMP}\vulkan_sdk.exe" -Force 24 25 $VULKAN_RUNTIME_URL="https://sdk.lunarg.com/sdk/download/$env:VULKAN_SDK_VERSION/windows/VulkanRT-$env:VULKAN_SDK_VERSION-Installer.exe" 26 Write-Host "Downloading Vulkan-Runtime $VULKAN_RUNTIME_URL at:" 27 Get-Date 28 Invoke-WebRequest -Uri "$VULKAN_RUNTIME_URL" -OutFile "${env:TMP}\vulkan-runtime.exe" | Out-Null 29 Write-Host "Installing Vulkan-Runtime at:" 30 Get-Date 31 Start-Process -NoNewWindow -Wait "${env:TMP}\vulkan-runtime.exe" -ArgumentList '/S' 32 if (!$?) { 33 Write-Host "Failed to install Vulkan-Runtime" 34 Exit 1 35 } 36 Remove-Item "${env:TMP}\vulkan-runtime.exe" -Force 37 38 Write-Host "Installing Vulkan-Runtime finished at:" 39 Get-Date 40