Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade iOS Build to Qt6 #3445

Merged
merged 1 commit into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions .github/autobuild/ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

set -eu

QT_DIR=/usr/local/opt/qt
QT_DIR=/opt/qt
# The following version pinnings are semi-automatically checked for
# updates. Verify .github/workflows/bump-dependencies.yaml when changing those manually:
AQTINSTALL_VERSION=3.1.18
Expand All @@ -45,7 +45,15 @@ setup() {
echo "Using Qt installation from previous run (actions/cache)"
else
echo "Installing Qt"
python3 -m pip install "aqtinstall==${AQTINSTALL_VERSION}"
# We may need to create the Qt installation directory and chown it to the runner user to fix permissions
sudo mkdir -p "${QT_DIR}"
sudo chown "$(whoami)" "${QT_DIR}"
# Create and enter virtual environment
python3 -m venv venv
# Must hide directory as it just gets created during execution of the previous command and cannot be found by shellcheck
# shellcheck source=/dev/null
source venv/bin/activate
pip install "aqtinstall==${AQTINSTALL_VERSION}"
Comment on lines +48 to +56
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to be in line with macOS

# Install actual ios Qt:
local qtmultimedia=()
if [[ ! "${QT_VERSION}" =~ 5\.[0-9]+\.[0-9]+ ]]; then
Expand All @@ -58,14 +66,13 @@ setup() {
if [[ ! "${QT_VERSION}" =~ 5\.[0-9]+\.[0-9]+ ]]; then
# Starting with Qt6, ios' qtbase install does no longer include a real qmake binary.
# Instead, it is a script which invokes the mac desktop qmake.
# As of aqtinstall 2.1.0 / 04/2022, desktop qtbase has to be installed manually:
python3 -m aqt install-qt --outputdir "${QT_DIR}" mac desktop "${QT_VERSION}" --archives qtbase
# As of aqtinstall 2.1.0 / 04/2022, desktop qtbase and qttools including lrelease have to be installed manually:
python3 -m aqt install-qt --outputdir "${QT_DIR}" mac desktop "${QT_VERSION}" --archives qtbase qttools
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary to have lrelease in the correct spot. Otherwise the build fails.

fi

# Suppress deprecation of Legacy Build System for now.
# TODO: Legacy Build System is removed in xcode 14. Need to migrate
# to the Modern Build System instead.
/usr/libexec/PlistBuddy -c "Add :DisableBuildSystemDeprecationDiagnostic bool true" /usr/local/opt/qt/"${QT_VERSION}"/ios/mkspecs/macx-xcode/WorkspaceSettings.xcsettings
# deactivate and remove venv as aqt is no longer needed from here on
deactivate
rm -rf venv
fi
}

Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,13 @@ jobs:

- config_name: iOS (artifacts)
target_os: ios
building_on_os: macos-12
base_command: QT_VERSION=5.15.2 ./.github/autobuild/ios.sh
building_on_os: macos-14
base_command: QT_VERSION=6.7.3 ./.github/autobuild/ios.sh
# Build failed with CodeQL enabled when last tested 03/2022 (#2490).
# There are no hints that iOS is supposed to be supported by CodeQL.
# Therefore, disable it:
run_codeql: false
# Unfortunately, more modern Xcode versions no longer seem to support
# Qt 5.15.2. Therefore upgrading to Qt6 is needed in the medium term (#2711)
Copy link
Collaborator

@pljones pljones Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So does this "Fixes: #2711", too? Or was this comment a bit overoptimistic?

xcode_version: 13.4.1
xcode_version: 15.4.0

- config_name: Windows (artifact+codeQL)
target_os: windows
Expand Down
Loading