aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common/helpers.ps1
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-09-22 21:15:52 +0200
committerLiang Qi <liang.qi@qt.io>2017-09-22 21:15:52 +0200
commit04ccf0e8dbdb9620ea2e850e5f1cc35a96cf95b6 (patch)
treead43c2b5c1f89c763854f72dc14e72d18b97faac /coin/provisioning/common/helpers.ps1
parent6c4eb77aa0f8b07bb48d74ede633c6bc56d1a75c (diff)
parente7472f43087921c3d83ff4452bbdb67ed27ed604 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.9
42b502f is not needed for branches >= 5.8, configure.exe does not exist anymore. 30660bf was not applied to 5.9 branch, the scripts were not adapted to new template. Conflicts: coin/platform_configs/default.txt coin/platform_configs/qt5.txt Change-Id: Ie3681d5f641e99a074368f21b7f85fe31beacc17
Diffstat (limited to 'coin/provisioning/common/helpers.ps1')
-rw-r--r--coin/provisioning/common/helpers.ps115
1 files changed, 14 insertions, 1 deletions
diff --git a/coin/provisioning/common/helpers.ps1 b/coin/provisioning/common/helpers.ps1
index 1d624243..d901e370 100644
--- a/coin/provisioning/common/helpers.ps1
+++ b/coin/provisioning/common/helpers.ps1
@@ -92,6 +92,7 @@ function Download
[string] $CachedUrl = $(BadParam("the locally cached URL")),
[string] $Destination = $(BadParam("a download target location"))
)
+ $ProgressPreference = 'SilentlyContinue'
try {
if ($CachedUrl.StartsWith("http")) {
Invoke-WebRequest -UseBasicParsing $CachedUrl -OutFile $Destination
@@ -109,5 +110,17 @@ function Add-Path
[string]$Path
)
echo "Adding $Path to Path"
- [Environment]::SetEnvironmentVariable("Path", $env:Path + ";$Path", [EnvironmentVariableTarget]::Machine)
+
+ $oldPath = [System.Environment]::GetEnvironmentVariable('Path', 'Machine')
+ [Environment]::SetEnvironmentVariable("Path", $oldPath + ";$Path", [EnvironmentVariableTarget]::Machine)
+}
+
+function is64bitWinHost
+{
+ if(($env:PROCESSOR_ARCHITECTURE -eq "AMD64") -or ($env:PROCESSOR_ARCHITEW6432 -eq "AMD64")) {
+ return 1
+ }
+ else {
+ return 0
+ }
}