Built-in options
These are settings under[installer]:
Each takes one of four values:
For example, a chat app that suggests starting with Windows, without forcing it:
bach.toml
[updates], there’s also an Automatic updates box, controlled by updates.auto.
add_to_path adds your install folder to the user’s PATH. If your command-line tools are in a subfolder, set path_folder:
bach.toml
PATH entry and leaves the rest unchanged.
Optional components
A component is a part of your app that users can leave out. Each one appears as a box in the install window.bach.toml
idis a short name in lowercase. Silent installs use it:--with samplesor--without samples.titleanddescriptionare what the user reads. They can be translated.filesare patterns relative tofiles.source.default = truemeans the box starts ticked. The default is unticked.
What happens on updates
The window remembers what each user chose. When they update:- Boxes start the way they left them.
- A new component starts at its
default. - Unticking a component removes its files and any shortcut to them.
Download a component only when it’s wanted
Large optional parts, such as texture packs or language models, can stay out of the setup file and be downloaded when someone ticks them:bach.toml
bach build then writes the component into its own file next to the setup file, such as Hello-Notes-textures-1.0.0.bachpack. Upload it with your release, to the same place as your setup file. download = true uses the download link from [updates]; you can also give a full https link. The setup file checks the downloaded file against a checksum recorded when you built it.
Downloaded components can’t be combined with an access key that encrypts files.
A file that needs two components
By default, a file matched by several components belongs to the first one. If you want a file installed only when all of them are ticked, set:bach.toml
vendor1/tools/... is installed only if both Tools and Vendor 1 are ticked. This needs Bach 0.11.1 or newer. [[components]] lists all the rules.
Try it
bach check: the component’s id appears next to each file.