Skip to main content
Once people have your app, you’ll want to send them a newer version. This page shows how updating works with Bach, using a new setup file. Having the app update itself is a separate step, covered at the end.

1. Raise the version

Change the version in bach.toml:
bach.toml
Or leave the file alone and pass it when building: bach build --app-version 1.1.0. Keep name the same, or if you rename the app, set id to the old name. The id is how the new setup file finds the old installation.

2. Rebuild your app, then the installer

Build your app with your usual tool, then:
You get dist/Hello Notes-Setup-1.1.0.exe.

3. Run it over the old version

When someone who has 1.0.0 runs the new file, the window says it will update instead of install. Then:
  • The app is installed into the same folder as before.
  • The choices made last time, such as the desktop shortcut and optional components, are kept.
  • Files that version 1.1.0 no longer has are deleted from the install folder.
  • Files your app created itself while running, such as logs or settings, are left alone.
  • If anything fails, for example a file is locked or the disk is full, the old version is put back exactly as it was.
If the app is running, setup asks to close it first.

What about older versions?

If someone runs an older setup file over a newer installation, the window warns that a newer version is already installed. A silent install refuses unless you add --allow-downgrade.

Having the app update itself

So far your users have to download and run the new file. With an [updates] section, the installed app checks for new versions in the background and installs them when it’s closed:
bach.toml
Automatic updates explains how that works and what you need to publish with each release. Add [updates] before your first public release if you can: copies installed without it can’t update themselves.