1 # Downloading specified D3D 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 $ProgressPreference = "SilentlyContinue" 6 7 $depsInstallPath="C:\mesa-deps" 8 9 Write-Host "Downloading DirectX 12 Agility SDK at:" 10 Get-Date 11 Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/Microsoft.Direct3D.D3D12/1.614.1 -OutFile 'agility.zip' 12 Expand-Archive -Path 'agility.zip' -DestinationPath 'C:\agility' 13 # Copy Agility SDK into mesa-deps\bin\D3D12 14 New-Item -ErrorAction SilentlyContinue -ItemType Directory -Path $depsInstallPath\bin -Name 'D3D12' 15 Copy-Item 'C:\agility\build\native\bin\x64\*.dll' -Destination $depsInstallPath\bin\D3D12 16 Remove-Item 'agility.zip' 17 Remove-Item -Recurse 'C:\agility' 18 19 Write-Host "Downloading Updated WARP at:" 20 Get-Date 21 Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/Microsoft.Direct3D.WARP/1.0.11 -OutFile 'warp.zip' 22 Expand-Archive -Path 'warp.zip' -DestinationPath 'C:\warp' 23 # Copy WARP into mesa-deps\bin 24 Copy-Item 'C:\warp\build\native\amd64\d3d10warp.dll' -Destination $depsInstallPath\bin 25 Remove-Item 'warp.zip' 26 Remove-Item -Recurse 'C:\warp' 27 28 Write-Host "Downloading DirectXShaderCompiler release at:" 29 Get-Date 30 Invoke-WebRequest -Uri https://github.com/microsoft/DirectXShaderCompiler/releases/download/v1.8.2403/dxc_2024_03_07.zip -OutFile 'DXC.zip' 31 Expand-Archive -Path 'DXC.zip' -DestinationPath 'C:\DXC' 32 # No more need to get dxil.dll from the VS install 33 Copy-Item 'C:\DXC\bin\x64\*.dll' -Destination 'C:\Windows\System32' 34 Remove-Item -Recurse 'DXC.zip' 35 Remove-Item -Recurse 'C:\DXC' 36 37 Write-Host "Enabling developer mode at:" 38 Get-Date 39 # Create AppModelUnlock if it doesn't exist, required for enabling Developer Mode 40 $RegistryKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" 41 if (-not(Test-Path -Path $RegistryKeyPath)) { 42 New-Item -Path $RegistryKeyPath -ItemType Directory -Force 43 } 44 45 # Add registry value to enable Developer Mode 46 New-ItemProperty -Path $RegistryKeyPath -Name AllowDevelopmentWithoutDevLicense -PropertyType DWORD -Value 1 -Force 47 48 Write-Host "Complete download D3D at:" 49 Get-Date 50