summaryrefslogtreecommitdiff
path: root/.gitlab-ci/windows/mesa_deps_vs2019.ps1
blob: 377667bea7f05f8c8a59c013f40f63bc3431df05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# we want more secure TLS 1.2 for most things
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;

# VS16.x is 2019
$msvc_2019_url = 'https://aka.ms/vs/16/release/vs_buildtools.exe'

Get-Date
Write-Host "Downloading Visual Studio 2019 build tools"
Invoke-WebRequest -Uri $msvc_2019_url -OutFile C:\vs_buildtools.exe

Get-Date
Write-Host "Installing Visual Studio 2019"
Start-Process -NoNewWindow -Wait -FilePath C:\vs_buildtools.exe `
-ArgumentList `
"--wait", `
"--quiet", `
"--norestart", `
"--nocache", `
"--installPath", "C:\BuildTools", `
"--add", "Microsoft.VisualStudio.Workload.VCTools", `
"--add", "Microsoft.VisualStudio.Workload.NativeDesktop", `
"--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"

if (!$?) {
  Write-Host "Failed to install Visual Studio tools"
  Exit 1
}
Remove-Item C:\vs_buildtools.exe -Force