mirror of
git://code.qt.io/qt/qt5.git
synced 2026-04-28 07:37:18 +08:00
Provisioning: Refactor libclang installation
Libclang must use cached url (ci-files01-hki) to reduce the download time Libclang release_60 versions were rebuild which requires sha1 changes Task-number: QTQAINFRA-1966 Task-number: QTQAINFRA-2100 Change-Id: Iddf47a2a3a5bc38dbed684320120164bb40c028c Reviewed-by: Simo Fält <simo.falt@qt.io>
This commit is contained in:
@@ -5,79 +5,66 @@ param(
|
||||
)
|
||||
. "$PSScriptRoot\helpers.ps1"
|
||||
|
||||
$libclang_version="6.0"
|
||||
|
||||
# PySide versions following 5.6 use a C++ parser based on Clang (http://clang.org/).
|
||||
# The Clang library (C-bindings), version 3.9 or higher is required for building.
|
||||
|
||||
# Starting from Qt 5.11 QDoc requires Clang to parse C++
|
||||
|
||||
Get-Content "$PSScriptRoot\..\shared\sw_versions.txt" | Foreach-Object {
|
||||
$var = $_.Split('=')
|
||||
New-Variable -Name $var[0] -Value $var[1] -Force
|
||||
$libclang_version = $libclang_version -replace '["."]'
|
||||
}
|
||||
|
||||
$zip = Get-DownloadLocation "libclang.7z"
|
||||
$baseDestination = "C:\Utils\libclang-" + $libclang_version + "-" + $toolchain
|
||||
|
||||
function setURL() {
|
||||
$script:url = "https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_$libclang_version-windows-$toolchain`_$archVer.7z"
|
||||
function install() {
|
||||
|
||||
param(
|
||||
[string]$sha1=$1,
|
||||
[string]$destination=$2
|
||||
)
|
||||
|
||||
$zip = "c:\users\qt\downloads\libclang.7z"
|
||||
|
||||
$libclang_version = $libclang_version -replace '["."]'
|
||||
$script:OfficialUrl = "https://download.qt.io/development_releases/prebuilt/libclang/qt/libclang-release_$libclang_version-windows-$toolchain`_$archVer.7z"
|
||||
$script:CachedUrl = "http://ci-files01-hki.intra.qt.io/input/libclang/qt/libclang-release_$libclang_version-windows-$toolchain`_$archVer.7z"
|
||||
|
||||
Download $OfficialUrl $CachedUrl $zip
|
||||
Verify-Checksum $zip $sha1
|
||||
Extract-7Zip $zip C:\Utils\
|
||||
Rename-Item C:\Utils\libclang $destination
|
||||
Remove-Item -Force -Path $zip
|
||||
}
|
||||
|
||||
$toolchainSuffix = ""
|
||||
|
||||
if ( $toolchain -eq "vs2015" ) {
|
||||
if ( $archVer -eq 64 ) {
|
||||
$sha1 = "37afa18d243a50c05bee5c6e16b409ed526ec17a"
|
||||
$sha1 = "a399af949271e6d3bfc578ea2c17ff1d6c6318b9"
|
||||
$destination = $baseDestination + "-64"
|
||||
|
||||
setURL
|
||||
Download $url $url $zip
|
||||
Verify-Checksum $zip $sha1
|
||||
|
||||
Extract-7Zip $zip C:\Utils\
|
||||
Rename-Item C:\Utils\libclang $destination
|
||||
Remove-Item -Force -Path $zip
|
||||
install $sha1 $destination
|
||||
}
|
||||
|
||||
$archVer=32
|
||||
$sha1 = "812b6089c6da99ced9ebebbd42923bd96590519d"
|
||||
$sha1 = "aa3f68f1cfa87780a4631a98ce883d3d9cb94330"
|
||||
$destination = $baseDestination + "-32"
|
||||
|
||||
setURL
|
||||
Download $url $url $zip
|
||||
Verify-Checksum $zip $sha1
|
||||
|
||||
Extract-7Zip $zip C:\Utils\
|
||||
Rename-Item C:\Utils\libclang $destination
|
||||
Remove-Item -Force -Path $zip
|
||||
install $sha1 $destination
|
||||
$toolchainSuffix = "msvc"
|
||||
}
|
||||
|
||||
if ( $toolchain -eq "mingw" ) {
|
||||
if ( $archVer -eq 64 ) {
|
||||
$sha1 = "1233e6c008b90d89483df0291a597a0bac426d29"
|
||||
$sha1 = "b382502f82d1cfa7d3cc3016d909d37edc19c22c"
|
||||
$destination = $baseDestination + "-64"
|
||||
|
||||
setURL
|
||||
Download $url $url $zip
|
||||
Verify-Checksum $zip $sha1
|
||||
|
||||
Extract-7Zip $zip C:\Utils\
|
||||
Rename-Item C:\Utils\libclang $destination
|
||||
Remove-Item -Force -Path $zip
|
||||
install $sha1 $destination
|
||||
}
|
||||
|
||||
$archVer=32
|
||||
$sha1 = "2d6ceab0e1a05e2b19fe615c57b64d36977b4933"
|
||||
$sha1 = "cbc68e0f93f4cb0ed7084a045b7c07a1980a2a44"
|
||||
$destination = $baseDestination + "-32"
|
||||
|
||||
setURL
|
||||
Download $url $url $zip
|
||||
Verify-Checksum $zip $sha1
|
||||
|
||||
Extract-7Zip $zip C:\Utils\
|
||||
Rename-Item C:\Utils\libclang $destination
|
||||
Remove-Item -Force -Path $zip
|
||||
install $sha1 $destination
|
||||
$toolchainSuffix = "mingw"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user