Coin provisioning: Use arg instead of autodetecting architecture
authorSimo Fält <simo.falt@qt.io>
Mon, 27 Feb 2017 13:04:41 +0000 (15:04 +0200)
committerSimon Hausmann <simon.hausmann@qt.io>
Thu, 30 Mar 2017 15:14:04 +0000 (15:14 +0000)
When provisioning windows machine, it seems that detecting architecture
by checking [System.Environment]::Is64BitProcess doesn't work properly.
Instead pass 32 or 64 as an argument when calling powershell script.

Change-Id: I890ad141b8ef194275848d0e656431753463cd2b
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
12 files changed:
coin/platform_configs/default.txt
coin/platform_configs/qt5.txt
coin/provisioning/common/01-windows_removethemall.ps1
coin/provisioning/common/python.ps1
coin/provisioning/qtci-windows-10-x86/07-python.ps1 [new file with mode: 0644]
coin/provisioning/qtci-windows-10-x86/python.ps1 [deleted file]
coin/provisioning/qtci-windows-10-x86_64/07-python.ps1 [new file with mode: 0644]
coin/provisioning/qtci-windows-10-x86_64/python.ps1 [deleted file]
coin/provisioning/qtci-windows-8-x86/06-python.ps1 [new file with mode: 0644]
coin/provisioning/qtci-windows-8-x86/python.ps1 [deleted file]
coin/provisioning/qtci-windows-8-x86_64/06-python.ps1 [new file with mode: 0644]
coin/provisioning/qtci-windows-8-x86_64/python.ps1 [deleted file]

index a8ab6e4..72f482d 100644 (file)
@@ -1,15 +1,15 @@
 Template                            Target OS           Target arch Compiler    Features
 ----------------------------------- ------------------- ----------- ----------- -------------------------------------------------------------------------------------
-qtci-windows-8-x86_64                                               MSVC2013    DeveloperBuild Release BuildExamples
-qtci-windows-8-x86_64                                               MSVC2012    DeveloperBuild Release QtNamespace QtLibInfix
-qtci-windows-8-x86                                                  MSVC2013    Packaging DebugAndRelease Release OpenGLDynamic
-qtci-windows-8-x86_64                                               MSVC2013    Packaging DebugAndRelease Release OpenGLDynamic
-qtci-windows-7-x86                                                  MSVC2010    Release DeveloperBuild QtNamespace QtLibInfix OpenGLDynamic
-qtci-windows-7-x86                                                  Mingw49     Packaging DebugAndRelease Release OpenGLDynamic
+qtci-windows-8-x86_64-2                                             MSVC2013    DeveloperBuild Release BuildExamples
+qtci-windows-8-x86_64-2                                             MSVC2012    DeveloperBuild Release QtNamespace QtLibInfix
+qtci-windows-8-x86-2                                                MSVC2013    Packaging DebugAndRelease Release OpenGLDynamic
+qtci-windows-8-x86_64-2                                             MSVC2013    Packaging DebugAndRelease Release OpenGLDynamic
+qtci-windows-7-x86-2                                                MSVC2010    Release DeveloperBuild QtNamespace QtLibInfix OpenGLDynamic
+qtci-windows-7-x86-2                                                Mingw49     Packaging DebugAndRelease Release OpenGLDynamic
 qtci-windows-10-x86-3                                               MSVC2015    Packaging DebugAndRelease Release OpenGLDynamic
 qtci-windows-10-x86_64-3                                            MSVC2015    Packaging DebugAndRelease Release OpenGLDynamic
-qtci-windows-8-x86_64               Windows_Phone_8_1   armv4       MSVC2013    Packaging DebugAndRelease Release DisableTests
-qtci-windows-8-x86_64               WinRT_8_1                       MSVC2013    Packaging DebugAndRelease Release DisableTests
+qtci-windows-8-x86_64-2             Windows_Phone_8_1   armv4       MSVC2013    Packaging DebugAndRelease Release DisableTests
+qtci-windows-8-x86_64-2             WinRT_8_1                       MSVC2013    Packaging DebugAndRelease Release DisableTests
 qtci-linux-Ubuntu-14.04-x86_64                                      GCC         NoWidgets ForceDebugInfo
 qtci-linux-Ubuntu-14.04-x86_64                                      GCC         DeveloperBuild OutOfSourceBuild QtLibInfix QtNamespace
 qtci-linux-OpenSuSE-13.01-x86_64                                    GCC         DeveloperBuild NoPch
