Provision: Android openssl 1.0.2j for Windows 7
authorHeikki Halmet <heikki.halmet@qt.io>
Fri, 16 Dec 2016 12:17:04 +0000 (14:17 +0200)
committerSimon Hausmann <simon.hausmann@qt.io>
Fri, 16 Dec 2016 14:44:55 +0000 (14:44 +0000)
We are currently using too old openssl for Android builds in Windows 7.
Openssl version need to be at least 1.0.1.

This script will configure openssl 1.0.2j for Android using tools
from msys.

Change-Id: I9ab9a3b4f9f3953cf99bf15fee631f5a7961b42d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
coin/provisioning/qtci-windows-7-x86/04-msys.ps1 [new file with mode: 0644]
coin/provisioning/qtci-windows-7-x86/android_openssl.ps1 [new file with mode: 0644]

diff --git a/coin/provisioning/qtci-windows-7-x86/04-msys.ps1 b/coin/provisioning/qtci-windows-7-x86/04-msys.ps1
new file mode 100644 (file)
index 0000000..b75fd2a
--- /dev/null
@@ -0,0 +1,14 @@
+. "$PSScriptRoot\..\common\helpers.ps1"
+
+# This script will install msys which is needed for configuring openssl for Android
+
+$version = "1.0.11"
+$url = "http://ci-files01-hki.ci.local/input/windows/msys-$version.7z"
+
+$zip = "c:\users\qt\downloads\msys-$version.7z"
+$sha1 = "22cd76f1263db8c72727a9537228c481ff33c285"
+$destination = "C:\msys"
+
+Download $url $url $zip
+Verify-Checksum $zip $sha1
+C:\Utils\sevenzip\7z.exe x $zip -oC:\
diff --git a/coin/provisioning/qtci-windows-7-x86/android_openssl.ps1 b/coin/provisioning/qtci-windows-7-x86/android_openssl.ps1
new file mode 100644 (file)
index 0000000..a1b656c
--- /dev/null
@@ -0,0 +1,32 @@
+. "$PSScriptRoot\..\common\helpers.ps1"
+
+# OpenSSL need to be configured from sources for Android build in windows 7
+# Msys need to be installed to target machine
+# More info and building instructions can be found from http://doc.qt.io/qt-5/opensslsupport.html
+
+$version = "1.0.2j"
+$zip = "c:\users\qt\downloads\openssl-$version.tar.gz"
+$sha1 = "bdfbdb416942f666865fa48fe13c2d0e588df54f"
+$destination = "C:\Utils\openssl-android-master"
+
+Download https://www.openssl.org/source/openssl-$version.tar.gz http://ci-files01-hki.ci.local/input/openssl/openssl-$version.tar.gz $zip
+Verify-Checksum $zip $sha1
+
+C:\Utils\sevenzip\7z.exe x $zip -oC:\Utils
+C:\Utils\sevenzip\7z.exe x C:\Utils\openssl-$version.tar -oC:\Utils
+Remove-Item $destination -Force -Recurse
+Rename-Item C:\Utils\openssl-$version $destination
+Remove-Item $zip
+Remove-Item C:\Utils\openssl-$version.tar
+
+set CC=C:\utils\android-ndk-r10e\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\bin\arm-linux-androideabi-gcc
+set AR=C:\utils\android-ndk-r10e\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\bin\arm-linux-androideabi-ar
+set ANDROID_DEV=C:\utils\android-ndk-r10e\platforms\android-18\arch-arm\usr
+$env:Path = $env:Path + ";C:\msys\1.0\bin"
+
+echo "Configuring OpenSSL $version for Android..."
+cd $destination
+C:\msys\1.0\bin\bash.exe -c "perl Configure shared android"
+
+# Following command is needed when using version 1.1.0. With version 1.1.0 msys is not needed.
+# C:\mingw530\bin\mingw32-make.exe include\openssl\opensslconf.h