Skip to content

fix(macos): bundle relative transitive dylib dependencies - #12

Draft
wmichelin wants to merge 1 commit into
theokyr:mainfrom
wmichelin:fix/macos-transitive-dylibs
Draft

wmichelin wants to merge 1 commit into
theokyr:mainfrom
wmichelin:fix/macos-transitive-dylibs

Conversation

@wmichelin

Copy link
Copy Markdown

What this changes

The macOS v0.3.0 launcher exits before showing setup because libjxl.0.11.dylib imports @rpath/libjxl_cms.0.11.dylib, which the archive omits. The existing bundler skips relative imports, so this passes the final absolute-Homebrew-path check.

Fixes #11.

  • Keep the existing shell entry point and use a Python 3 standard-library helper to resolve absolute, @rpath, @loader_path, and @executable_path imports recursively. Preserve original library locations and inherited runpaths until dependencies have been found, then flatten and rewrite the staged graph.
  • Fail on unresolved imports, copy/rewrite errors, or staged dependencies that escape the portable folder. Include pre-staged runtime/plugin dylibs and the Project8Recomp player entry.
  • Sign the standalone CI launcher artifact after bundling, matching the full release packager's existing signing order.
  • Add native Mach-O regression tests to macOS CI. Successful fixtures remove the source libraries and launch after relocation; failure cases cover missing imports and copy failures.

Python is needed for packaging only, not by players. No dependency versions, game runtime code, or UI controls change.

Validation

  • Five native packaging tests pass on an Apple M4 Max / macOS 26.5.2. The transitive-relative-import regression fails against the original bundler.
  • Launcher configured and built in Release; both existing CTest tests pass.
  • Fresh launcher bundle: 23 adjacent dylibs, ad-hoc signed; strict document-load smoke test exits successfully with zero warnings/errors.
  • ShellCheck, Python syntax, patch inventory, publishable-tree check, and git diff --check pass.

A complete game release rebuild and gameplay are not tested here; the fixtures and launcher build need no disc data. The smoke test checks loading, not interactive UI behavior.

Checklist

  • This adds no game assets, disc images, default.xex, decrypted intermediates, platform keys, or generated translation units.
  • tools/check_no_game_content.sh passes.
  • The launcher builds and ctest passes.
  • Third-party dependency/NOTICE changes: not applicable; this corrects packaging of existing dependencies.
  • Input-driven launcher changes: not applicable.

@theokyr

theokyr commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Thank you for your contribution! Ping me when it's ready for review, and I'll make sure it's included in the next major release which will also include many GUI fixes as well as the experimental native renderer!

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.

macOS v0.3.0 launcher crashes at startup: missing libjxl_cms.0.11.dylib

2 participants