Documentation
¶
Overview ¶
Command macapp lays out Djinn.app, the macOS application bundle, around a djinn binary built for macOS, and zips it. It is a build tool for `task release-macos-app`, portable: it runs and is tested on Linux too.
go run ./tools/macapp bundle --binary <djinn> --version v0.1.0 bin/release/.app # → bin/release/.app/Djinn.app go run ./tools/macapp zip bin/release/.app/Djinn.app bin/release/djinn_darwin_universal_app.zip
The bundle gives macOS what a bare binary lacks: an identifier, which system notifications need, a name and an icon for Finder, Launchpad and the Dock. Its layout:
Djinn.app/Contents/Info.plist the identifier, the version from the tag, the icon's name, the djinn:// links Djinn.app/Contents/PkgInfo Djinn.app/Contents/MacOS/djinn the binary, the same as in the release's .tar.gz, and the bundle's executable Djinn.app/Contents/Resources/djinn.icns build/icon.icns, made from the logo by tools/icons Djinn.app/Contents/Resources/LICENSE, NOTICE, THIRD_PARTY_NOTICES.md
Finder starts the app with no arguments: djinn knows it runs from a bundle by its path, runs up, and takes the PATH of the user's login shell (cmd/djinn/bundle.go). No launcher script stands before it: one binary to sign.
The zip holds Djinn.app at its root: Finder unzips it into the app, ready to drag into Applications.