@@ -23,4 +23,4 @@ qtci-linux-RHEL-6.6-x86_64          Android_ANY         armv7       GCC
 qtci-linux-Ubuntu-14.04-x86_64      Boot2Qt_Fido        armv7       GCC         DisableTests
 qtci-linux-RHEL-6.6-x86_64          QNX_660             armv7       GCC         Packaging Release DisableTests OpenGLES2 NoUseGoldLinker
 qtci-linux-Ubuntu-14.04-x86_64                                      GCC         TestOnly LicenseCheck
-qtci-windows-7-x86                  Windows_7_Embedded  armv4       MSVC2008    DeveloperBuild Release DisableTests OpenGLES2
+qtci-windows-7-x86-2                Windows_7_Embedded  armv4       MSVC2008    DeveloperBuild Release DisableTests OpenGLES2
index 985c20c..3f9f318 100644 (file)
@@ -1,16 +1,16 @@
 Template                    Target OS           Target arch Compiler    Features
 --------------------------- ------------------- ----------- ----------- -----------------------------------------------------------------------------------------------
-qtci-windows-8-x86_64       Windows_Phone_8_1   x86         MSVC2013    Packaging DebugAndRelease Release DisableTests
+qtci-windows-8-x86_64-2     Windows_Phone_8_1   x86         MSVC2013    Packaging DebugAndRelease Release DisableTests
 qtci-windows-10-x86_64-3    WinRT_10            x86         MSVC2015    Packaging DebugAndRelease Release DisableTests
 qtci-windows-10-x86_64-3    WinRT_10                        MSVC2015    Packaging DebugAndRelease Release DisableTests
 qtci-linux-RHEL-6.6-x86_64  Android_ANY         x86         GCC         Packaging Release DisableTests OpenGLES2 NoUseGoldLinker
-qtci-windows-7-x86          Android_ANY         armv7       Mingw49     Packaging Release DisableTests OpenGLES2
-qtci-windows-7-x86          Android_ANY         x86         Mingw49     Packaging Release DisableTests OpenGLES2
+qtci-windows-7-x86-2        Android_ANY         armv7       Mingw49     Packaging Release DisableTests OpenGLES2
+qtci-windows-7-x86-2        Android_ANY         x86         Mingw49     Packaging Release DisableTests OpenGLES2
 qtci-osx-10.11-x86_64       Android_ANY         armv7       GCC         Packaging Release DisableTests OpenGLES2
 qtci-osx-10.11-x86_64       Android_ANY         x86         GCC         Packaging Release DisableTests OpenGLES2
 qtci-linux-RHEL-6.6-x86_64  QNX_660             x86         GCC         Packaging Release DisableTests OpenGLES2 NoUseGoldLinker
-qtci-windows-7-x86          QNX_660             armv7       Mingw49     Packaging Release DisableTests OpenGLES2
-qtci-windows-7-x86          QNX_660             x86         Mingw49     Packaging Release DisableTests OpenGLES2
+qtci-windows-7-x86-2        QNX_660             armv7       Mingw49     Packaging Release DisableTests OpenGLES2
+qtci-windows-7-x86-2        QNX_660             x86         Mingw49     Packaging Release DisableTests OpenGLES2
 # target arch is used here only for documentation the value is ignored
 qtci-windows-10-x86_64-3    WinRT_10            armv7       MSVC2015    Packaging DebugAndRelease Release DisableTests
 
index 9e64a34..ebbf15d 100644 (file)
@@ -55,11 +55,6 @@ Function Remove-Path {
     [System.Environment]::SetEnvironmentVariable($name,$value,$type)
 }
 
-# Remove Python
-Remove C:\Python27
-Remove-Path C:\python27\scripts
-Remove-Path C:\python27
-
 # Remove Android sdk and ndk
 Remove C:\utils\android*
 [Environment]::SetEnvironmentVariable("ANDROID_NDK_HOME",$null,"User")
index 3297283..3edbc41 100644 (file)
 ## $QT_END_LICENSE$
 ##
 #############################################################################
-
+param([Int32]$archVer=32)
 . "$PSScriptRoot\helpers.ps1"
 
 # This script installs Python $version.
 # Python is required for building Qt 5 from source.
 
-$version = "2.7.10"
+$version = "2.7.13"
 $package = "C:\Windows\temp\python-$version.msi"
 
 # check bit version
