ci/vs2019: Reduce the vs2019 build tools components to be installed

NOTE:
  Microsoft.VisualStudio.Component.Windows10SDK.19041 are part of
  Microsoft.VisualStudio.Workload.NativeDesktop, so it's actually using Windows10SDK.19041 before,
  not Windows10SDK.18362

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16934>
This commit is contained in:
Yonggang Luo 2022-06-08 14:20:15 +08:00 committed by Marge Bot
parent 6d23d87325
commit 33e5b08a7d
1 changed files with 8 additions and 4 deletions

View File

@ -10,6 +10,11 @@ Invoke-WebRequest -Uri $msvc_2019_url -OutFile C:\vs_buildtools.exe
Get-Date
Write-Host "Installing Visual Studio 2019"
# Command line
# https://docs.microsoft.com/en-us/visualstudio/install/command-line-parameter-examples?view=vs-2019
# Component ids
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2019
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community?view=vs-2019
Start-Process -NoNewWindow -Wait -FilePath C:\vs_buildtools.exe `
-ArgumentList `
"--wait", `
@ -17,14 +22,13 @@ Start-Process -NoNewWindow -Wait -FilePath C:\vs_buildtools.exe `
"--norestart", `
"--nocache", `
"--installPath", "C:\BuildTools", `
"--add", "Microsoft.VisualStudio.Workload.VCTools", `
"--add", "Microsoft.VisualStudio.Workload.NativeDesktop", `
"--add", "Microsoft.VisualStudio.Component.VC.ASAN", `
"--add", "Microsoft.VisualStudio.Component.VC.Redist.14.Latest", `
"--add", "Microsoft.VisualStudio.Component.VC.ATL", `
"--add", "Microsoft.VisualStudio.Component.VC.ATLMFC", `
"--add", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", `
"--add", "Microsoft.VisualStudio.Component.Graphics.Tools", `
"--add", "Microsoft.VisualStudio.Component.Windows10SDK.18362", `
"--includeRecommended"
"--add", "Microsoft.VisualStudio.Component.Windows10SDK.19041"
if (!$?) {
Write-Host "Failed to install Visual Studio tools"