Files
qt5/coin/provisioning/common/windows/ninja.ps1
Elias Toivola 3fc4fe9e00 Add Windows 11 24h2 x86_64 UEFI with non-blocking tests
There are two image templates right away: -70 is Windows 11 with no
Visual Studio or Windows SDK ever installed. -71 includes VS2022 17.9.1
(MSVC 14.39.33519) and Windows SDK 10.0.26100.1742

Image changes compared to 23h2:
- VS2019 is left out as it's no longer used in provisioning scripts.
- Old DirectX installation (10-dxsdk.ps1) is left out. It's legacy,
  originally used for Windows 7, and newer libraries should be found
  from Windows SDK.
- 08-libclang-v100-dyn.ps1 is removed as it's no longer used. It had
  dependency to VS2019.
- These images use UEFI instead of BIOS.
[CI Platforms]

Task-number: QTQAINFRA-6734
Task-number: QTQAINFRA-6823
Change-Id: I53a62c74b07d7fbfc9b1afbe44444272ae7c51e7
Reviewed-by: Tero Heikkinen <tero.heikkinen@qt.io>
2025-04-11 08:43:08 +00:00

63 lines
2.2 KiB
PowerShell

. "$PSScriptRoot\helpers.ps1"
$cpu_arch = Get-CpuArchitecture
switch ($cpu_arch) {
arm64 {
$arch = "arm64"
$version = "1.12.0"
$longPathFixed = $true # fixed https://github.com/ninja-build/ninja/pull/2225 in 1.12.0
$zip = Get-DownloadLocation "ninja-$version-win-$arch.zip"
$internalUrl = "https://ci-files01-hki.ci.qt.io/input/ninja/ninja-$version-win-$arch.zip"
$externalUrl = "https://github.com/ninja-build/ninja/releases/download/v$version/ninja-win$arch.zip"
$sha1 = "51bf1bac149ae1e3d1572fa9fa87d6431dbddc8b"
Break
}
x64 {
$arch = "amd64"
$version = "1.10.2"
$longPathFixed = $false
$zip = Get-DownloadLocation "ninja-$version-win-x86.zip"
$internalUrl = "https://ci-files01-hki.ci.qt.io/input/ninja/ninja-$version-win-really-x86.zip"
$externalUrl = "http://master.qt.io/development_releases/prebuilt/ninja/v$version/ninja-win-x86.zip"
$sha1 = "1a22ee9269df8ed69c4600d7ee4ccd8841bb99ca"
Break
}
default {
throw "Unknown architecture $cpu_arch"
}
}
Download $externalUrl $internalUrl $zip
Verify-Checksum $zip $sha1
Extract-7Zip $zip C:\Utils\Ninja
Remove "$zip"
Add-Path "C:\Utils\Ninja"
Write-Output "Ninja ($arch) = $version" >> ~/versions.txt
if ( -Not $longPathFixed ) {
$manifest = @"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<application>
<windowsSettings>
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
</assembly>
"@
$vs2019 = [System.IO.File]::Exists("C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat")
if($vs2019) {
Invoke-MtCommand "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat" amd64 $manifest "C:\Utils\Ninja\ninja.exe"
} else {
Invoke-MtCommand "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat" amd64 $manifest "C:\Utils\Ninja\ninja.exe"
}
}