Repository navigation
Conversation
Split MadeiraApp's start-up work into MadeiraBoot.run() (runs once) and its scene content into MadeiraRootView, and add two C entry points so a host app that loads Madeira as a dynamic library can show it and pass it URLs. The Madeira app itself behaves as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This lets another app host Madeira. Triptych, a GPL project that combines Madeira, BCD, Henge and LinuxRunner in one iOS app, loads Madeira's binary as a dynamic library and shows it in its own window.
MadeiraApp.init's start-up work moves toMadeiraBoot.run(), guarded so it runs once.WindowGroupcontent moves toMadeiraRootView.@_cdecl("madeira_embed_make_root")returns a retainedUIViewController(aUIHostingControllerofMadeiraRootView) after running the start-up work.@_cdecl("madeira_embed_open_url")passes a URL to the same handlers as.onOpenURL: the JIT network shortcut, game setup and shortcuts.The Madeira app itself is unchanged:
MadeiraAppcallsMadeiraBoot.run()and showsMadeiraRootView.Not built against current
mainhere (no full Xcode project build on this machine). The patch came from Triptych's tree and applies cleanly tomain. If you'd rather not carry C entry points, theMadeiraBoot/MadeiraRootViewsplit alone would still let a host do this with a small shim.🤖 Generated with Claude Code