build: add macOS SDL to thirdparty, add .dylib to bundle #1345
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.
Description
Adds SDL (properly) to Mac builds.
This time, it has been added as a fully fledged optional dependency in
thirdparty
, à la MoltenVK, and built from source before ares. We build from source because brew installations are both single-architecture and not fully portable.The .dylib is copied inside the app bundle when linking, at the same stage as MoltenVK.
The initialization of
ares.dylibs
has been moved from ares's Makefile to thedesktop-ui
Makefile so that it's initialized when building ruby, which it wasn't previously.The SDL build is also added to CI, with the same caching methods as used for MVK.
Relevant Details
HEAD
points at SDL 2.28.5 currently, which is the most recent stable release. This should probably be periodically incremented as appropriate.SDL is currently built with the macOS deployment target of 10.13. While SDL's minimum supported macOS version is 10.11, ares CI is using Xcode 14.2, which has a minimum deployment target of 10.13. I am currently testing to see if I can get the deployment target lower without breaking other parts of ares's CI.resolved, per below; SDL supporting 10.11 is built + bundled.Testing
This has been tested to build properly locally and via GitHub CI. The .dylib is packaged inside the bundle correctly and SDL functions correctly in my testing, even if the user does not have SDL installed elsewhere on their system.
This is seeking tests from other Mac users, especially on older operating systems, to verify that SDL works correctly there.