Skip to main content
[macos] describes the Mac version of your app. bach build then writes a Setup app in a .dmg besides the Windows file. Name, version, publisher, texts, look, languages, choices and [updates] are shared. If the app only runs on Macs, leave [files] out. Walkthrough: Ship for macOS.
bach.toml

Settings

[macos.signing]

Used with bach build --sign.

[[macos.agents]]

Background programs run by launchd, the Mac’s version of services.

[[macos.run]]

Like [[run]], for files with execute permission.

How choices map

An app that is exactly one .app bundle goes straight into ~/Applications (/Applications with scope = "machine"), and the window only asks to install. Anything more goes into ~/Applications/<installer.folder>. Setup never runs as root.

Removal

Users remove the app by moving it to the Trash. A background watcher then removes links, launch agents, the PATH block, the install record and the uninstaller, but never user data. The uninstaller is also at ~/Library/Application Support/Bach/uninstallers/<app id>/Uninstall <app>.app; its Contents/MacOS/bach-setup --silent --delete-data removes app and data.

For administrators

Install <app>.app/Contents/MacOS/bach-setup --silent with --dir, --with, --without, --log and --uninstall. bach build --pkg (on a Mac) writes a .pkg that installs into /Applications, without a window or choices, for MDM tools.

Updates

The Mac file is listed in the feed under arch.macos. Add it to an existing feed with bach feed <setup.exe> --macos <file.dmg> or bach build --feed-from latest.json. With updates.signer, an update needs a Developer ID Application signature that Apple issued, with that name. bach build --sign stops when the certificate isn’t one, and a Mac build without --sign warns. See Protect your updates.

Not used on Mac

[[registry]], [[env]], [[context_menu]], [[migrate]], [[services]], [[firewall]], [[requirements]], [[shortcuts]], [[protocols]], [[file_types]], [signing], the online installer, MSI, winget, Chocolatey, Intune and patches. Declare link types and file types in your app’s Info.plist.