2626
2727set -eu
2828
29- QT_DIR=/usr/local/ opt/qt
29+ QT_DIR=/opt/qt
3030# The following version pinnings are semi-automatically checked for
3131# updates. Verify .github/workflows/bump-dependencies.yaml when changing those manually:
3232AQTINSTALL_VERSION=3.1.18
@@ -45,7 +45,15 @@ setup() {
4545 echo " Using Qt installation from previous run (actions/cache)"
4646 else
4747 echo " Installing Qt"
48- python3 -m pip install " aqtinstall==${AQTINSTALL_VERSION} "
48+ # We may need to create the Qt installation directory and chown it to the runner user to fix permissions
49+ sudo mkdir -p " ${QT_DIR} "
50+ sudo chown " $( whoami) " " ${QT_DIR} "
51+ # Create and enter virtual environment
52+ python3 -m venv venv
53+ # Must hide directory as it just gets created during execution of the previous command and cannot be found by shellcheck
54+ # shellcheck source=/dev/null
55+ source venv/bin/activate
56+ pip install " aqtinstall==${AQTINSTALL_VERSION} "
4957 # Install actual ios Qt:
5058 local qtmultimedia=()
5159 if [[ ! " ${QT_VERSION} " =~ 5\. [0-9]+\. [0-9]+ ]]; then
@@ -58,14 +66,13 @@ setup() {
5866 if [[ ! " ${QT_VERSION} " =~ 5\. [0-9]+\. [0-9]+ ]]; then
5967 # Starting with Qt6, ios' qtbase install does no longer include a real qmake binary.
6068 # Instead, it is a script which invokes the mac desktop qmake.
61- # As of aqtinstall 2.1.0 / 04/2022, desktop qtbase has to be installed manually:
62- python3 -m aqt install-qt --outputdir " ${QT_DIR} " mac desktop " ${QT_VERSION} " --archives qtbase
69+ # As of aqtinstall 2.1.0 / 04/2022, desktop qtbase and qttools including lrelease have to be installed manually:
70+ python3 -m aqt install-qt --outputdir " ${QT_DIR} " mac desktop " ${QT_VERSION} " --archives qtbase qttools
6371 fi
6472
65- # Suppress deprecation of Legacy Build System for now.
66- # TODO: Legacy Build System is removed in xcode 14. Need to migrate
67- # to the Modern Build System instead.
68- /usr/libexec/PlistBuddy -c " Add :DisableBuildSystemDeprecationDiagnostic bool true" /usr/local/opt/qt/" ${QT_VERSION} " /ios/mkspecs/macx-xcode/WorkspaceSettings.xcsettings
73+ # deactivate and remove venv as aqt is no longer needed from here on
74+ deactivate
75+ rm -rf venv
6976 fi
7077}
7178
0 commit comments