feat(macos): packaged app bundle scaffolding (#165) - #166
Merged
Merged
Conversation
Phase 0 of the self-contained deckd.app: the daemon seam and the packaging artifacts, all buildable/testable on Linux except the AppKit wrapper. - Split __main__.main() into parse_args()/build_server()/serve() so the app can construct a Server and run it on a background thread without installing signal handlers. Pure refactor; _build_sinks and _overlay_dir_for are unchanged. - Add deckd.macos_app: resource discovery, seed-once layout install, argv construction, and a thread-based ServerRunner. - Add packaging/macos/menubar.py (PyObjC status item) and deckd.spec (PyInstaller, LSUIElement, ad-hoc signed) plus just build-macos-app and build-macos-dmg. - Add the [packaging] extra (PyInstaller), tests, and docs. Refs #165
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.
Phase 0 of #165 — the self-contained
deckd.appscaffolding. Everything here builds and is testable on Linux except the AppKit wrapper and the frozen bundle itself, which need macOS.What changed
main()is split intoparse_args()/build_server()/serve().serve()gainsinstall_signal_handlers(the CLI keeps the default) and anon_startedtask handle, so the app can run the server on a background thread whereloop.add_signal_handleris illegal._build_sinks/_overlay_dir_forare untouched.deckd.macos_app. Platform-independent bundle helpers: frozen-awareresource_root(), seed-onceseed_layouts()(writes to~/Library/Application Support/deckd/layouts),app_argv(), and a thread-basedServerRunner.packaging/macos/menubar.py. PyObjC status-item app (no Dock icon): Open surface / Open layouts folder / Restart server / Allow LAN access / Quit. Localhost-only until LAN is toggled.packaging/macos/deckd.spec. PyInstaller recipe bundling the client (web/) and layouts;LSUIElement, bundle idcom.deckd.daemon, ad-hoc signed, not notarized.just build-macos-app/build-macos-dmg(refuse to run off-mac), the[packaging]extra, tests, and docs.Verification
pyright daemon— cleanpytest— 739 passed (newtests/test_app.pycovers seeding, argv, andServerRunnerstart/stop)just build-macos-appon Linux exits 1 with a clear messageNot verified (needs a Mac — Phase 1)
The
.appbuild, the menu bar, and that a TCC grant sticks. PyInstaller/pyobjc hidden-import adjustments are likely. The daemon refactor is behaviour-preserving but worth an eye on the CLI error paths (password refusal now exits 2 viaSystemExitinstead ofparser.error).Refs #165