Temporarily remove iOS due to code signing issues
[mirror/qt/qt5.git] / coin / provisioning / common / windows / icu.ps1
1 ############################################################################
2 ##
3 ## Copyright (C) 2017 The Qt Company Ltd.
4 ## Contact: http://www.qt.io/licensing/
5 ##
6 ## This file is part of the provisioning scripts of the Qt Toolkit.
7 ##
8 ## $QT_BEGIN_LICENSE:LGPL21$
9 ## Commercial License Usage
10 ## Licensees holding valid commercial Qt licenses may use this file in
11 ## accordance with the commercial license agreement provided with the
12 ## Software or, alternatively, in accordance with the terms contained in
13 ## a written agreement between you and The Qt Company. For licensing terms
14 ## and conditions see http://www.qt.io/terms-conditions. For further
15 ## information use the contact form at http://www.qt.io/contact-us.
16 ##
17 ## GNU Lesser General Public License Usage
18 ## Alternatively, this file may be used under the terms of the GNU Lesser
19 ## General Public License version 2.1 or version 3 as published by the Free
20 ## Software Foundation and appearing in the file LICENSE.LGPLv21 and
21 ## LICENSE.LGPLv3 included in the packaging of this file. Please review the
22 ## following information to ensure the GNU Lesser General Public License
23 ## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
24 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 ##
26 ## As a special exception, The Qt Company gives you certain additional
27 ## rights. These rights are described in The Qt Company LGPL Exception
28 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 ##
30 ## $QT_END_LICENSE$
31 ##
32 ############################################################################
33
34 . "$PSScriptRoot\helpers.ps1"
35
36 # This script installs ICU.
37
38 $version = "53_1"
39
40 if(($env:PROCESSOR_ARCHITECTURE -eq "AMD64") -or ($env:PROCESSOR_ARCHITEW6432 -eq "AMD64")) {
41
42    $url_official_2012 = "http://download.qt.io/development_releases/prebuilt/icu/prebuilt/msvc2012/icu_" + $version + "_msvc_2012_64_devel.7z"
43    $url_cache_2012 = "\\ci-files01-hki.intra.qt.io\provisioning\windows\icu_" + $version + "_msvc_2012_64_devel.7z"
44    $sha1_2012 = "8A8C371F3ED58E81BBCF58CF5F8388CEF51FA9AC"
45
46    $url_official_2013 = "http://download.qt.io/development_releases/prebuilt/icu/prebuilt/msvc2013/icu_" + $version + "_msvc_2013_64_devel.7z"
47    $url_cache_2013 = "\\ci-files01-hki.intra.qt.io/provisioning/windows/icu_" + $version + "_msvc_2013_64_devel.7z"
48    $sha1_2013 = "7267CF8C5BD39C4218F2CCFE31ECA81B7644ED6F"
49
50    $icuPackage_msvc2012_64 = "C:\Windows\Temp\icu-$version-msvc2012_64.7z"
51    $icuPackage_msvc2013_64 = "C:\Windows\Temp\icu-$version-msvc2013_64.7z"
52
53    if (!(Test-Path C:\Utils\icu_"$version"_msvc_2012_64_devel\)) {
54       echo "Fetching from URL ..."
55       Download $url_official_2012 $url_cache_2012 $icuPackage_msvc2012_64
56       Verify-Checksum $icuPackage_msvc2012_64 $sha1_2012
57       Get-ChildItem $icuPackage_msvc2012_64 | % {& "C:\Utils\sevenzip\7z.exe" "x" $_.fullname -o""C:\Utils\icu_"$version"_msvc_2012_64_devel\""}
58
59       echo "Cleaning $icuPackage_msvc2012_64..."
60       Remove-Item -Recurse -Force $icuPackage_msvc2012_64
61
62       echo "ICU MSVC2012 = $version" >> ~\versions.txt
63    }
64
65    if (!(Test-Path C:\Utils\icu_"$version"_msvc_2013_64_devel\)) {
66       echo "Fetching from URL ..."
67       Download $url_official_2013 $url_cache_2013 $icuPackage_msvc2013_64
68       Verify-Checksum $icuPackage_msvc2013_64 $sha1_2013
69       Get-ChildItem $icuPackage_msvc2013_64 | % {& "C:\Utils\sevenzip\7z.exe" "x" $_.fullname -o""C:\Utils\icu_"$version"_msvc_2013_64_devel\""}
70
71       echo "Cleaning $icuPackage_msvc2013_64..."
72       Remove-Item -Recurse -Force $icuPackage_msvc2013_64
73
74       echo "ICU MSVC2013 = $version" >> ~\versions.txt
75    }
76
77 # FIXME: do we really want to have it per MSVC version? What about MSVC2015?
78 [Environment]::SetEnvironmentVariable("CI_ICU_PATH_MSVC2012", "C:\\Utils\\icu_53_1_msvc_2012_64_devel\\icu53_1", "Machine")
79 [Environment]::SetEnvironmentVariable("CI_ICU_PATH_MSVC2013", "C:\\Utils\\icu_53_1_msvc_2013_64_devel\\icu53_1", "Machine")
80
81 # FIXME: do we really want to use the 4.8.2 ICU build?
82 [Environment]::SetEnvironmentVariable("CI_ICU_PATH_Mingw49", "C:\Utils\icu_53_1_Mingw_builds_4_8_2_posix_seh_64_devel\icu53_1", "Machine")
83
84 } else {
85
86    $url_official_2012_32 = "http://download.qt.io/development_releases/prebuilt/icu/prebuilt/msvc2012/icu_" + $version + "_msvc_2012_32_devel.7z"
87    $url_cache_2012_32 = "\\ci-files01-hki.intra.qt.io\provisioning\windows\icu_" + $version + "_msvc_2012_32_devel.7z"
88    $sha1_2012_32 = "F2FF287EEB0163B015D37AE08871165FBA87BCF0"
89
90    $url_official_2013_32 = "http://download.qt.io/development_releases/prebuilt/icu/prebuilt/msvc2013/icu_" + $version + "_msvc_2013_32_devel.7z"
91    $url_cache_2013_32 = "\\ci-files01-hki.intra.qt.io/provisioning/windows/icu_" + $version + "_msvc_2013_32_devel.7z"
92    $sha1_2013_32 = "D745A5F0F6A3817AE989501A01A5A0BA53FDB800"
93
94    $icuPackage_msvc2012_32 = "C:\Windows\Temp\icu-$version-msvc2012_32.7z"
95    $icuPackage_msvc2013_32 = "C:\Windows\Temp\icu-$version-msvc2013_32.7z"
96
97    if (!(Test-Path C:\Utils\icu_"$version"_msvc_2012_32_devel\)) {
98       echo "Fetching from URL ..."
99       Download $url_official_2012_32 $url_cache_2012_32 $icuPackage_msvc2012_32
100       Verify-Checksum $icuPackage_msvc2012_32 $sha1_2012_32
101       Get-ChildItem $icuPackage_msvc2012_32 | % {& "C:\Utils\sevenzip\7z.exe" "x" $_.fullname -o""C:\Utils\icu_"$version"_msvc_2012_32_devel\""}
102
103       echo "Cleaning $icuPackage_msvc2012_32..."
104       Remove-Item -Recurse -Force $icuPackage_msvc2012_32
105
106       echo "ICU MSVC2012 = $version" >> ~\versions.txt
107    }
108
109    if (!(Test-Path C:\Utils\icu_"$version"_msvc_2013_32_devel\)) {
110       echo "Fetching from URL ..."
111       Download $url_official_2013_32 $url_cache_2013_32 $icuPackage_msvc2013_32
112       Verify-Checksum $icuPackage_msvc2013_32 $sha1_2013_32
113       Get-ChildItem $icuPackage_msvc2013_32 | % {& "C:\Utils\sevenzip\7z.exe" "x" $_.fullname -o""C:\Utils\icu_"$version"_msvc_2013_32_devel\""}
114
115       echo "Cleaning $icuPackage_msvc2013_32..."
116       Remove-Item -Recurse -Force $icuPackage_msvc2013_32
117
118       echo "ICU MSVC2013 = $version" >> ~\versions.txt
119    }
120
121 # FIXME: do we really want to have it per MSVC version? What about MSVC2015?
122 [Environment]::SetEnvironmentVariable("CI_ICU_PATH_MSVC2012", "C:\\Utils\\icu_53_1_msvc_2012_32_devel\\icu53_1", "Machine")
123 [Environment]::SetEnvironmentVariable("CI_ICU_PATH_MSVC2013", "C:\\Utils\\icu_53_1_msvc_2013_32_devel\\icu53_1", "Machine")
124
125 }