Make macOS packaged apps actually work (interactive + assets + entitlements) - #11
Merged
Merged
Conversation
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.
Building a calculator and running it exposed four real bugs that each broke a packaged macOS app. Fixed all four;
bunmaska buildnow produces a working, signed, interactive.appfrom one command (verified end to end: window shows, keyboard/mouse work,9×9 = 81).The four fixes
MacOSWindow.show()now activates the app when a window is shown, so a bundled.appcomes to the foreground.CFRunLoopRunInMode(which renders) but never dispatchedNSAppevents, so clicks/keys were never delivered. The drain now runs the standardnextEventMatchingMask:/sendEvent:loop non-blockingly each tick.bun build --compileembeds JS but not runtime-loaded files.bunmaska buildnow copies the entry's sibling assets (HTML, preload, CSS, images) beside the executable, and the scaffold resolves them viaprocess.execPathwhen compiled.codesign --options runtimeenabled the Hardened Runtime without the entitlements Bun needs, so the app trapped on its first FFI call. The codesign step now grantsallow-jit,allow-unsigned-executable-memory, anddisable-library-validation.Bumps to
0.1.0-alpha.4. Validate green (1596 tests, 0 fail); new unit tests cover the asset predicate and the codesign entitlements.🤖 Generated with Claude Code