PageRenderTime 52ms CodeModel.GetById 27ms RepoModel.GetById 0ms app.codeStats 0ms

/coin/provisioning/common/windows/libclang-v100-dyn.ps1

https://gitlab.com/f3822/qt5
Powershell | 50 lines | 34 code | 13 blank | 3 comment | 5 complexity | 8170196b1a895c48626ac8fde1849838 MD5 | raw file
  1. param(
  2. [Int32]$archVer=32,
  3. [string]$toolchain="vs2019",
  4. [bool]$setDefault=$true
  5. )
  6. . "$PSScriptRoot\helpers.ps1"
  7. $libclang_version="10.0"
  8. Write-Output "libClang for QtForPython = $libclang_version" >> ~/versions.txt
  9. # PySide versions following Qt6 use a C++ parser based on Clang (http://clang.org/).
  10. # The Clang library (C-bindings), version 8.0 or higher is required for building.
  11. # Starting from Qt 5.11 QDoc requires Clang to parse C++
  12. $baseDestination = "C:\Utils\libclang-" + $libclang_version + "-dynlibs-" + $toolchain
  13. $libclang_version = $libclang_version -replace '["."]'
  14. function install() {
  15. param(
  16. [string]$sha1=$1,
  17. [string]$destination=$2
  18. )
  19. $zip = "c:\users\qt\downloads\libclang-dyn.7z"
  20. $script:OfficialUrl = "https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_$libclang_version-based-windows-$toolchain`_$archVer.7z"
  21. $script:CachedUrl = "http://ci-files01-hki.intra.qt.io/input/libclang/dynamic/libclang-release_$libclang_version-based-windows-$toolchain`_$archVer.7z"
  22. Download $OfficialUrl $CachedUrl $zip
  23. Verify-Checksum $zip $sha1
  24. Extract-7Zip $zip C:\Utils\
  25. Rename-Item C:\Utils\libclang $destination
  26. Remove-Item -Force -Path $zip
  27. }
  28. if ( $toolchain -eq "vs2019" ) {
  29. if ( $archVer -eq 64 ) {
  30. $sha1 = "B2C4F24B2388AEBAA6B8FCE3AE4E63D34D1517FE"
  31. }
  32. else {
  33. $sha1 = "b970f51df255a27e0fdb7b665e70ed5281257f40"
  34. }
  35. }
  36. install $sha1 $baseDestination-$archVer
  37. Set-EnvironmentVariable "LLVM_DYNAMIC_LIBS_100" ($baseDestination + "-_ARCH_")