1. Raise the version
Change the version inbach.toml:
bach.toml
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: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.
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
[updates] before your first public release if you can: copies installed without it can’t update themselves.