aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning/qtci-windows-8.1-x86
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2018-02-14 07:46:11 +0100
committerTony Sarajärvi <tony.sarajarvi@qt.io>2018-04-20 06:15:53 +0000
commit73621de8916b5d6d17a1dbd24c134d14c1c726a8 (patch)
tree8d1e21a4de97070e65183112fccc566a731788b2 /coin/provisioning/qtci-windows-8.1-x86
parenta37f4a2485d30710d743cecdaf1775b43792ed83 (diff)
Unify Windows provisioning scripts & improve error handling
While Coin should also see exit codes != 0 as error, we should stick to one way of handling script errors. As Power Shell cmdlets signal an error by throwing an exception we should do the same (and that approach also works in Coin). Additionally extracting 7zip files was unified across scripts by using the existing helper function instead of reinventing the wheel again and again. A similar helper function was introduced for starting an external application (and handling its errors). Also echo and other "cmd" commands were replaced by their PowerShell equivalents to have a unified approach across our Windows provisioning scripts. Change-Id: I70129ce38692f1396c33c13b33a2918485fa5271 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> (cherry picked from commit cb6709ce5c48a31ba1170c71494c1a3869ffa5bb) Reviewed-by: Simo Fält <simo.falt@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'coin/provisioning/qtci-windows-8.1-x86')
-rw-r--r--coin/provisioning/qtci-windows-8.1-x86/09-msvc-2013-update5.ps113
1 files changed, 6 insertions, 7 deletions
diff --git a/coin/provisioning/qtci-windows-8.1-x86/09-msvc-2013-update5.ps1 b/coin/provisioning/qtci-windows-8.1-x86/09-msvc-2013-update5.ps1
index 202d072d..c4337e52 100644
--- a/coin/provisioning/qtci-windows-8.1-x86/09-msvc-2013-update5.ps1
+++ b/coin/provisioning/qtci-windows-8.1-x86/09-msvc-2013-update5.ps1
@@ -38,14 +38,13 @@ $version = "2013 Update 5 (KB2829760)"
$package = "C:\Windows\Temp\vs12-kb2829760.exe"
$url_cache = "\\ci-files01-hki.intra.qt.io\provisioning\windows\VS2013.5.exe"
-echo "Fetching patch for Visual Studio $version..."
+Write-Host "Fetching patch for Visual Studio $version..."
Copy-Item $url_cache $package
-$commandLine = $package
-echo "Installing Update 5 for Visual Studio $version..."
-. $commandLine /norestart /passive
+Write-Host "Installing Update 5 for Visual Studio $version..."
+Run-Executable "$package" "/norestart /passive"
-echo "Removing $package ..."
-remove-item $package
+Write-Host "Removing $package ..."
+Remove-Item $package
-echo "Visual Studio = $version" >> ~\versions.txt
+Write-Output "Visual Studio = $version" >> ~\versions.txt