Use dylibbundler to copy and resign libs to support local native arm64 builds. #71314
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.
Summary
Build "Use dylibbundler for mac builds"
Purpose of change
The default build setup does not work out of the box on a fresh arm mac. The issue seems to be gaps with the copy mac libs step. It misses some dylibs and doesn't resign them as needed to run on a mac arm.
Describe the solution
dylibbundler is a third party program for this exact purpose. It seems to implement better logic for finding dylibs, and also handles code resigning for arm macs.
Describe alternatives you've considered
Testing
make app
on my mac, and I can immediately successfully run the built app. Push to my master branch, download the dmg release build, and it runs too (https://github.com/akrieger/Cataclysm-DDA/releases/tag/cdda-experimental-2024-01-28-1409).Additional context
Need to also update the homebrew bottle after this.