Use brew --prefix for PATH in build-mac-dmg.sh (Apple Silicon support)#6005
Open
geekrebel wants to merge 1 commit into
Open
Use brew --prefix for PATH in build-mac-dmg.sh (Apple Silicon support)#6005geekrebel wants to merge 1 commit into
geekrebel wants to merge 1 commit into
Conversation
…H in installer/build-mac-dmg.sh with Homebrew-prefix detection, so the script runs on both Apple Silicon (/opt/homebrew) and Intel (/usr/local) Macs. The removed entries (the Python 3.7 Cellar path and /usr/local/qt5/5.5/clang_64/bin) are unused by this script: grep confirms it never invokes python, qmake, or any Qt tool. On Intel Macs the effective PATH is unchanged (BREW_PREFIX resolves to /usr/local). If brew is not installed we fall back to /usr/local, preserving the previous default. This also resolves the existing "XXX: These paths should be set using `brew prefix` commands" TODO comment that was already in the file. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
installer/build-mac-dmg.shcurrently starts with:Two problems:
/usr/local/Cellar/python@3.7/3.7.9_2/...path is wrong on anyApple Silicon Mac (Homebrew there lives at
/opt/homebrew), so the scriptcannot run end-to-end on an arm64 runner. Python 3.7 itself has also been
EOL since June 2023.
/usr/local/qt5/5.5/clang_64/binentry is similarly stale; Qt 5.5was released in 2015, and the rest of the project actually uses Qt 5.15
(see
freeze.py:477).Neither of those entries is actually used by this script: a grep confirms
build-mac-dmg.shnever invokespython,qmake, or any Qt tool. The onlything it needs on PATH is Homebrew's
binforappdmg; all ofcodesign,xcrun,spctl,stapler, and the coreutils are under/usr/binand/binalready.This PR replaces the hard-coded line with a small
brew --prefixprobe that:/opt/homebrewon Apple Silicon,/usr/localon Intel Macs (so existing Intel Mac buildpipelines produce a byte-identical PATH, with no behavioural change),
/usr/localif Homebrew is not installed at all.It also resolves the existing
# XXX: These paths should be set usingbrew prefixcommandsTODO comment in the file.This is the third in a small series of Apple Silicon contributor PRs
(following #6003 "Apple VideoToolbox" label rename, and #6004 arch-aware
DMG naming). The next planned change is the
/Users/jonathanthomas/...hard-coded developer path in
installer/fix_qt5_rpath.py:115.