diff --git a/coin/provisioning/common/unix/http_proxy.txt b/coin/provisioning/common/http_proxy.txt similarity index 100% rename from coin/provisioning/common/unix/http_proxy.txt rename to coin/provisioning/common/http_proxy.txt diff --git a/coin/provisioning/common/linux/disable_selinux.sh b/coin/provisioning/common/linux/disable_selinux.sh index 30162166..64852e79 100755 --- a/coin/provisioning/common/linux/disable_selinux.sh +++ b/coin/provisioning/common/linux/disable_selinux.sh @@ -1,3 +1,5 @@ +#!/usr/bin/env bash + # We need to disable selinux while we are overwriting some binaries # required by it. If this is not done, ICU provisioning will create # template that is not booting. diff --git a/coin/provisioning/common/linux/open62541.sh b/coin/provisioning/common/linux/open62541.sh index fc215e8a..878bfe0d 100755 --- a/coin/provisioning/common/linux/open62541.sh +++ b/coin/provisioning/common/linux/open62541.sh @@ -53,7 +53,7 @@ sudo pip install six git clone https://github.com/open62541/open62541.git open62541 cd open62541 -git checkout 302003d2448946fa4d8a02cc209b8931d31e975b +git checkout ba3b55ab4afafe6bc9d2cb922eafd51c6cee4629 mkdir build cd build cmake -DUA_ENABLE_AMALGAMATION=ON -DUA_ENABLE_METHODCALLS=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr/local -DLIB_INSTALL_DIR:PATH=/usr/local/lib .. diff --git a/coin/provisioning/common/macos/java.sh b/coin/provisioning/common/macos/java.sh new file mode 100755 index 00000000..0961e21a --- /dev/null +++ b/coin/provisioning/common/macos/java.sh @@ -0,0 +1,132 @@ +#!/usr/bin/env bash + +############################################################################# +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: http://www.qt.io/licensing/ +## +## This file is part of the provisioning scripts of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL21$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see http://www.qt.io/terms-conditions. For further +## information use the contact form at http://www.qt.io/contact-us. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 or version 3 as published by the Free +## Software Foundation and appearing in the file LICENSE.LGPLv21 and +## LICENSE.LGPLv3 included in the packaging of this file. Please review the +## following information to ensure the GNU Lesser General Public License +## requirements will be met: https://www.gnu.org/licenses/lgpl.html and +## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## As a special exception, The Qt Company gives you certain additional +## rights. These rights are described in The Qt Company LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## $QT_END_LICENSE$ +## +############################################################################# + +# This script installs JDK + +set -ex + +echo "Installing Java Development Kit" + +# shellcheck source=../unix/try_catch.sh +source "${BASH_SOURCE%/*}/../unix/try_catch.sh" + +ExceptionDownloadPrimaryUrl=100 +ExceptionDownloadAltUrl=101 +ExceptionSHA1=102 +ExceptionAttachImage=103 +ExceptionInstall=104 +ExceptionDetachImage=105 +ExceptionRemoveTmpFile=106 +ExceptionDisableAutoUpdate=107 + + +url=http://ci-files01-hki.intra.qt.io/input/mac/jdk-8u102-macosx-x64.dmg +url_alt=http://download.oracle.com/otn-pub/java/jdk/8u102-b14/jdk-8u102-macosx-x64.dmg +targetFile=/tmp/jdk-8u102-macosx-x64.dmg +expectedSha1=1405af955f14e32aae187b5754a716307db22104 + +try +( + try + ( + echo "Downloading from primary URL '$url'" + curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url" || throw $ExceptionDownloadPrimaryUrl + ) + catch || { + case $ex_code in + $ExceptionDownloadPrimaryUrl) + echo "Failed to download '$url' multiple times" + echo "Downloading tar.gz from alternative URL '$url_alt'" + curl --fail -L --retry 5 --retry-delay 5 -j -k -H "Cookie: oraclelicense=accept-securebackup-cookie" -o "$targetFile" "$url_alt" || throw $ExceptionDownloadAltUrl + ;; + esac + } + echo "Checking SHA1 on '$targetFile'" + echo "$expectedSha1 *$targetFile" | shasum --check || throw $ExceptionSHA1 + + echo Mounting DMG + hdiutil attach "$targetFile" || throw $ExceptionAttachImage + + echo Installing JDK + (cd /Volumes/JDK\ 8\ Update\ 102/ && sudo installer -package JDK\ 8\ Update\ 102.pkg -target /) || throw $ExceptionInstall + + disk=`hdiutil info | grep '/Volumes/JDK 8 Update 102' | awk '{print $1}'` + hdiutil detach $disk || throw $ExceptionDetachImage + + echo "Removing temporary file '$targetFile'" + rm "$targetFile" || throw $ExceptionRemoveTmpFile + + echo "Disable auto update" + sudo defaults write /Library/Preferences/com.oracle.java.Java-Updater JavaAutoUpdateEnabled -bool false || throw $ExceptionDisableAutoUpdate + + echo "JDK Version = 8 update 102" >> ~/versions.txt +) +catch || { + case $ex_code in + $ExceptionDownloadPrimaryUrl) + echo "Failed to download JDK from primary URL." + exit 1; + ;; + $ExceptionDownloadAltUrl) + echo "Failed to download JDK from alternative URL." + exit 1; + ;; + $ExceptionSHA1) + echo "Failed to check SHA1." + exit 1; + ;; + $ExceptionAttachImage) + echo "Failed to attach image." + exit 1; + ;; + $ExceptionInstall) + echo "Failed to install JDK." + exit 1; + ;; + $ExceptionDetachImage) + echo "Failed to detach image." + exit 1; + ;; + $ExceptionRemoveTmpFile) + echo "Failed to remove temporary file." + exit 1; + ;; + $ExceptionDisableAutoUpdate) + echo "Failed to disable auto update." + exit 1; + ;; + + esac +} diff --git a/coin/provisioning/common/unix/check_and_set_proxy.sh b/coin/provisioning/common/unix/check_and_set_proxy.sh index 8dad878c..38905d56 100755 --- a/coin/provisioning/common/unix/check_and_set_proxy.sh +++ b/coin/provisioning/common/unix/check_and_set_proxy.sh @@ -33,7 +33,7 @@ ############################################################################# source "${BASH_SOURCE%/*}/try_catch.sh" -source "${BASH_SOURCE%/*}/http_proxy.txt" +source "${BASH_SOURCE%/*}/../http_proxy.txt" try ( diff --git a/coin/provisioning/common/windows/3dstudio_3rdparty.ps1 b/coin/provisioning/common/windows/3dstudio_3rdparty.ps1 index f9c8faa7..b6804a77 100644 --- a/coin/provisioning/common/windows/3dstudio_3rdparty.ps1 +++ b/coin/provisioning/common/windows/3dstudio_3rdparty.ps1 @@ -1,8 +1,9 @@ . "$PSScriptRoot\helpers.ps1" $zip = "c:\users\qt\downloads\Qt3DStudio-3rdparty-win64-CI.zip" +$url = "http://ci-files01-hki.intra.qt.io/input/3rdparty/Qt3DStudio-3rdparty-win64-CI.zip" -Invoke-WebRequest -UseBasicParsing http://ci-files01-hki.intra.qt.io/input/3rdparty/Qt3DStudio-3rdparty-win64-CI.zip -OutFile $zip +Download $url $url $zip Verify-Checksum $zip "08D740D2EFB4CBCDE7D012908B89AA48DE5CD4E1" Extract-Zip $zip C:\Utils\Qt3DStudio3rdparty Remove-Item $zip diff --git a/coin/provisioning/common/windows/helpers.ps1 b/coin/provisioning/common/windows/helpers.ps1 index b24de870..9c6706a2 100644 --- a/coin/provisioning/common/windows/helpers.ps1 +++ b/coin/provisioning/common/windows/helpers.ps1 @@ -144,3 +144,11 @@ Function Execute-Command exit 1 } } + +function isProxyEnabled { + return (Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings').proxyEnable +} + +function getProxy { + return (Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings').proxyServer +} diff --git a/coin/provisioning/common/windows/install-jdk.ps1 b/coin/provisioning/common/windows/install-jdk.ps1 index f6cf6a66..63e5edaf 100644 --- a/coin/provisioning/common/windows/install-jdk.ps1 +++ b/coin/provisioning/common/windows/install-jdk.ps1 @@ -55,7 +55,7 @@ echo "Fetching Java SE $version..." $ProgressPreference = 'SilentlyContinue' try { echo "...from local cache" - Invoke-WebRequest -UseBasicParsing $url_cache -OutFile $javaPackage + Download $url_cache $url_cache $javaPackage } catch { echo "...from oracle.com" $client = new-object System.Net.WebClient @@ -63,7 +63,7 @@ try { $client.Headers.Add("Cookie", $cookie) $client.DownloadFile($official_url, $javaPackage) - Invoke-WebRequest -UseBasicParsing $official_url -OutFile $javaPackage + Download $official_url $official_url $javaPackage } Verify-Checksum $javaPackage $sha1 diff --git a/coin/provisioning/common/windows/python.ps1 b/coin/provisioning/common/windows/python.ps1 index c3eba2d8..fe75aa35 100644 --- a/coin/provisioning/common/windows/python.ps1 +++ b/coin/provisioning/common/windows/python.ps1 @@ -63,4 +63,8 @@ Add-Path "C:\Python27;C:\Python27\Scripts" C:\Python27\python.exe -m ensurepip # Install python virtual env +#if ( isProxyEnabled ) { +# echo "Using proxy with pip" +# $pip_args = "--proxy=" + (getProxy) +#} C:\Python27\Scripts\pip.exe install virtualenv diff --git a/coin/provisioning/common/windows/python3.ps1 b/coin/provisioning/common/windows/python3.ps1 index 316b567a..23ddb553 100644 --- a/coin/provisioning/common/windows/python3.ps1 +++ b/coin/provisioning/common/windows/python3.ps1 @@ -67,4 +67,8 @@ del $package [Environment]::SetEnvironmentVariable("PIP3_PATH", "$install_path\Scripts", [EnvironmentVariableTarget]::Machine) # Install python virtual env +#if ( isProxyEnabled ) { +# echo "Using proxy with pip" +# $pip_args = "--proxy=" + (getProxy) +#} cmd /c "$install_path\Scripts\pip3.exe install virtualenv" diff --git a/coin/provisioning/common/windows/set-proxy.ps1 b/coin/provisioning/common/windows/set-proxy.ps1 new file mode 100644 index 00000000..914769f1 --- /dev/null +++ b/coin/provisioning/common/windows/set-proxy.ps1 @@ -0,0 +1,64 @@ +############################################################################# +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: http://www.qt.io/licensing/ +## +## This file is part of the provisioning scripts of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL21$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see http://www.qt.io/terms-conditions. For further +## information use the contact form at http://www.qt.io/contact-us. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 or version 3 as published by the Free +## Software Foundation and appearing in the file LICENSE.LGPLv21 and +## LICENSE.LGPLv3 included in the packaging of this file. Please review the +## following information to ensure the GNU Lesser General Public License +## requirements will be met: https://www.gnu.org/licenses/lgpl.html and +## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## As a special exception, The Qt Company gives you certain additional +## rights. These rights are described in The Qt Company LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## $QT_END_LICENSE$ +## +############################################################################# + +$n = Get-Content "$PSScriptRoot\..\http_proxy.txt" +$n = $n.Split('=') +New-Variable -Name $n[0] -Value $n[1] + +if (([string]::IsNullOrEmpty($proxy)) -or ($proxy -eq '""')) { + echo "No proxy is defined." +} +else { + echo "Checking proxy @ $proxy" + $proxy = $proxy -replace '"', "" + $webclient = New-Object System.Net.WebClient + $proxy_obj = New-Object System.Net.WebProxy($proxy) + $webclient.proxy = $proxy_obj + try { + $webpage = $webclient.DownloadData("http://proxy.intra.qt.io") + } + catch { + $ErrorMessage = $_.Exception.Message + $FailedItem = $_.Exception.ItemName + $iserror = $true + } + if ($iserror -eq $true) { + echo "Testing download with proxy does not work: $ErrorMessage, $FailedItem. Not setting proxy." + } + else { + echo "Setting proxy to: $proxy" + Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyServer -Value "$proxy" + Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyEnable -Value 1 + Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyOverride -Value 10.215 + } +} diff --git a/coin/provisioning/common/windows/squishInstall.ps1 b/coin/provisioning/common/windows/squishInstall.ps1 index 7641c9fe..509eb93f 100644 --- a/coin/provisioning/common/windows/squishInstall.ps1 +++ b/coin/provisioning/common/windows/squishInstall.ps1 @@ -107,6 +107,12 @@ DownloadSquishLicence $licensePackage $squishUrl $targetDir if(($OSVersion -eq "Windows 10 Enterprise") -or ($OSVersion -eq "Windows 8.1 Enterprise")) { + # Squish for MinGW + $squishPackageMingw = "mingw_gcc53_posix_dwarf" + echo "Installing $squishPackageMingw" + DownloadAndInstallSquish $version $squishBranchUrl $qtBranch win32 $targetDir $squishPackageMingw + mv $targetDir\$squishPackageMingw $targetDir\mingw + # Squish for Visual Studio 2015 $squishPackage = "msvc14" $squishPackage64bit = "msvc14_64" @@ -138,7 +144,7 @@ if($OSVersion -eq "Windows 8.1 Enterprise") attrib -h C:\Users\qt\.squish-3-license } } -else +if($OSVersion -eq "Windows 7") { # Windows 7 @@ -152,6 +158,9 @@ else $squishPackage = "msvc14" $squishPackage64bit = "msvc14_64" + echo "Installing $squishPackage" + DownloadAndInstallSquish $version $squishBranchUrl $qtBranch win32 $targetDir $squishPackage + if(($env:PROCESSOR_ARCHITECTURE -eq "AMD64") -or ($env:PROCESSOR_ARCHITEW6432 -eq "AMD64")) { echo "Installing $squishPackage64bit" diff --git a/coin/provisioning/common/windows/unset-proxy.ps1 b/coin/provisioning/common/windows/unset-proxy.ps1 new file mode 100644 index 00000000..86374ec1 --- /dev/null +++ b/coin/provisioning/common/windows/unset-proxy.ps1 @@ -0,0 +1,41 @@ +############################################################################# +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: http://www.qt.io/licensing/ +## +## This file is part of the provisioning scripts of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL21$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see http://www.qt.io/terms-conditions. For further +## information use the contact form at http://www.qt.io/contact-us. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 or version 3 as published by the Free +## Software Foundation and appearing in the file LICENSE.LGPLv21 and +## LICENSE.LGPLv3 included in the packaging of this file. Please review the +## following information to ensure the GNU Lesser General Public License +## requirements will be met: https://www.gnu.org/licenses/lgpl.html and +## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## As a special exception, The Qt Company gives you certain additional +## rights. These rights are described in The Qt Company LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## $QT_END_LICENSE$ +## +############################################################################# + +echo "Disabling proxy" +$dcs = (Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections").DefaultConnectionSettings +$dcs[8] = $_ -band 0xF7 +Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" -Name DefaultConnectionSettings -Value $dcs +Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyEnable -Value 0 +Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyServer +Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyOverride + diff --git a/coin/provisioning/common/windows/winrtrunner.ps1 b/coin/provisioning/common/windows/winrtrunner.ps1 index f433ac7a..d53c12d6 100644 --- a/coin/provisioning/common/windows/winrtrunner.ps1 +++ b/coin/provisioning/common/windows/winrtrunner.ps1 @@ -1,8 +1,9 @@ . "$PSScriptRoot\helpers.ps1" $zip = "c:\users\qt\downloads\winrtrunner.zip" +$url = "http://download.qt.io/development_releases/prebuilt/winrtrunner/winrtrunner.zip" -Invoke-WebRequest -UseBasicParsing http://download.qt.io/development_releases/prebuilt/winrtrunner/winrtrunner.zip -OutFile $zip +Download $url $url $zip Verify-Checksum $zip "C19098A4C9DBD20EDEB4E5E0D3E6A5BBBCA73C42" Extract-Zip $zip C:\Utils\winrtrunner Remove-Item $zip diff --git a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/02-apt.sh b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/02-apt.sh index e0e1d1f1..1f2139c1 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/02-apt.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/02-apt.sh @@ -51,6 +51,19 @@ try sudo systemctl stop $service sudo systemctl disable $service done + + # aptdaemon is used by update notifiers and similar and there is no point in having those (the symptom is aptd holding a lock) + for i in `seq 10`; do + echo attempting to remove aptdaemon + sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y remove aptdaemon || true + # check that aptdaemon is no longer installed + which aptd > /dev/null || break + if [[ $i -eq 10 ]]; then + throw $ExceptionAPT + fi + sleep 10 + done + # Git is not needed by builds themselves, but is nice to have # immediately as one starts debugging installPackages+=(git) diff --git a/coin/provisioning/qtci-linux-openSUSE-42.3-x86_64/01-systemsetup.sh b/coin/provisioning/qtci-linux-openSUSE-42.3-x86_64/01-systemsetup.sh index c0e7b8e9..f53a2943 100755 --- a/coin/provisioning/qtci-linux-openSUSE-42.3-x86_64/01-systemsetup.sh +++ b/coin/provisioning/qtci-linux-openSUSE-42.3-x86_64/01-systemsetup.sh @@ -17,6 +17,8 @@ echo "Set DISPLAY" echo 'export DISPLAY=":0"' >> ~/.bashrc echo "Disabling file indexing." sudo balooctl disable +echo "Disable update notifications" +sudo zypper -nq remove plasma5-pk-updates if [ "$http_proxy" != "" ]; then sudo sed -i 's/PROXY_ENABLED=\"no\"/PROXY_ENABLED=\"yes\"/' /etc/sysconfig/proxy diff --git a/coin/provisioning/qtci-macos-10.12-x86_64/20-java.sh b/coin/provisioning/qtci-macos-10.12-x86_64/20-java.sh index 66e4dfde..8877c40b 100755 --- a/coin/provisioning/qtci-macos-10.12-x86_64/20-java.sh +++ b/coin/provisioning/qtci-macos-10.12-x86_64/20-java.sh @@ -1,132 +1,3 @@ #!/usr/bin/env bash - -############################################################################# -## -## Copyright (C) 2017 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ -## -## This file is part of the provisioning scripts of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL21$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see http://www.qt.io/terms-conditions. For further -## information use the contact form at http://www.qt.io/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 2.1 or version 3 as published by the Free -## Software Foundation and appearing in the file LICENSE.LGPLv21 and -## LICENSE.LGPLv3 included in the packaging of this file. Please review the -## following information to ensure the GNU Lesser General Public License -## requirements will be met: https://www.gnu.org/licenses/lgpl.html and -## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -## -## As a special exception, The Qt Company gives you certain additional -## rights. These rights are described in The Qt Company LGPL Exception -## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -## -## $QT_END_LICENSE$ -## -############################################################################# - -# This script installs JDK - -set -ex - -echo "Installing Java Development Kit" - -# shellcheck source=../common/unix/try_catch.sh -source "${BASH_SOURCE%/*}/../common/unix/try_catch.sh" - -ExceptionDownloadPrimaryUrl=100 -ExceptionDownloadAltUrl=101 -ExceptionSHA1=102 -ExceptionAttachImage=103 -ExceptionInstall=104 -ExceptionDetachImage=105 -ExceptionRemoveTmpFile=106 -ExceptionDisableAutoUpdate=107 - - -url=http://ci-files01-hki.intra.qt.io/input/mac/macos_10.12_sierra/jdk-8u102-macosx-x64.dmg -url_alt=http://download.oracle.com/otn-pub/java/jdk/8u102-b14/jdk-8u102-macosx-x64.dmg -targetFile=/tmp/jdk-8u102-macosx-x64.dmg -expectedSha1=1405af955f14e32aae187b5754a716307db22104 - -try -( - try - ( - echo "Downloading from primary URL '$url'" - curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$url" || throw $ExceptionDownloadPrimaryUrl - ) - catch || { - case $ex_code in - $ExceptionDownloadPrimaryUrl) - echo "Failed to download '$url' multiple times" - echo "Downloading tar.gz from alternative URL '$url_alt'" - curl --fail -L --retry 5 --retry-delay 5 -j -k -H "Cookie: oraclelicense=accept-securebackup-cookie" -o "$targetFile" "$url_alt" || throw $ExceptionDownloadAltUrl - ;; - esac - } - echo "Checking SHA1 on '$targetFile'" - echo "$expectedSha1 *$targetFile" | shasum --check || throw $ExceptionSHA1 - - echo Mounting DMG - hdiutil attach "$targetFile" || throw $ExceptionAttachImage - - echo Installing JDK - (cd /Volumes/JDK\ 8\ Update\ 102/ && sudo installer -package JDK\ 8\ Update\ 102.pkg -target /) || throw $ExceptionInstall - - disk=`hdiutil info | grep '/Volumes/JDK 8 Update 102' | awk '{print $1}'` - hdiutil detach $disk || throw $ExceptionDetachImage - - echo "Removing temporary file '$targetFile'" - rm "$targetFile" || throw $ExceptionRemoveTmpFile - - echo "Disable auto update" - sudo defaults write /Library/Preferences/com.oracle.java.Java-Updater JavaAutoUpdateEnabled -bool false || throw $ExceptionDisableAutoUpdate - - echo "JDK Version = 8 update 102" >> ~/versions.txt -) -catch || { - case $ex_code in - $ExceptionDownloadPrimaryUrl) - echo "Failed to download JDK from primary URL." - exit 1; - ;; - $ExceptionDownloadAltUrl) - echo "Failed to download JDK from alternative URL." - exit 1; - ;; - $ExceptionSHA1) - echo "Failed to check SHA1." - exit 1; - ;; - $ExceptionAttachImage) - echo "Failed to attach image." - exit 1; - ;; - $ExceptionInstall) - echo "Failed to install JDK." - exit 1; - ;; - $ExceptionDetachImage) - echo "Failed to detach image." - exit 1; - ;; - $ExceptionRemoveTmpFile) - echo "Failed to remove temporary file." - exit 1; - ;; - $ExceptionDisableAutoUpdate) - echo "Failed to disable auto update." - exit 1; - ;; - - esac -} +BASEDIR=$(dirname "$0") +$BASEDIR/../common/macos/java.sh diff --git a/coin/provisioning/qtci-osx-10.11-x86_64/30-java.sh b/coin/provisioning/qtci-osx-10.11-x86_64/30-java.sh new file mode 100755 index 00000000..8877c40b --- /dev/null +++ b/coin/provisioning/qtci-osx-10.11-x86_64/30-java.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +BASEDIR=$(dirname "$0") +$BASEDIR/../common/macos/java.sh diff --git a/coin/provisioning/qtci-windows-10-x86/01-set-proxy.ps1 b/coin/provisioning/qtci-windows-10-x86/01-set-proxy.ps1 new file mode 100644 index 00000000..13b1ec60 --- /dev/null +++ b/coin/provisioning/qtci-windows-10-x86/01-set-proxy.ps1 @@ -0,0 +1 @@ +. "$PSScriptRoot\..\common\windows\set-proxy.ps1" diff --git a/coin/provisioning/qtci-windows-10-x86/99-unset-proxy.ps1 b/coin/provisioning/qtci-windows-10-x86/99-unset-proxy.ps1 new file mode 100644 index 00000000..0c25a0fb --- /dev/null +++ b/coin/provisioning/qtci-windows-10-x86/99-unset-proxy.ps1 @@ -0,0 +1 @@ +. "$PSScriptRoot\..\common\windows\unset-proxy.ps1" diff --git a/coin/provisioning/qtci-windows-10-x86_64/01-set-proxy.ps1 b/coin/provisioning/qtci-windows-10-x86_64/01-set-proxy.ps1 new file mode 100644 index 00000000..13b1ec60 --- /dev/null +++ b/coin/provisioning/qtci-windows-10-x86_64/01-set-proxy.ps1 @@ -0,0 +1 @@ +. "$PSScriptRoot\..\common\windows\set-proxy.ps1" diff --git a/coin/provisioning/qtci-windows-10-x86_64/05-qnx_700.ps1 b/coin/provisioning/qtci-windows-10-x86_64/05-qnx_700.ps1 index a7a8c035..d2864281 100644 --- a/coin/provisioning/qtci-windows-10-x86_64/05-qnx_700.ps1 +++ b/coin/provisioning/qtci-windows-10-x86_64/05-qnx_700.ps1 @@ -36,8 +36,9 @@ # This script installs QNX SDP 7.0 $zip = "c:\users\qt\downloads\qnx700.7z" +$url = "http://ci-files01-hki.intra.qt.io/input/qnx/qnx700.7z" -Invoke-WebRequest -UseBasicParsing http://ci-files01-hki.intra.qt.io/input/qnx/qnx700.7z -OutFile $zip +Download $url $url $zip Verify-Checksum $zip "DD3346A3429C06B59BF4D45CE0782F737D2424C7" Extract-7Zip $zip C:\ diff --git a/coin/provisioning/qtci-windows-10-x86_64/99-unset-proxy.ps1 b/coin/provisioning/qtci-windows-10-x86_64/99-unset-proxy.ps1 new file mode 100644 index 00000000..0c25a0fb --- /dev/null +++ b/coin/provisioning/qtci-windows-10-x86_64/99-unset-proxy.ps1 @@ -0,0 +1 @@ +. "$PSScriptRoot\..\common\windows\unset-proxy.ps1" diff --git a/coin/provisioning/qtci-windows-7-x86/01-set-proxy.ps1 b/coin/provisioning/qtci-windows-7-x86/01-set-proxy.ps1 new file mode 100644 index 00000000..13b1ec60 --- /dev/null +++ b/coin/provisioning/qtci-windows-7-x86/01-set-proxy.ps1 @@ -0,0 +1 @@ +. "$PSScriptRoot\..\common\windows\set-proxy.ps1" diff --git a/coin/provisioning/qtci-windows-7-x86/99-unset-proxy.ps1 b/coin/provisioning/qtci-windows-7-x86/99-unset-proxy.ps1 new file mode 100644 index 00000000..0c25a0fb --- /dev/null +++ b/coin/provisioning/qtci-windows-7-x86/99-unset-proxy.ps1 @@ -0,0 +1 @@ +. "$PSScriptRoot\..\common\windows\unset-proxy.ps1"