From 875fd925109eb5d0c3fc1026136cff072452a639 Mon Sep 17 00:00:00 2001 From: Christian Hoffmann Date: Thu, 27 Jan 2022 01:23:15 +0100 Subject: [PATCH] Autobuild: Mac: Add >=Qt6.2 bin path support With Qt 6.2 the binary location path changed from `clang_64` to `macos`. Therefore, check both places now to support the full range of relevant Qt releases. --- autobuild/mac/artifacts/autobuild_mac_1_prepare.sh | 8 +++++++- autobuild/mac/codeQL/autobuild_mac_1_prepare.sh | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/autobuild/mac/artifacts/autobuild_mac_1_prepare.sh b/autobuild/mac/artifacts/autobuild_mac_1_prepare.sh index cf5d399621..c9206b5cb2 100755 --- a/autobuild/mac/artifacts/autobuild_mac_1_prepare.sh +++ b/autobuild/mac/artifacts/autobuild_mac_1_prepare.sh @@ -18,7 +18,13 @@ python3 -m pip install aqtinstall python3 -m aqt install-qt --outputdir /usr/local/opt/qt mac desktop ${QT_VER} # add the qt binaries to the path -export -p PATH=/usr/local/opt/qt/${QT_VER}/clang_64/bin:"${PATH}" +# The clang_64 entry can be dropped when Qt <6.2 compatibility is no longer needed. +for qt_path in /usr/local/opt/qt/${QT_VER}/macos/bin /usr/local/opt/qt/${QT_VER}/clang_64/bin; do + if [[ -d $qt_path ]]; then + export -p PATH="${qt_path}:${PATH}" + break + fi +done echo "::set-env name=PATH::${PATH}" echo "the path is ${PATH}" diff --git a/autobuild/mac/codeQL/autobuild_mac_1_prepare.sh b/autobuild/mac/codeQL/autobuild_mac_1_prepare.sh index 14b77b6ac3..51d7f25c6e 100755 --- a/autobuild/mac/codeQL/autobuild_mac_1_prepare.sh +++ b/autobuild/mac/codeQL/autobuild_mac_1_prepare.sh @@ -18,7 +18,13 @@ python3 -m pip install aqtinstall python3 -m aqt install-qt --outputdir /usr/local/opt/qt mac desktop ${QT_VER} # add the qt binaries to the path -export -p PATH=/usr/local/opt/qt/${QT_VER}/clang_64/bin:"${PATH}" +# The clang_64 entry can be dropped when Qt <6.2 compatibility is no longer needed. +for qt_path in /usr/local/opt/qt/${QT_VER}/macos/bin /usr/local/opt/qt/${QT_VER}/clang_64/bin; do + if [[ -d $qt_path ]]; then + export -p PATH="${qt_path}:${PATH}" + break + fi +done echo "::set-env name=PATH::${PATH}" echo "the path is ${PATH}"