diff --git a/issues/0051-macos-bundle-assets-cwd-relative.md b/issues/0051-macos-bundle-assets-cwd-relative.md index 2c80076..0d1a69e 100644 --- a/issues/0051-macos-bundle-assets-cwd-relative.md +++ b/issues/0051-macos-bundle-assets-cwd-relative.md @@ -1,3 +1,21 @@ +**FIXED.** Two parts, both needed for Finder/`open` to work: + +1. **cwd-relative assets** — `SdlPlatform.init` now chdir's to + `SDL_GetBasePath()` when running from inside a `.app` (sx commit + `b31fbae`, `library/modules/platform/sdl3.sx`), mirroring uikit.sx's iOS + `chdir_to_bundle`. Gated to the `.app` case so the `sx run` dev flow keeps + the project CWD. +2. **Gatekeeper-rejected signature** — the bundle was signed with a + *Development* cert, which `spctl` rejects, so a standalone `open` wouldn't + launch it. Switched the macOS build to **ad-hoc** signing (the bundler's + macOS/sim default — just leave the codesign identity empty; game commit + `d80a350`, `build.sx`). + +Verified: a plain `cd game && sx build main.sx` then `open +sx-out/macos/SxChess.app` launches and renders (was: instant `stbtt` segfault +on missing font, or no launch at all). It was NOT App Translocation — the +bundle had no `com.apple.quarantine` xattr. + # Symptom A bundled macOS `.app` built with `sx build` crashes on launch when started