mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 12:57:49 +08:00
62d01b70df
* Cherry pick new KDF5 dependencies from #27454 * Update PowerShell Core to 7.3.0 * PASSING, REMOVE FROM FAIL LIST: cgicc:arm-uwp (C:\a\1\s\scripts\azure-pipelines/../ci.baseline.txt). PASSING, REMOVE FROM FAIL LIST: cgicc:x64-uwp (C:\a\1\s\scripts\azure-pipelines/../ci.baseline.txt). PASSING, REMOVE FROM FAIL LIST: soci:arm-uwp (C:\a\1\s\scripts\azure-pipelines/../ci.baseline.txt). PASSING, REMOVE FROM FAIL LIST: soci:x64-uwp (C:\a\1\s\scripts\azure-pipelines/../ci.baseline.txt). PASSING, REMOVE FROM FAIL LIST: spirv-tools:arm-uwp (C:\a\1\s\scripts\azure-pipelines/../ci.baseline.txt). PASSING, REMOVE FROM FAIL LIST: spirv-tools:x64-uwp (C:\a\1\s\scripts\azure-pipelines/../ci.baseline.txt). * Add a Windows 10 SDK that CMake requires for uwp projects. * Update pools. * [hunspell] Remove deprecated minimal rebuild switch. Fixes build break first detected in: https://github.com/microsoft/vcpkg/pull/27718 Submitted upstream as: https://github.com/hunspell/hunspell/pull/890 * [rttr] Add upstream patch for missing #include<string> Resolves build failure detected in https://github.com/microsoft/vcpkg/pull/27718 * [chakracore] Avoid race condition on generated headers.
91 lines
2.9 KiB
PowerShell
91 lines
2.9 KiB
PowerShell
# Copyright (c) Microsoft Corporation.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
# REPLACE WITH DROP-TO-ADMIN-USER-PREFIX.ps1
|
|
|
|
# REPLACE WITH UTILITY-PREFIX.ps1
|
|
|
|
$VisualStudioBootstrapperUrl = 'https://aka.ms/vs/17/release/vs_enterprise.exe'
|
|
$Workloads = @(
|
|
'Microsoft.VisualStudio.Workload.NativeDesktop',
|
|
'Microsoft.VisualStudio.Workload.Universal',
|
|
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
|
|
'Microsoft.VisualStudio.Component.VC.Tools.ARM',
|
|
'Microsoft.VisualStudio.Component.VC.Tools.ARM64',
|
|
'Microsoft.VisualStudio.Component.VC.ATL',
|
|
'Microsoft.VisualStudio.Component.VC.ATLMFC',
|
|
'Microsoft.VisualStudio.Component.VC.ATL.ARM',
|
|
'Microsoft.VisualStudio.Component.VC.ATL.ARM64',
|
|
'Microsoft.VisualStudio.Component.VC.MFC.ARM',
|
|
'Microsoft.VisualStudio.Component.VC.MFC.ARM64',
|
|
"Microsoft.VisualStudio.Component.Windows11SDK.22621",
|
|
"Microsoft.VisualStudio.Component.Windows10SDK.20348",
|
|
'Microsoft.Net.Component.4.8.SDK',
|
|
'Microsoft.Net.Component.4.7.2.TargetingPack',
|
|
'Microsoft.Component.NetFX.Native',
|
|
'Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset',
|
|
'Microsoft.VisualStudio.Component.VC.Llvm.Clang',
|
|
'Microsoft.VisualStudio.ComponentGroup.UWP.VC.BuildTools',
|
|
'Microsoft.VisualStudio.Component.VC.CMake.Project'
|
|
)
|
|
|
|
<#
|
|
.SYNOPSIS
|
|
Install Visual Studio.
|
|
|
|
.DESCRIPTION
|
|
InstallVisualStudio takes the $Workloads array, and installs it with the
|
|
installer that's pointed at by $BootstrapperUrl.
|
|
|
|
.PARAMETER Workloads
|
|
The set of VS workloads to install.
|
|
|
|
.PARAMETER BootstrapperUrl
|
|
The URL of the Visual Studio installer, i.e. one of vs_*.exe.
|
|
|
|
.PARAMETER InstallPath
|
|
The path to install Visual Studio at.
|
|
|
|
.PARAMETER Nickname
|
|
The nickname to give the installation.
|
|
#>
|
|
Function InstallVisualStudio {
|
|
Param(
|
|
[String[]]$Workloads,
|
|
[String]$BootstrapperUrl,
|
|
[String]$InstallPath = $null,
|
|
[String]$Nickname = $null
|
|
)
|
|
|
|
try {
|
|
Write-Host 'Downloading Visual Studio...'
|
|
[string]$bootstrapperExe = Get-TempFilePath -Extension 'exe'
|
|
curl.exe -L -o $bootstrapperExe -s -S $BootstrapperUrl
|
|
Write-Host 'Installing Visual Studio...'
|
|
$vsArgs = @('/c', $bootstrapperExe, '--quiet', '--norestart', '--wait', '--nocache')
|
|
foreach ($workload in $Workloads) {
|
|
$vsArgs += '--add'
|
|
$vsArgs += $workload
|
|
}
|
|
|
|
if (-not ([String]::IsNullOrWhiteSpace($InstallPath))) {
|
|
$vsArgs += '--installpath'
|
|
$vsArgs += $InstallPath
|
|
}
|
|
|
|
if (-not ([String]::IsNullOrWhiteSpace($Nickname))) {
|
|
$vsArgs += '--nickname'
|
|
$vsArgs += $Nickname
|
|
}
|
|
|
|
$proc = Start-Process -FilePath cmd.exe -ArgumentList $vsArgs -Wait -PassThru
|
|
PrintMsiExitCodeMessage $proc.ExitCode
|
|
}
|
|
catch {
|
|
Write-Error "Failed to install Visual Studio! $($_.Exception.Message)"
|
|
throw
|
|
}
|
|
}
|
|
|
|
InstallVisualStudio -Workloads $Workloads -BootstrapperUrl $VisualStudioBootstrapperUrl -Nickname 'Stable'
|