Skip to content

Bundle the bpm CLI inside the .app for a single-cask Mac install - #14

Merged
syscod3 merged 1 commit into
mainfrom
feat/bundle-cli-in-app
Aug 2, 2026
Merged

Bundle the bpm CLI inside the .app for a single-cask Mac install#14
syscod3 merged 1 commit into
mainfrom
feat/bundle-cli-in-app

Conversation

@syscod3

@syscod3 syscod3 commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Homebrew Formulas can't depend on Casks, and a Formula's install step is sandboxed from writing to /Applications at all - confirmed both by trying it. So the .app now embeds both bpm-tray and the plain bpm CLI; the Cask's binary stanza (next: homebrew-public) points at the embedded bpm, so one brew install --cask gives you both the CLI and the app. Verified locally end-to-end.

Real Homebrew constraint found live: a Formula cannot depend on a Cask (depends_on cask: is Cask-only DSL - confirmed by error), and a Formula's install step runs sandboxed, blocked from writing to /Applications at all (Operation not permitted, confirmed by trying it directly). Only Casks are allowed to touch /Applications, by design.

So the app now also embeds the plain bpm CLI binary (CGO_ENABLED=0, same MACOSX_DEPLOYMENT_TARGET pin as bpm-tray) alongside bpm-tray inside Contents/MacOS/ - the Homebrew Cask (next commit, in the tap repo) points its `binary` stanza at that same executable, so one `brew install --cask` gives both the CLI on PATH and the app in /Applications. Dropped the now-unused raw bpm-tray tarball artifact.

Verified locally: built both binaries, assembled the .app, zipped/unzipped fresh, symlinked the embedded bpm the same way a cask's binary stanza would, confirmed both bpm --help-equivalent output and the tray server work from inside the same bundle.
@syscod3
syscod3 merged commit 1c25fa4 into main Aug 2, 2026
3 checks passed
@syscod3
syscod3 deleted the feat/bundle-cli-in-app branch August 2, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant