2020-07-14 03:08:08 +02:00
|
|
|
$VS_DOWNLOAD_LINK = "https://go.microsoft.com/fwlink/?LinkId=691126"
|
|
|
|
$COLLECT_DOWNLOAD_LINK = "https://aka.ms/vscollect.exe"
|
|
|
|
curl.exe --retry 3 -kL $VS_DOWNLOAD_LINK --output vs_installer.exe
|
|
|
|
if ($LASTEXITCODE -ne 0) {
|
|
|
|
echo "Download of the VS 2015 installer failed"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
$VS_INSTALL_ARGS = @("/Quiet", "/NoRestart")
|
|
|
|
$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)) {
|
2020-12-17 00:58:56 +01:00
|
|
|
echo "VS 2015 installer exited with code $exitCode, which should be one of [0, 3010]."
|
2020-07-14 03:08:08 +02:00
|
|
|
curl.exe --retry 3 -kL $COLLECT_DOWNLOAD_LINK --output Collect.exe
|
|
|
|
if ($LASTEXITCODE -ne 0) {
|
|
|
|
echo "Download of the VS Collect tool failed."
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
Start-Process "${PWD}\Collect.exe" -NoNewWindow -Wait -PassThru
|
|
|
|
New-Item -Path "C:\w\build-results" -ItemType "directory" -Force
|
|
|
|
Copy-Item -Path "C:\Users\circleci\AppData\Local\Temp\vslogs.zip" -Destination "C:\w\build-results\"
|
|
|
|
exit 1
|
|
|
|
}
|
2021-01-11 22:31:03 +01:00
|
|
|
echo "VS 2015 installed."
|