feat(macos): add native Files and managed OpenStrike windows - #13
Draft
lodyai[bot] wants to merge 10 commits into
Draft
lodyai[bot] wants to merge 10 commits into
lodyai[bot] wants to merge 10 commits into
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.
Pocket Shell ships as a standalone macOS app with a 1024×768 desktop, Files, Devices and Minesweeper, plus Cards, Motions and Stats as independent PocketJS packages. Files browses the real Mac filesystem through paginated snapshots, history, keyboard navigation and scrolling. Its sidebar contains Home, Native Apps and Pocket Apps. Native Apps displays the applications’ actual macOS icons and opens them through Launch Services; visible rows own and release their icon textures.
OpenStrike now opens in a resizable Shell window. The generic native-package installer signs and hashes a module into the System installation plan; PocketJS loads it on demand, composites its GPU surface, routes focused input, suspends it when minimized and destroys its state when closed. Other trusted, co-built native apps use the same package format through
POCKET_NATIVE_APPS. No OpenStrike process or separate OS window is launched. Clicking inside captures the pointer; Escape releases it. Window borders, menus, dragging, resizing, Cmd+M and Cmd+W retain Shell ownership.Devices directly shows connected Sony PSP and iPod touch 4 hardware in switchable icon/list views, with compact chrome in Aqua, XP and Classic 98. Device classes only select shared artwork. Semantic bitmap icons support theme overrides and Aqua fallback; Files uses Blender/pixel artwork throughout, OpenStrike has a rifle icon, Aqua navigation controls use antialiased raster faces, narrow captions avoid controls, and the Dock animates between empty and populated states.
Dependencies: PocketJS #451 provides the general native module SDK and host lifecycle. OpenStrike #24, based on #21, provides the game adapter and package builder.
vendor/pocketjspins the published SDK commit. Native modules require matching SDK/compiler/profile and GPU dependency fingerprints and run with host-process permissions. Files currently supports browsing/opening; filesystem editing is not implemented.Reproduce the packaged game with an updated OpenStrike checkout and an existing cooked map:
OPENSTRIKE_ROOT=/path/to/open-strike-native-checkout \ OPENSTRIKE_MAPS=/path/to/cooked/maps \ bun run desktop build bun run desktop test:macos open "shells/desktop/dist/Pocket Shell.app"The resulting signed bundle contains the module, HUD, model and map and runs without either checkout. Maps, binaries, editable Blender scenes and validation captures remain ignored local artifacts.
Validation on Apple M3 Max / Metal:
bun run check: 187 tests passed with all three shells’ type checks and asset audit. The desktop simulator includes native content versus resize-border input routing and per-window failure recovery.bun run desktop test:macos: 2 tests / 119 assertions passed on the final bundle, including signing, 1024×768 viewport, native package contents, bounded application icon pages and distinct Finder/Calculator artwork.7fa4afedon macOS/Linux and shared contracts. Locally, 8 Rust host tests passed, including an independent dylib with real GPU readback, two-instance isolation, close/reopen state release and invalid ABI/build/hash rejection.~/Applications/Pocket Shell.appafter preserving the old bundle in ignored validation storage. Captures and logs are in.pocket-build/validation/native-modules/.