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:
Alexey Edelev
2025-01-08 17:58:25 +01:00
parent 3145c3a5ed
commit c259d85b8e
33 changed files with 77 additions and 138 deletions

View File

@@ -14,9 +14,17 @@ mkdir -p "$VCPKG_ROOT/installed"
cp -R x86-android-qt-tmp/* "$VCPKG_ROOT/installed/"
cp -R x86_64-android-qt-tmp/* "$VCPKG_ROOT/installed/"
versions=$(jq -r '.overrides[] | "vcpkg \(.name) for android = \(.version)"' vcpkg.json)
versions="${versions//vcpkg/\\nvcpkg}"
echo "$versions" >> ~/versions.txt
cmake "-DVCPKG_EXECUTABLE=$VCPKG_ROOT/vcpkg"\
"-DVCPKG_INSTALL_ROOT=$PWD/x86-android-qt-tmp"\
"-DOUTPUT=~/versions.txt"\
-P\
"${BASH_SOURCE%/*}/../shared/vcpkg_parse_packages.cmake"
cmake "-DVCPKG_EXECUTABLE=$VCPKG_ROOT/vcpkg"\
"-DVCPKG_INSTALL_ROOT=$PWD/x86_64-android-qt-tmp"\
"-DOUTPUT=$HOME/versions.txt"\
-P\
"${BASH_SOURCE%/*}/../shared/vcpkg_parse_packages.cmake"
rm -rf x86-android-qt-tmp
rm -rf x86_64-android-qt-tmp

View File

@@ -7,15 +7,19 @@ echo "Installing vcpkg ports"
pushd "${BASH_SOURCE%/*}/vcpkg" || exit
cp "${BASH_SOURCE%/*}/../shared/vcpkg-configuration.json" .
"$VCPKG_ROOT/vcpkg" install --triplet x64-linux-qt --x-install-root x64-linux-qt-tmp --debug
install_root=x64-linux-qt-tmp
"$VCPKG_ROOT/vcpkg" install --triplet x64-linux-qt --x-install-root $install_root --debug
cmake "-DVCPKG_EXECUTABLE=$VCPKG_ROOT/vcpkg"\
"-DVCPKG_INSTALL_ROOT=$PWD/$install_root"\
"-DOUTPUT=$HOME/versions.txt"\
-P\
"${BASH_SOURCE%/*}/../shared/vcpkg_parse_packages.cmake"
mkdir -p "$VCPKG_ROOT/installed"
cp -R x64-linux-qt-tmp/* "$VCPKG_ROOT/installed/"
cp -R $install_root/* "$VCPKG_ROOT/installed/"
versions=$(jq -r '.overrides[] | "vcpkg \(.name) = \(.version)"' vcpkg.json)
versions="${versions//vcpkg/\\nvcpkg}"
echo "$versions" >> ~/versions.txt
rm -rf x64-linux-qt-tmp
rm -rf $install_root
popd || exit