Files
mesa/.gitlab-ci/windows/mesa_deps_msvc.ps1
Sil Vilerino 38d2133e3e ci: Add Windows SDK 26100 to msvc image
Keep older 10.0.20348.0 SDK as well. Also change:
mesa_deps_test_piglit - Add CMAKE_POLICY_VERSION_MINIMUM=3.5 and _UCRT_NOISY_NAN
mesa_deps_test_deqp - Add CMAKE_POLICY_VERSION_MINIMUM=3.5 and CMAKE_SYSTEM_VERSION=10.0.20348.0
meson: When building with MSVC, add -D_UCRT_NOISY_NAN to workaround Win SDK 26100

D_UCRT_NOISY_NAN is for SDK 26100 issue:
https://developercommunity.visualstudio.com/t/NAN-is-no-longer-compile-time-constant-i/10688907

Reviewed-by: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35264>
2025-06-05 22:02:01 +00:00

48 lines
1.8 KiB
PowerShell

# we want more secure TLS 1.2 for most things
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
# VS17.x is 2022
$msvc_url = 'https://aka.ms/vs/17/release/vs_buildtools.exe'
Write-Host "Downloading Visual Studio 2022 build tools at:"
Get-Date
Invoke-WebRequest -Uri $msvc_url -OutFile C:\vs_buildtools.exe
Write-Host "Installing Visual Studio 2022 at:"
Get-Date
# Command line
# https://docs.microsoft.com/en-us/visualstudio/install/command-line-parameter-examples?view=vs-2022
# Component ids
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2022
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community?view=vs-2022
Start-Process -NoNewWindow -Wait -FilePath C:\vs_buildtools.exe `
-ArgumentList `
"--wait", `
"--quiet", `
"--norestart", `
"--nocache", `
"--installPath", "C:\BuildTools", `
"--add", "Microsoft.VisualStudio.Component.VC.Redist.14.Latest", `
"--add", "Microsoft.VisualStudio.Component.VC.ASAN", ` # MSVC 2022
"--add", "Microsoft.VisualStudio.Component.VC.ATL", `
"--add", "Microsoft.VisualStudio.Component.VC.ATLMFC", `
"--add", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", `
"--add", "Microsoft.VisualStudio.Component.VC.14.29.16.11.ATL", ` # MSVC 2019
"--add", "Microsoft.VisualStudio.Component.VC.14.29.16.11.MFC", `
"--add", "Microsoft.VisualStudio.ComponentGroup.VC.Tools.142.x86.x64", `
"--add", "Microsoft.VisualStudio.Component.VC.Llvm.Clang", `
"--add", "Microsoft.VisualStudio.Component.Graphics.Tools", `
"--add", "Microsoft.VisualStudio.Component.Windows10SDK.20348", `
"--add", "Microsoft.VisualStudio.Component.Windows11SDK.26100"
if (!$?) {
Write-Host "Failed to install Visual Studio tools"
Exit 1
}
Remove-Item C:\vs_buildtools.exe -Force
Write-Host "Installing Visual Studio 2022 finished at:"
Get-Date
Exit 0