diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2021-12-16 11:22:03 +0100 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2022-11-10 06:49:32 +0000 |
commit | bc4797a7e879ce84bb0267077fb5e32d1d90984f (patch) | |
tree | 2cab290edaa8e33e00bd129cf95cf5f22a0d596a | |
parent | 37f4d821b82b69e693cd460aecd5b06995be0e44 (diff) |
provisioning: Check successful installation of MSVC 2019 update
Using vswhere we can make sure if the MSVC 2019 update finished with the
right version. For further safety we check, if the installation is
complete and launchable.
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I90e84bf4922647b4ff30ba93a207b9d5e1a96120
Reviewed-by: Simo Fält <simo.falt@qt.io>
-rw-r--r-- | coin/provisioning/common/windows/update-msvc2019.ps1 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/coin/provisioning/common/windows/update-msvc2019.ps1 b/coin/provisioning/common/windows/update-msvc2019.ps1 index 6a4615ec..00b62671 100644 --- a/coin/provisioning/common/windows/update-msvc2019.ps1 +++ b/coin/provisioning/common/windows/update-msvc2019.ps1 @@ -76,6 +76,16 @@ Install $urlOfficial_buildToolsInstaller $urlCache_buildToolsInstaller $sha1_bui $msvc2019Version = (cmd /c "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" ` -version [16.0,17.0`) -latest -property catalog_productDisplayVersion 2`>`&1) +$msvc2019Complete = (cmd /c "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" ` + -version [16.0,17.0`) -latest -property isComplete 2`>`&1) +$msvc2019Launchable = (cmd /c "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" ` + -version [16.0,17.0`) -latest -property isLaunchable 2`>`&1) + +if($msvc2019Version -ne $version -or [int]$msvc2019Complete -ne 1 ` + -or [int]$msvc2019Launchable -ne 1) { + throw "MSVC 2019 update failed. msvc2019Version: $($msvc2019Version) ` + msvc2019Complete: $($msvc2019Complete) msvc2019Launchable: $($msvc2019Launchable)" +} Write-Output "Visual Studio 2019 = $msvc2019Version" >> ~\versions.txt Write-Output "Visual Studio 2019 Build Tools = $version" >> ~\versions.txt |