mirror of
git://code.qt.io/qt/qt5.git
synced 2026-05-09 12:37:50 +08:00
Relax jq dependency from provisioning
We may read the installed package information from the 'vcpkg list' command instead of parsing the vcpkg.json. Also instead of using the jq as a parser, use the cmake script. This allows skipping the jq installation. Change-Id: Id3ace62f8f40ff1bd059878da3fd13e466861830 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
@@ -8,19 +8,18 @@ param([string]$arch="x64")
|
||||
Write-Host "Installing vcpkg ports"
|
||||
$vcpkgExe = "$env:VCPKG_ROOT\vcpkg.exe"
|
||||
$vcpkgRoot = "$env:VCPKG_ROOT"
|
||||
$vcpkgInstallRoot = "$arch-windows-qt-tmp"
|
||||
|
||||
Set-Location -Path "$PSScriptRoot\vcpkg"
|
||||
Copy-Item "$PSScriptRoot\..\shared\vcpkg-configuration.json" -Destination "$PSScriptRoot\vcpkg"
|
||||
|
||||
Run-Executable "$vcpkgExe" "install --triplet $arch-windows-qt --x-install-root $arch-windows-qt-tmp --debug"
|
||||
Run-Executable "$vcpkgExe" "install --triplet $arch-windows-qt --x-install-root $vcpkginstallroot --debug"
|
||||
|
||||
New-Item -Path "$vcpkgRoot" -Name "installed" -ItemType "directory" -Force
|
||||
Copy-Item -Path "$arch-windows-qt-tmp\*" -Destination "$vcpkgRoot\installed" -Recurse -Force
|
||||
Copy-Item -Path "$vcpkginstallroot\*" -Destination "$vcpkgRoot\installed" -Recurse -Force
|
||||
|
||||
$versions = jq.exe -r '.overrides[] | \"vcpkg \(.name) = \(.version)\"' vcpkg.json
|
||||
$versions = $versions.Replace("vcpkg", "`nvcpkg")
|
||||
Write-Output "$versions" >> ~/versions.txt
|
||||
Run-Executable "cmake" "-DVCPKG_EXECUTABLE=$vcpkgExe -DVCPKG_INSTALL_ROOT=$vcpkgInstallRoot -DOUTPUT=$env:USERPROFILE\versions.txt -P $PSScriptRoot\..\shared\vcpkg_parse_packages.cmake"
|
||||
|
||||
Remove-Item -Path "$arch-windows-qt-tmp" -Recurse -Force
|
||||
Remove-Item -Path "$vcpkginstallroot" -Recurse -Force
|
||||
|
||||
Set-Location "$PSScriptRoot"
|
||||
|
||||
Reference in New Issue
Block a user