Debian Codegraph @

.gitlab-ci/windows/monado_deps_vs2022.ps1

raw
1 # Copyright 2019-2022, Mesa contributors
2 # Copyright 2022, Collabora, Ltd.
3 # SPDX-License-Identifier: MIT
4 # Based on https://gitlab.freedesktop.org/mesa/mesa/-/blob/8396df5ad90aeb6ab2267811aba2187954562f81/.gitlab-ci/windows/mesa_deps_vs2019.ps1
5
6 # we want more secure TLS 1.2 for most things
7 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
8
9 # VS17.x is 2022
10 $msvc_url = 'https://aka.ms/vs/17/release/vs_buildtools.exe'
11
12 Get-Date
13 Write-Host "Downloading Visual Studio 2022 build tools"
14 Invoke-WebRequest -Uri $msvc_url -OutFile C:\vs_buildtools.exe -UseBasicParsing
15
16 Get-Date
17 Write-Host "Installing Visual Studio"
18 $vsInstallerArgs = @(
19 "--wait"
20 "--quiet"
21 "--norestart"
22 "--nocache"
23 "--installPath"
24 "C:\BuildTools"
25 "--add"
26 "Microsoft.VisualStudio.Component.VC.CoreBuildTools"
27 "--add"
28 "Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core"
29 "--add"
30 "Microsoft.VisualStudio.Component.Windows10SDK"
31 "--add"
32 "Microsoft.VisualStudio.Component.Windows11SDK.22000"
33 "--add"
34 "Component.Microsoft.Windows.CppWinRT"
35 "--add"
36 "Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
37 )
38 Start-Process -NoNewWindow -Wait C:\vs_buildtools.exe -ArgumentList $vsInstallerArgs
39 if (!$?) {
40 Write-Host "Failed to install Visual Studio tools"
41 Exit 1
42 }
43 Remove-Item C:\vs_buildtools.exe -Force