Skip to content

Commit

Permalink
Autobuild: Mac: Add >=Qt6.2 bin path support
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hoffie committed Feb 2, 2022
1 parent fa7d79e commit 875fd92
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion autobuild/mac/artifacts/autobuild_mac_1_prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

8 changes: 7 additions & 1 deletion autobuild/mac/codeQL/autobuild_mac_1_prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

0 comments on commit 875fd92

Please sign in to comment.