Skip to content

Commit

Permalink
Upgrade iOS build script to use venv
Browse files Browse the repository at this point in the history
  • Loading branch information
ann0see committed Dec 23, 2024
1 parent fe6e66b commit 52422f2
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 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}"
# Install actual ios Qt:
local qtmultimedia=()
if [[ ! "${QT_VERSION}" =~ 5\.[0-9]+\.[0-9]+ ]]; then
Expand All @@ -62,10 +70,9 @@ setup() {
python3 -m aqt install-qt --outputdir "${QT_DIR}" mac desktop "${QT_VERSION}" --archives qtbase
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

0 comments on commit 52422f2

Please sign in to comment.