2021-04-27 01:27:45 +08:00
|
|
|
# Copyright (c) Microsoft Corporation.
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
# REPLACE WITH DROP-TO-ADMIN-USER-PREFIX.ps1
|
|
|
|
|
|
|
|
# REPLACE WITH UTILITY-PREFIX.ps1
|
|
|
|
|
2024-04-26 09:25:03 +08:00
|
|
|
# See https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-history
|
2024-05-23 15:03:14 +08:00
|
|
|
$VisualStudioBootstrapperUrl = 'https://download.visualstudio.microsoft.com/download/pr/ec7bd8ef-2c51-4e4f-a83f-9087ffbe8b76/f7fdf51d7c15b65c60f0f358776576f4423417da603ef46a213bd69ad463e9e2/vs_Enterprise.exe'
|
2021-04-27 01:27:45 +08:00
|
|
|
$Workloads = @(
|
|
|
|
'Microsoft.VisualStudio.Workload.NativeDesktop',
|
|
|
|
'Microsoft.VisualStudio.Workload.Universal',
|
2023-09-16 06:01:12 +08:00
|
|
|
'Microsoft.VisualStudio.Component.UWP.VC.ARM64',
|
2021-04-27 01:27:45 +08:00
|
|
|
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
|
|
|
|
'Microsoft.VisualStudio.Component.VC.Tools.ARM64',
|
2023-08-15 04:58:43 +08:00
|
|
|
'Microsoft.VisualStudio.Component.VC.ASAN',
|
2021-04-27 01:27:45 +08:00
|
|
|
'Microsoft.VisualStudio.Component.VC.ATL',
|
|
|
|
'Microsoft.VisualStudio.Component.VC.ATLMFC',
|
2022-04-16 06:33:07 +08:00
|
|
|
'Microsoft.VisualStudio.Component.VC.ATL.ARM64',
|
|
|
|
'Microsoft.VisualStudio.Component.VC.MFC.ARM64',
|
Update VMs for June Patch Tuesday (#25260)
* Update PowerShell to 7.2.4.
* Update Windows SDKs.
* Add libdbus-1-dev. Resolves https://github.com/microsoft/vcpkg/issues/25094
* PASSING, REMOVE FROM FAIL LIST: chmlib:arm-uwp (C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt).
PASSING, REMOVE FROM FAIL LIST: chmlib:x64-uwp (C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt).
PASSING, REMOVE FROM FAIL LIST: gl3w:arm-uwp (C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt).
PASSING, REMOVE FROM FAIL LIST: glew:arm-uwp (C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt).
PASSING, REMOVE FROM FAIL LIST: laszip:arm-uwp (C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt).
PASSING, REMOVE FROM FAIL LIST: laszip:x64-uwp (C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt).
PASSING, REMOVE FROM FAIL LIST: opengl:arm-uwp (C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt).
PASSING, REMOVE FROM FAIL LIST: rttr:arm-uwp (C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt).
PASSING, REMOVE FROM FAIL LIST: rttr:x64-uwp (C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt).
PASSING, REMOVE FROM FAIL LIST: seal:arm-uwp (C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt).
PASSING, REMOVE FROM FAIL LIST: seal:x64-uwp (C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt).
:)
REGRESSION: ftgl:arm-uwp failed with BUILD_FAILED. If expected, add ftgl:arm-uwp=fail to C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt.
REGRESSION: mathgl:arm-uwp failed with BUILD_FAILED. If expected, add mathgl:arm-uwp=fail to C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt.
REGRESSION: opencsg:arm-uwp failed with BUILD_FAILED. If expected, add opencsg:arm-uwp=fail to C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt.
These were all previously blocked by one of the above passing-remove-from-fail-lists.
REGRESSION: ms-quic:arm-uwp failed with BUILD_FAILED. If expected, add ms-quic:arm-uwp=fail to C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt.
REGRESSION: ms-quic:x64-uwp failed with BUILD_FAILED. If expected, add ms-quic:x64-uwp=fail to C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt.
REGRESSION: ms-quic:x64-windows failed with BUILD_FAILED. If expected, add ms-quic:x64-windows=fail to C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt.
REGRESSION: ms-quic:x64-windows-static-md failed with BUILD_FAILED. If expected, add ms-quic:x64-windows-static-md=fail to C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt.
REGRESSION: ms-quic:x86-windows failed with BUILD_FAILED. If expected, add ms-quic:x86-windows=fail to C:\a\2\s\scripts\azure-pipelines/../ci.baseline.txt.
This port hates the current Windows SDK, and it is a leaf port, so I'm marking it `=fail`:
```
D:\buildtrees\ms-quic\src\v1.2.0-19ce393c24.clean\src\inc\quic_platform_winuser.h(564): error C2375: 'NtQueryTimerResolution': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winternl.h(713): note: see declaration of 'NtQueryTimerResolution'
D:\buildtrees\ms-quic\src\v1.2.0-19ce393c24.clean\src\inc\quic_platform_winuser.h(765): error C2011: '_THREAD_NAME_INFORMATION': 'struct' type redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winternl.h(352): note: see declaration of '_THREAD_NAME_INFORMATION'
D:\buildtrees\ms-quic\src\v1.2.0-19ce393c24.clean\src\inc\quic_platform_winuser.h(773): error C2375: 'NtSetInformationThread': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winternl.h(659): note: see declaration of 'NtSetInformationThread'
```
arm64-windows crashed. Previously opengl failed so we never got here. https://github.com/microsoft/vcpkg-tool/pull/599
```
Building opengl[core]:arm64-windows...
-- Fixing pkgconfig file: D:/packages/opengl_arm64-windows/lib/pkgconfig/glu.pc
-- Fixing pkgconfig file: D:/packages/opengl_arm64-windows/lib/pkgconfig/opengl.pc
-- Using cached msys-mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst.
-- Using msys root at D:/downloads/tools/msys2/9a1ec3f33446b195
-- Fixing pkgconfig file: D:/packages/opengl_arm64-windows/debug/lib/pkgconfig/glu.pc
-- Fixing pkgconfig file: D:/packages/opengl_arm64-windows/debug/lib/pkgconfig/opengl.pc
-- Performing post-build validation
Found more than 1 architecture in file D:\packages\opengl_arm64-windows\debug\lib\GlU32.Lib
##[error]vcpkg ci failed
At C:\a\2\s\scripts\azure-pipelines\test-modified-ports.ps1:173 char:5
+ throw "vcpkg ci failed"
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (vcpkg ci failed:String) [], RuntimeException
+ FullyQualifiedErrorId : vcpkg ci failed
##[error]PowerShell exited with code '1'.
```
2022-06-24 06:54:56 +08:00
|
|
|
"Microsoft.VisualStudio.Component.Windows11SDK.22621",
|
2022-11-25 18:00:21 +08:00
|
|
|
"Microsoft.VisualStudio.Component.Windows10SDK.20348",
|
2021-04-27 01:27:45 +08:00
|
|
|
'Microsoft.Net.Component.4.8.SDK',
|
2021-09-12 04:43:19 +08:00
|
|
|
'Microsoft.Net.Component.4.7.2.TargetingPack',
|
2021-04-27 01:27:45 +08:00
|
|
|
'Microsoft.Component.NetFX.Native',
|
|
|
|
'Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset',
|
|
|
|
'Microsoft.VisualStudio.Component.VC.Llvm.Clang',
|
2022-04-16 06:33:07 +08:00
|
|
|
'Microsoft.VisualStudio.ComponentGroup.UWP.VC.BuildTools',
|
|
|
|
'Microsoft.VisualStudio.Component.VC.CMake.Project'
|
2021-04-27 01:27:45 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
<#
|
|
|
|
.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'
|