Skip to main content
bach build packs the files in [files] source and your settings into a single setup file, built on bach-setup.exe.

Output

The default path is dist/{name}-Setup-{version}.exe. With --online (or installer.online), a second line reports the online installer, dist/{name}-Web-Setup.exe. With --patch-from, another line reports the patch, dist/{name}-Setup-{version}-patch-from-{old version}.exe, with how many files changed. An app with [access] prints The files are encrypted with the access key. and needs the key: see [access]. With an [updates] section that has github or a download_url, it also writes latest.json next to the setup file. With github set, the setup file is named the way GitHub serves a release download: anything but letters, digits, ., - and _ in its name becomes -.

Things to know

  • Sign the setup file after the build, never before. Building writes into the file. With [signing] and --sign, bach build does this for you and signs before it writes the feed.
  • Every build records each file’s SHA-256 in the setup file, so a later update patch can tell what changed. The first build of an app that updates is therefore a little slower.
  • If the old setup file is open or the app is running from it, replacing it fails with a sentence asking you to close it. Close it and build again.
  • On macOS and Linux the setup file keeps Bach’s icon. Build on Windows to apply app.icon.
  • Failure always ends with a non-zero exit code and a one-sentence reason, so it is safe in CI.
See Preview and build and Automate in CI.