diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-09 10:33:56 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-14 07:24:32 +0000 |
commit | d615b4a99f2dcbdf464323b4c63f4f71b08b8c47 (patch) | |
tree | 0d809a18ab4cc1295ec473d3819b56d5ff0900df /coin/provisioning/common/helpers.ps1 | |
parent | bded0e1bbc43c1243b2d924f54862b5b7eb748ec (diff) | |
parent | bbf18ab4ad3d965f1512f64e7d3c49eeb5f3f8b3 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
.gitmodules
coin/platform_configs/qt5.txt
Remove QNX Windows builds, 0358b6d2
Remove Integrity build temporarily, QTBUG-61702
coin/provisioning/qtci-macos-10.12-x86_64/020-xcode.sh
Done-with: Liang Qi <liang.qi@qt.io>
Change-Id: I5a56633d6cd60b5514828060fde87f784e54cdda
Diffstat (limited to 'coin/provisioning/common/helpers.ps1')
-rw-r--r-- | coin/provisioning/common/helpers.ps1 | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/coin/provisioning/common/helpers.ps1 b/coin/provisioning/common/helpers.ps1 index af7f79ff..1d624243 100644 --- a/coin/provisioning/common/helpers.ps1 +++ b/coin/provisioning/common/helpers.ps1 @@ -53,6 +53,32 @@ function Extract-Zip $destinationFolder.CopyHere($zipfile.Items(), 16) } +function Extract-Dev-Folders-From-Zip +{ + Param ( + [string]$package, + [string]$zipDir, + [string]$installPath + ) + + $shell = new-object -com shell.application + + echo "Extracting contents of $package" + foreach ($subDir in "lib", "include", "bin", "share") { + $zip = $shell.Namespace($package + "\" + $zipDir + "\" + $subDir) + if ($zip) { + Write-Host "Extracting $subDir from zip archive" + } else { + Write-Host "$subDir is missing from zip archive - skipping" + continue + } + $destDir = $installPath + "\" + $subdir + New-Item $destDir -type directory + $destinationFolder = $shell.Namespace($destDir) + $destinationFolder.CopyHere($zip.Items(), 16) + } +} + function BadParam { Param ([string]$Description) @@ -67,7 +93,11 @@ function Download [string] $Destination = $(BadParam("a download target location")) ) try { - Invoke-WebRequest -UseBasicParsing $CachedUrl -OutFile $Destination + if ($CachedUrl.StartsWith("http")) { + Invoke-WebRequest -UseBasicParsing $CachedUrl -OutFile $Destination + } else { + Copy-Item $CachedUrl $Destination + } } catch { Invoke-WebRequest -UseBasicParsing $OfficialUrl -OutFile $Destination } |