aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-09-30 16:13:52 +0200
committerLiang Qi <liang.qi@qt.io>2016-09-30 16:13:52 +0200
commit0e4688d36ea143b285e2ecf96073c83142bdfe41 (patch)
treeffbf520c764e4942af7569b1341bf86ad56d16ee /coin/provisioning/common
parent2fb27862aa760d88790b23e0eab3cd3be5341054 (diff)
parenta5b6125466344f0f9b73691b97fbc809c5ad9f7f (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts: .gitmodules Change-Id: I6f517c976152f2da390c556c7c9da08aaec4be90
Diffstat (limited to 'coin/provisioning/common')
-rw-r--r--coin/provisioning/common/conan.ps133
-rw-r--r--coin/provisioning/common/helpers.ps120
-rw-r--r--coin/provisioning/common/ruby.ps17
3 files changed, 60 insertions, 0 deletions
diff --git a/coin/provisioning/common/conan.ps1 b/coin/provisioning/common/conan.ps1
new file mode 100644
index 00000000..70962a41
--- /dev/null
+++ b/coin/provisioning/common/conan.ps1
@@ -0,0 +1,33 @@
+. "$PSScriptRoot\helpers.ps1"
+
+$installer = "c:\users\qt\downloads\conan-win_0_12_0.exe"
+
+Download https://s3-eu-west-1.amazonaws.com/conanio-production/downloads/conan-win_0_12_0.exe http://ci-files01-hki.ci.local/input/conan/conan-win_0_12_0.exe $installer
+Verify-Checksum $installer "719F30E6EED03149D75CDB28F80A7B873B43FF51"
+& $installer /DIR=C:\Utils\Conan /VERYSILENT
+
+[Environment]::SetEnvironmentVariable("CI_CONAN_BUILDINFO_DIR", "C:/Utils/conanbuildinfos", "Machine")
+
+function Run-Conan-Install
+{
+ Param (
+ [string]$ConanfilesDir,
+ [string]$BuildinfoDir,
+ [string]$Arch,
+ [string]$Compiler,
+ [string]$CompilerVersion
+ )
+
+ Get-ChildItem -Path "$ConanfilesDir\*.txt" |
+ ForEach-Object {
+ $outpwd = "C:\Utils\conanbuildinfos\$($BuildinfoDir)\$($_.BaseName)"
+ New-Item $outpwd -Type directory -Force
+ Start-Process `
+ "C:\Utils\Conan\conan\conan.exe" `
+ -WorkingDirectory $outpwd `
+ -ArgumentList "install -i -f $($_.FullName)", `
+ '-s', ('compiler="' + $Compiler + '"'), `
+ "-s os=Windows -s arch=$($Arch) -s compiler.version=$($CompilerVersion)" `
+ -NoNewWindow -Wait
+ }
+}
diff --git a/coin/provisioning/common/helpers.ps1 b/coin/provisioning/common/helpers.ps1
index d7b957f3..055ce0a7 100644
--- a/coin/provisioning/common/helpers.ps1
+++ b/coin/provisioning/common/helpers.ps1
@@ -29,3 +29,23 @@ function Extract-Zip
$destinationFolder = $shell.Namespace($Destination)
$destinationFolder.CopyHere($zipfile.Items(), 16)
}
+
+function BadParam
+{
+ Param ([string]$Description)
+ throw("You must specify $Description")
+}
+
+function Download
+{
+ Param (
+ [string] $OfficialUrl = $(BadParam("the official download URL")),
+ [string] $CachedUrl = $(BadParam("the locally cached URL")),
+ [string] $Destination = $(BadParam("a download target location"))
+ )
+ try {
+ Invoke-WebRequest -UseBasicParsing $CachedUrl -OutFile $Destination
+ } catch {
+ Invoke-WebRequest -UseBasicParsing $OfficialUrl -OutFile $Destination
+ }
+}
diff --git a/coin/provisioning/common/ruby.ps1 b/coin/provisioning/common/ruby.ps1
new file mode 100644
index 00000000..343bacfc
--- /dev/null
+++ b/coin/provisioning/common/ruby.ps1
@@ -0,0 +1,7 @@
+. "$PSScriptRoot\helpers.ps1"
+
+$installer = "c:\users\qt\downloads\rubyinstaller-2.3.1.exe"
+
+Download https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.3.1.exe http://ci-files01-hki.ci.local/input/ruby/rubyinstaller-2.3.1.exe $installer
+Verify-Checksum $installer "FF377F6F313849C3B0CD72EEC1EFFA436F0E4A36"
+& $installer /DIR=C:\ruby /VERYSILENT