mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +08:00
Remove hardcoded download path
Previously all files got downloaded to a hardcoded path, including the username for the CI machines. Usually, it does not fit the username of a local development machine, complicating to reproduce bugs. Introduce Get-(Default)DownloadLocation functions in helpers to specify the default download location. This helps to run the provisioning scripts on a local machine. Change-Id: I761a92bf5e3e774358756a95dddb9a5d6ee54db9 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
. "$PSScriptRoot\helpers.ps1"
|
||||
|
||||
$zip = "c:\users\qt\downloads\Qt3DStudio-3rdparty-win64-CI.zip"
|
||||
$zip = Get-DownloadLocation "Qt3DStudio-3rdparty-win64-CI.zip"
|
||||
|
||||
$url = "http://ci-files01-hki.intra.qt.io/input/3rdparty/Qt3DStudio-3rdparty-win64-CI.zip"
|
||||
|
||||
Download $url $url $zip
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
# More info and building instructions can be found from http://doc.qt.io/qt-5/opensslsupport.html
|
||||
|
||||
$version = "1.0.2o"
|
||||
$zip = "c:\users\qt\downloads\openssl-$version.tar.gz"
|
||||
$zip = Get-DownloadLocation ("openssl-$version.tar.gz")
|
||||
$sha1 = "a47faaca57b47a0d9d5fb085545857cc92062691"
|
||||
$destination = "C:\Utils\openssl-android-master"
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
$majorminorversion = "3.6"
|
||||
$version = "3.6.2"
|
||||
|
||||
$zip = "c:\users\qt\downloads\cmake-" + $version + "-win32-x86.zip"
|
||||
$zip = Get-DownloadLocation ("cmake-" + $version + "-win32-x86.zip")
|
||||
$officialurl = "https://cmake.org/files/v" + $majorminorversion + "/cmake-" + $version + "-win32-x86.zip"
|
||||
$cachedurl = "\\ci-files01-hki.intra.qt.io\provisioning\cmake\cmake-" + $version + "-win32-x86.zip"
|
||||
|
||||
|
||||
@@ -68,6 +68,17 @@ function BadParam
|
||||
throw("You must specify $Description")
|
||||
}
|
||||
|
||||
function Get-DefaultDownloadLocation
|
||||
{
|
||||
return $env:USERPROFILE + "\downloads\"
|
||||
}
|
||||
|
||||
function Get-DownloadLocation
|
||||
{
|
||||
Param ([string]$TargetName = $(BadParam("a target filename")))
|
||||
return (Get-DefaultDownloadLocation) + $TargetName
|
||||
}
|
||||
|
||||
function Download
|
||||
{
|
||||
Param (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
. "$PSScriptRoot\helpers.ps1"
|
||||
|
||||
$zip = "c:\users\qt\downloads\jom_1_1_2.zip"
|
||||
$zip = Get-DownloadLocation "jom_1_1_2.zip"
|
||||
|
||||
Invoke-WebRequest -UseBasicParsing http://download.qt.io/official_releases/jom/jom_1_1_2.zip -OutFile $zip
|
||||
Verify-Checksum $zip "80EE5678E714DE99DDAF5F7593AB04DB1C7928E4"
|
||||
|
||||
@@ -16,7 +16,7 @@ Get-Content "$PSScriptRoot\..\shared\sw_versions.txt" | Foreach-Object {
|
||||
$libclang_version = $libclang_version -replace '["."]'
|
||||
}
|
||||
|
||||
$zip = "c:\users\qt\downloads\libclang.7z"
|
||||
$zip = Get-DownloadLocation "libclang.7z"
|
||||
$baseDestination = "C:\Utils\libclang-" + $libclang_version + "-" + $toolchain
|
||||
|
||||
function setURL() {
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
. "$PSScriptRoot\helpers.ps1"
|
||||
|
||||
$archive = "C:\users\qt\downloads\libusb-1.0.21-ife3db79196-msvc2015.7z"
|
||||
$archive = Get-DownloadLocation "libusb-1.0.21-ife3db79196-msvc2015.7z"
|
||||
$libusb_location = "C:\Utils\libusb-1.0"
|
||||
|
||||
Copy-Item \\ci-files01-hki.intra.qt.io\provisioning\libusb-1.0\libusb-1.0.21-ife3db79196-msvc2015.7z $archive
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
. "$PSScriptRoot\helpers.ps1"
|
||||
|
||||
Write-Host "MQTT: Downloading Paho test broker..."
|
||||
$zip = "c:\users\qt\downloads\pahotest.zip"
|
||||
$zip = Get-DownloadLocation "pahotest.zip"
|
||||
$externalUrl = "http://ci-files01-hki.ci.local/input/mqtt_broker/paho.mqtt.testing-c342c09dadc7a664d0a8befad1ca031f5a0b0bc0.zip"
|
||||
$internalUrl = "https://github.com/eclipse/paho.mqtt.testing/archive/c342c09dadc7a664d0a8befad1ca031f5a0b0bc0.zip"
|
||||
$sha1 = "532fe145096cdd8d679f425cbfd883289150c968"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
. "$PSScriptRoot\helpers.ps1"
|
||||
|
||||
$zip = "c:\users\qt\downloads\ninja-1.6.0-win-x86.zip"
|
||||
$zip = Get-DownloadLocation "ninja-1.6.0-win-x86.zip"
|
||||
|
||||
Download https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-win.zip \\ci-files01-hki.intra.qt.io\provisioning\ninja\ninja-1.6.0-win-x86.zip $zip
|
||||
Verify-Checksum $zip "E01093F6533818425F8EFB0843CED7DCAABEA3B2"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
. "$PSScriptRoot\helpers.ps1"
|
||||
|
||||
$zip = "c:\users\qt\downloads\winrtrunner.zip"
|
||||
$zip = Get-DownloadLocation "winrtrunner.zip"
|
||||
$url = "http://download.qt.io/development_releases/prebuilt/winrtrunner/winrtrunner.zip"
|
||||
|
||||
Download $url $url $zip
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
# This script installs QNX SDP 7.0
|
||||
|
||||
$zip = "c:\users\qt\downloads\qnx700.7z"
|
||||
$zip = Get-DownloadLocation "qnx700.7z"
|
||||
$url = "http://ci-files01-hki.intra.qt.io/input/qnx/qnx700.7z"
|
||||
|
||||
Download $url $url $zip
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
$version = "1.0.11"
|
||||
$url = "\\ci-files01-hki.intra.qt.io\provisioning\windows\msys-$version.7z"
|
||||
|
||||
$zip = "c:\users\qt\downloads\msys-$version.7z"
|
||||
$zip = Get-DownloadLocation ("msys-$version.7z")
|
||||
$sha1 = "22cd76f1263db8c72727a9537228c481ff33c285"
|
||||
$destination = "C:\msys"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user