Skip to content

Commit

Permalink
build: Remove need for system Python to download Qt on macOS. (#7125)
Browse files Browse the repository at this point in the history
  • Loading branch information
Steveice10 authored Nov 6, 2023
1 parent 1f6393e commit 5193a5d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
5 changes: 0 additions & 5 deletions .ci/ios.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/bin/bash -ex

# TODO: Work around pip install issues with Python 3.12 in the GitHub runner image.
# See: https://github.com/actions/runner-images/issues/8709
PYTHON_PATH=$(brew --prefix python@3.11)
export PATH=$PYTHON_PATH/bin:$PYTHON_PATH/libexec/bin:$PATH

mkdir build && cd build
cmake .. -GNinja \
-DCMAKE_BUILD_TYPE=Release \
Expand Down
5 changes: 0 additions & 5 deletions .ci/macos.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/bin/bash -ex

# TODO: Work around pip install issues with Python 3.12 in the GitHub runner image.
# See: https://github.com/actions/runner-images/issues/8709
PYTHON_PATH=$(brew --prefix python@3.11)
export PATH=$PYTHON_PATH/bin:$PYTHON_PATH/libexec/bin:$PATH

mkdir build && cd build
cmake .. -GNinja \
-DCMAKE_BUILD_TYPE=Release \
Expand Down
11 changes: 10 additions & 1 deletion CMakeModules/DownloadExternals.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,22 @@ function(download_qt target)

if (NOT EXISTS "${prefix}")
message(STATUS "Downloading binaries for Qt...")
set(AQT_PREBUILD_BASE_URL "https://github.com/miurahr/aqtinstall/releases/download/v3.1.9")
if (WIN32)
set(aqt_path "${base_path}/aqt.exe")
file(DOWNLOAD
https://github.com/miurahr/aqtinstall/releases/download/v3.1.7/aqt.exe
${AQT_PREBUILD_BASE_URL}/aqt.exe
${aqt_path} SHOW_PROGRESS)
execute_process(COMMAND ${aqt_path} ${install_args}
WORKING_DIRECTORY ${base_path})
elseif (APPLE)
set(aqt_path "${base_path}/aqt-macos")
file(DOWNLOAD
${AQT_PREBUILD_BASE_URL}/aqt-macos
${aqt_path} SHOW_PROGRESS)
execute_process(COMMAND chmod +x ${aqt_path})
execute_process(COMMAND ${aqt_path} ${install_args}
WORKING_DIRECTORY ${base_path})
else()
# aqt does not offer binary releases for other platforms, so download and run from pip.
set(aqt_install_path "${base_path}/aqt")
Expand Down

0 comments on commit 5193a5d

Please sign in to comment.