-if ([System.Environment]::Is64BitProcess -eq $TRUE) {
+if ( $archVer -eq 64 ) {
+    echo "Running in 64 bit system"
     $externalUrl = "https://www.python.org/ftp/python/$version/python-$version.amd64.msi"
     $internalUrl = "http://ci-files01-hki.ci.local/input/windows/python-$version.amd64.msi"
-    $sha1 = "f3a474f6ab191f9b43034c0fb5c98301553775d4"
+    $sha1 = "d9113142bae8829365c595735e1ad1f9f5e2894c"
 }
 else {
     $externalUrl = "https://www.python.org/ftp/python/$version/python-$version.msi"
     $internalUrl = "http://ci-files01-hki.ci.local/input/windows/python-$version.msi"
-    $sha1 = "9e62f37407e6964ee0374b32869b7b4ab050d12a"
+    $sha1 = "7e3b54236dbdbea8fe2458db501176578a4d59c0"
 }
 
 echo "Fetching from URL..."
 Download $externalUrl $internalUrl $package
 Verify-Checksum $package $sha1
 echo "Installing $package..."
-cmd /c "$package /q"
+cmd /c "msiexec /passive /i $package ALLUSERS=1"
 # We need to change allowZip64 from 'False' to 'True' to be able to create ZIP files that use the ZIP64 extensions when the zipfile is larger than 2 GB
 echo "Chancing allowZip64 value to 'True'..."
 (Get-Content C:\Python27\lib\zipfile.py) | ForEach-Object { $_ -replace "allowZip64=False", "allowZip64=True" } | Set-Content C:\Python27\lib\zipfile.py
 echo "Remove $package..."
 del $package
-Add-Path $path
+[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Python27;C:\Python27\Scripts", [EnvironmentVariableTarget]::Machine)
 
-& python -m ensurepip
+C:\Python27\python.exe -m ensurepip
 # Install python virtual env
-pip.exe install virtualenv
+C:\Python27\Scripts\pip.exe install virtualenv
diff --git a/coin/provisioning/qtci-windows-10-x86/07-python.ps1 b/coin/provisioning/qtci-windows-10-x86/07-python.ps1
new file mode 100644 (file)
index 0000000..27c618e
--- /dev/null
@@ -0,0 +1 @@
+. "$PSScriptRoot\..\common\python.ps1" 32
diff --git a/coin/provisioning/qtci-windows-10-x86/python.ps1 b/coin/provisioning/qtci-windows-10-x86/python.ps1
deleted file mode 100644 (file)
index 5f8aa2f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-. "$PSScriptRoot\..\common\python.ps1"
diff --git a/coin/provisioning/qtci-windows-10-x86_64/07-python.ps1 b/coin/provisioning/qtci-windows-10-x86_64/07-python.ps1
new file mode 100644 (file)
index 0000000..44c1c5f
--- /dev/null
@@ -0,0 +1 @@
+. "$PSScriptRoot\..\common\python.ps1" 64
diff --git a/coin/provisioning/qtci-windows-10-x86_64/python.ps1 b/coin/provisioning/qtci-windows-10-x86_64/python.ps1
deleted file mode 100644 (file)
index 5f8aa2f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-. "$PSScriptRoot\..\common\python.ps1"
diff --git a/coin/provisioning/qtci-windows-8-x86/06-python.ps1 b/coin/provisioning/qtci-windows-8-x86/06-python.ps1
new file mode 100644 (file)
index 0000000..27c618e
--- /dev/null
@@ -0,0 +1 @@
+. "$PSScriptRoot\..\common\python.ps1" 32
diff --git a/coin/provisioning/qtci-windows-8-x86/python.ps1 b/coin/provisioning/qtci-windows-8-x86/python.ps1
deleted file mode 100644 (file)
index 5f8aa2f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-. "$PSScriptRoot\..\common\python.ps1"
diff --git a/coin/provisioning/qtci-windows-8-x86_64/06-python.ps1 b/coin/provisioning/qtci-windows-8-x86_64/06-python.ps1
new file mode 100644 (file)
index 0000000..44c1c5f
--- /dev/null
@@ -0,0 +1 @@
+. "$PSScriptRoot\..\common\python.ps1" 64
diff --git a/coin/provisioning/qtci-windows-8-x86_64/python.ps1 b/coin/provisioning/qtci-windows-8-x86_64/python.ps1
deleted file mode 100644 (file)
index 5f8aa2f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-. "$PSScriptRoot\..\common\python.ps1"