mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-12 02:09:24 +08:00
fa3a5f80a1
This commit replaces all references to PowerToys' master branch with "main" in documentation, code and build rules. - [x] **Linked issue:** #5433 - [x] **Communication:** I've discussed this with core contributors in the issue. - [ ] **Tests:** Added/updated and all pass (not applicable) - [ ] **Installer:** Added/updated and all pass (not applicable) - [ ] **Localization:** All end user facing strings can be localized (not applicable) - [x] **Docs:** Updated - [x] **Binaries:** Any new files are added to WXS / YML - [x] No new binaries
32 lines
1.6 KiB
PowerShell
32 lines
1.6 KiB
PowerShell
# not using this but keeping around in case we need it in the future.
|
|
# good use case here could be to set up a new machine, we just point people at it.
|
|
# https://github.com/microsoft/PowerToys/tree/main/doc/devdocs#prerequisites-for-compiling-powertoys
|
|
|
|
# improvements if this script is used to replace the snippet
|
|
# Add in a param for passive versus quiet. Could be a IsSettingUpDevComputer true/false flag
|
|
# default it to true which would be passive flag for normal people, false would set to quiet
|
|
|
|
$VS_DOWNLOAD_LINK = "https://aka.ms/vs/16/release/vs_buildtools.exe"
|
|
$VS_INSTALL_ARGS = @("--nocache","--quiet","--wait",
|
|
"--add Microsoft.VisualStudio.Workload.NativeDesktop",
|
|
"--add Microsoft.VisualStudio.Workload.ManagedDesktop",
|
|
"--add Microsoft.VisualStudio.Workload.Universal",
|
|
"--add Microsoft.VisualStudio.ComponentGroup.UWP.VC",
|
|
"--add Microsoft.VisualStudio.Component.Windows10SDK.17134",
|
|
"--add Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre",
|
|
"--add Microsoft.NetCore.Component.Runtime.3.1",
|
|
"--add Microsoft.VisualStudio.Component.VC.ATL.Spectre")
|
|
|
|
curl.exe --retry 3 -kL $VS_DOWNLOAD_LINK --output vs_installer.exe
|
|
if ($LASTEXITCODE -ne 0) {
|
|
echo "Download of the VS 2019 installer failed"
|
|
exit 1
|
|
}
|
|
|
|
$process = Start-Process "${PWD}\vs_installer.exe" -ArgumentList $VS_INSTALL_ARGS -NoNewWindow -Wait -PassThru
|
|
Remove-Item -Path vs_installer.exe -Force
|
|
$exitCode = $process.ExitCode
|
|
if (($exitCode -ne 0) -and ($exitCode -ne 3010)) {
|
|
echo "VS 2019 installer exited with code $exitCode, which should be one of [0, 3010]."
|
|
exit 1
|
|
} |