bach.toml: a Setup app inside a .dmg with the same window as on Windows. This guide takes you from your Mac app to a file Mac users can open.
You need your app already built for macOS, usually as an app bundle such as Hello.app.
1. Add a [macos] section
bach.toml
[macos].
2. Build
dist/Hello-Setup-1.0.0.dmg. Making a .dmg needs a Mac; on Windows or Linux you get a .zip of the Setup app instead. Without --platform, bach build builds every platform in bach.toml.
If your Mac files come from a computer that doesn’t keep Unix file permissions, such as a Windows checkout, list the programs in executables.
3. Try it on a Mac
Open the.dmg and double-click Install Hello.
If your app is a single app bundle, it goes straight into ~/Applications and the window only asks you to click Install. To remove it, move it to the Trash. Bach then cleans up what it added (links, background agents and its install record) and keeps your user data.
On a Mac, bach preview shows the Mac window.
Sign and notarize
Without signing, macOS asks users to confirm before opening your app the first time. Removing that prompt needs the Apple Developer Program (99 US dollars a year):- Create a Developer ID Application certificate and keep it in your keychain.
- Save your notarization login once:
xcrun notarytool store-credentials example-notary. - Add:
bach.toml
.dmg, sends it to Apple for notarization and attaches the result. This must run on a Mac.
Many Macs at once
Administrators can install without a window:--dir, --with, --without, --log, --uninstall and the exit codes work like on Windows.
For management tools such as Jamf, Intune, Kandji or Munki, build an installer package:
.pkg installs into /Applications for every user. To sign it, add a Developer ID Installer certificate as installer_identity and use --sign.
Updates
Onelatest.json serves Windows and Mac. A Mac only downloads the Mac entry, checks it, and runs the Setup app without a window. Build both platforms in one run so the feed lists both. See Where to host updates.
Release from GitHub
Add a Mac build to the release workflow:[macos.signing] with notarize = "bach-notary" and these repository secrets: