mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +08:00
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.
Change-Id: I90e84bf4922647b4ff30ba93a207b9d5e1a96120
Reviewed-by: Simo Fält <simo.falt@qt.io>
(cherry picked from commit bc4797a7e8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
committed by
Qt Cherry-pick Bot
parent
04cc50669c
commit
79a5ee62d6
@@ -78,6 +78,16 @@ Install $urlOfficial_vsInstaller $urlCache_vsInstaller $sha1_vsInstaller
|
||||
|
||||
$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
|
||||
|
||||
Reference in New Issue
Block a user