provisioning: install MinGW 530 and 630 for Win10 x64
authorTony Sarajärvi <tony.sarajarvi@qt.io>
Tue, 29 Aug 2017 06:31:43 +0000 (09:31 +0300)
committerJani Heikkinen <jani.heikkinen@qt.io>
Thu, 14 Sep 2017 12:08:36 +0000 (12:08 +0000)
MinGW is an alternative option for Visual Studio. It's
used to create desktop builds and for cross compiling
Android and QNX. At this point it is still unclear which
version is going to be used for what, but as both are
supported, let's think ahead and provide them both.
This also allows us to debug with the other, if the
other is causing problems.

Task-number: QTQAINFRA-1289
Change-Id: I2a922669c07d49370e608c093be80481c8613dc7
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
coin/provisioning/common/install-mingw.ps1 [new file with mode: 0644]
coin/provisioning/qtci-windows-10-x86_64/09-install-mingw530.ps1 [new file with mode: 0644]
coin/provisioning/qtci-windows-10-x86_64/09-install-mingw630.ps1 [new file with mode: 0644]

diff --git a/coin/provisioning/common/install-mingw.ps1 b/coin/provisioning/common/install-mingw.ps1
new file mode 100644 (file)
index 0000000..fc02631
--- /dev/null
@@ -0,0 +1,26 @@
+function InstallMinGW
+{
+    Param (
+        [string] $version     = $(BadParam("the version being printed to versions.txt")),
+        [string] $release     = $(BadParam("release part of the file name"))
+    )
+
+    $envvar = "MINGW$version"
+    $envvar = $envvar -replace '["."]'
+    $targetdir = "C:\$envvar"
+    $url_cache = "\\ci-files01-hki.intra.qt.io\provisioning\windows\i686-" + $version + "-" + $release + ".7z"
+
+    $mingwPackage = "C:\Windows\Temp\MinGW-$version.zip"
+    Copy-Item $url_cache $mingwPackage
+
+    Get-ChildItem $mingwPackage | % {& "C:\Utils\sevenzip\7z.exe" "x" $_.fullname "-o$TARGETDIR"}
+
+    echo "Adding MinGW environment variable."
+    [Environment]::SetEnvironmentVariable("$envvar", "$targetdir\mingw32", [EnvironmentVariableTarget]::Machine)
+
+    echo "Cleaning $mingwPackage.."
+    Remove-Item -Recurse -Force "$mingwPackage"
+
+    echo "MinGW = $version $release" >> ~\versions.txt
+
+}
diff --git a/coin/provisioning/qtci-windows-10-x86_64/09-install-mingw530.ps1 b/coin/provisioning/qtci-windows-10-x86_64/09-install-mingw530.ps1
new file mode 100644 (file)
index 0000000..ded894a
--- /dev/null
@@ -0,0 +1,10 @@
+. "$PSScriptRoot\..\common\install-mingw.ps1"
+
+# This script will install MinGW 5.3.0
+
+$version = "5.3.0"
+$release = "release-posix-dwarf-rt_v4-rev0"
+
+InstallMinGW $version $release
+
+
diff --git a/coin/provisioning/qtci-windows-10-x86_64/09-install-mingw630.ps1 b/coin/provisioning/qtci-windows-10-x86_64/09-install-mingw630.ps1
new file mode 100644 (file)
index 0000000..a271076
--- /dev/null
@@ -0,0 +1,8 @@
+. "$PSScriptRoot\..\common\install-mingw.ps1"
+
+# This script will install MinGW 6.3.0
+
+$version = "6.3.0"
+$release = "release-posix-dwarf-rt_v5-rev2"
+
+InstallMinGW $version $release