From c63b5fb4e59f33a109ff98f5aade4bdcdfd72063 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 16 Sep 2026 17:26:01 +0200 Subject: [PATCH] coin: generate vcpkg attribution files during provisioning Run vcpkg_generate_attributions.py after installing the ports, so the generated qt_attribution.json files and the port index are written in place into $VCPKG_ROOT/installed, next to the libraries they describe. The OHOS wrapper needs no change, it delegates to install-vcpkg-ports.sh. Task-number: QTBUG-150865 Change-Id: Ib9b9cded132dac9b574bcadc05c939e6ed352946 Reviewed-by: Alexandru Croitor --- .../common/linux/install-vcpkg-ports-android.sh | 6 ++++++ coin/provisioning/common/unix/install-vcpkg-ports.sh | 4 ++++ .../common/windows/install-vcpkg-ports-android.ps1 | 3 +++ coin/provisioning/common/windows/install-vcpkg-ports.ps1 | 3 +++ 4 files changed, 16 insertions(+) diff --git a/coin/provisioning/common/linux/install-vcpkg-ports-android.sh b/coin/provisioning/common/linux/install-vcpkg-ports-android.sh index c1bbbb77..1bad78a6 100755 --- a/coin/provisioning/common/linux/install-vcpkg-ports-android.sh +++ b/coin/provisioning/common/linux/install-vcpkg-ports-android.sh @@ -12,6 +12,12 @@ mkdir -p "$VCPKG_ROOT/installed" cp -R x86-android-qt-tmp/* "$VCPKG_ROOT/installed/" cp -R x86_64-android-qt-tmp/* "$VCPKG_ROOT/installed/" +for triplet in x86-android-qt x86_64-android-qt; do + python3 "${BASH_SOURCE%/*}/../shared/vcpkg_generate_attributions.py" \ + --install-root "$VCPKG_ROOT/installed" \ + --triplet "$triplet" +done + cmake "-DVCPKG_EXECUTABLE=$VCPKG_ROOT/vcpkg"\ "-DVCPKG_INSTALL_ROOT=$PWD/x86-android-qt-tmp"\ "-DOUTPUT=$HOME/versions.txt"\ diff --git a/coin/provisioning/common/unix/install-vcpkg-ports.sh b/coin/provisioning/common/unix/install-vcpkg-ports.sh index dc8a10ef..f3143faf 100755 --- a/coin/provisioning/common/unix/install-vcpkg-ports.sh +++ b/coin/provisioning/common/unix/install-vcpkg-ports.sh @@ -23,6 +23,10 @@ cmake "-DVCPKG_EXECUTABLE=$VCPKG_ROOT/vcpkg"\ mkdir -p "$VCPKG_ROOT/installed" cp -R $install_root/* "$VCPKG_ROOT/installed/" +python3 "${BASH_SOURCE%/*}/../shared/vcpkg_generate_attributions.py" \ + --install-root "$VCPKG_ROOT/installed" \ + --triplet "$1" + SetEnvVar "VCPKG_INSTALLED_DIR" "$VCPKG_ROOT/installed/" rm -rf $install_root diff --git a/coin/provisioning/common/windows/install-vcpkg-ports-android.ps1 b/coin/provisioning/common/windows/install-vcpkg-ports-android.ps1 index 8ab614cc..62feaf58 100644 --- a/coin/provisioning/common/windows/install-vcpkg-ports-android.ps1 +++ b/coin/provisioning/common/windows/install-vcpkg-ports-android.ps1 @@ -13,6 +13,9 @@ Run-Executable "$vcpkgExe" "install --triplet armeabi-v7a-android-qt --x-install New-Item -Path "$vcpkgRoot" -Name "installed" -ItemType "directory" -Force Copy-Item -Path "$vcpkgInstallRoot\*" -Destination "$vcpkgRoot\installed" -Recurse -Force +$pythonExe = "$([System.Environment]::GetEnvironmentVariable('PYTHON3_PATH', 'Machine'))\python.exe" +Run-Executable "$pythonExe" "$PSScriptRoot\..\shared\vcpkg_generate_attributions.py --install-root $vcpkgRoot\installed --triplet armeabi-v7a-android-qt" + 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 "$vcpkgInstallRoot" -Recurse -Force diff --git a/coin/provisioning/common/windows/install-vcpkg-ports.ps1 b/coin/provisioning/common/windows/install-vcpkg-ports.ps1 index a20ce0f4..9f18fac7 100644 --- a/coin/provisioning/common/windows/install-vcpkg-ports.ps1 +++ b/coin/provisioning/common/windows/install-vcpkg-ports.ps1 @@ -16,6 +16,9 @@ Run-Executable "$vcpkgExe" "install --triplet $arch-windows-qt --x-install-root New-Item -Path "$vcpkgRoot" -Name "installed" -ItemType "directory" -Force Copy-Item -Path "$vcpkginstallroot\*" -Destination "$vcpkgRoot\installed" -Recurse -Force +$pythonExe = "$([System.Environment]::GetEnvironmentVariable('PYTHON3_PATH', 'Machine'))\python.exe" +Run-Executable "$pythonExe" "$PSScriptRoot\..\shared\vcpkg_generate_attributions.py --install-root $vcpkgRoot\installed --triplet $arch-windows-qt" + Run-Executable "cmake" "-DVCPKG_EXECUTABLE=$vcpkgExe -DVCPKG_INSTALL_ROOT=$vcpkgInstallRoot -DOUTPUT=$env:USERPROFILE\versions.txt -P $PSScriptRoot\..\shared\vcpkg_parse_packages.cmake" Set-EnvironmentVariable "VCPKG_INSTALLED_DIR" "$vcpkgRoot\installed"