Skip to content

Bundle SDL3 for sdl2-compat and smoke-test the signed Mac app - #5

Merged
kranzky merged 1 commit into
mainfrom
fix-mac-bundle
Sep 28, 2026
Merged

kranzky merged 1 commit into
mainfrom
fix-mac-bundle

Conversation

@kranzky

@kranzky kranzky commented Sep 28, 2026

Copy link
Copy Markdown
Owner

Found while shipping 1.2.0. The published Mac build was made with this script.

Homebrew's sdl2 formula is now sdl2-compat, a shim that implements SDL2 on top of SDL3 and loads SDL3 when it starts. build_release.sh bundled only the shim, so inside the app it couldn't find SDL3, showed a modal error dialog while loading, and the game never started. Notarisation and Gatekeeper don't run the app, so both still passed.

  • Detect sdl2-compat and bundle Homebrew's libSDL3.0.dylib as Contents/Frameworks/libSDL3.dylib, the first place the shim looks, and sign it along with the rest.
  • Smoke-test the signed app before notarising: render a frame in screenshot mode (with a scratch HOME) and fail after 30 seconds, since a missing library shows a dialog instead of exiting.
  • Configure the release build fresh each time. A stale CMake cache pointing at a removed Xcode SDK broke the first attempt.

🤖 Generated with Claude Code

Homebrew's sdl2 is now sdl2-compat, which loads SDL3 at startup. Only
the shim was bundled, so the released app showed an error dialog and
never started. Bundle libSDL3.dylib beside it (where the shim looks
first) and sign it with the rest.

Also launch the signed app in screenshot mode before notarising, and
fail if it doesn't render a frame within 30 seconds, and always
configure the release build fresh so a stale CMake cache can't break it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kranzky
kranzky merged commit 52f485b into main Sep 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant