Skip to content

Commit 93e89de

Browse files
committed
Upgrade iOS Build to Qt6
This still has some UI issues. However, upgrading is needed as the CI no longer supports older macOS versions
1 parent 8f50123 commit 93e89de

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

.github/autobuild/ios.sh

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
set -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:
3232
AQTINSTALL_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

.github/workflows/autobuild.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,13 @@ jobs:
250250

251251
- config_name: iOS (artifacts)
252252
target_os: ios
253-
building_on_os: macos-12
254-
base_command: QT_VERSION=5.15.2 ./.github/autobuild/ios.sh
253+
building_on_os: macos-14
254+
base_command: QT_VERSION=6.7.3 ./.github/autobuild/ios.sh
255255
# Build failed with CodeQL enabled when last tested 03/2022 (#2490).
256256
# There are no hints that iOS is supposed to be supported by CodeQL.
257257
# Therefore, disable it:
258258
run_codeql: false
259-
# Unfortunately, more modern Xcode versions no longer seem to support
260-
# Qt 5.15.2. Therefore upgrading to Qt6 is needed in the medium term (#2711)
261-
xcode_version: 13.4.1
259+
xcode_version: 15.4.0
262260

263261
- config_name: Windows (artifact+codeQL)
264262
target_os: windows

0 commit comments

Comments
 (0)