[[components]] block adds one box to the install window. Files that no component claims are always installed. Walkthrough: Options and components.
bach.toml
id
Required. Lowercase letters, digits, - and _, unique. Used by --with and --without. Can’t be one of Bach’s own option ids (desktop-shortcut, start-menu, autostart, path, auto-update).
title
Required. The label of the box. Text, or text per language.
description
Optional. A line under the label. Text, or text per language.
files
Required. At least one pattern, relative to files.source. Each component must match at least one file. app.executable can’t be included.
default
true or false (default). Whether the box is ticked on a first install. On updates, users’ earlier choice is kept; a component new in this version uses default.
download
true or an https link. The component’s files aren’t packed into the setup file but downloaded when the box is ticked. See Downloaded components.
How files are assigned
A file belongs to the first component whose patterns match it. Unticking a component on an update removes its files. A[[run]] step whose program is in a component runs only when it’s installed, and a [[shortcuts]] entry for it is removed with it.
Files that need several components
With this setting, a file matched by several components is installed only when all of them are ticked:bach.toml
bach checkshows such files with all their components, such as(tools + vendor1).- The order of the blocks doesn’t change what’s installed.
- Needs Bach 0.11.1 or newer. If you use the online installer, publish a newly built one together with the first release that uses
"all", because older online installers don’t know the rule. bach build --msirefuses this setting.
Downloaded components
bach.toml
bach build writes the files to a separate file next to the setup file, such as Hello-hd-textures-1.4.0.bachpack (with the profile or arm64 added for those builds). Upload it where the setup file expects it:
- The window shows the download size. The file must match the checksum recorded in the setup file.
- A failed download changes nothing, and Cancel works during it.
- Updates download again only if the component’s files changed.
- Not allowed with
[access]encryption.bach verifychecks the file when it’s next to the setup file;bach build --jsonlists them aspacks. - With
shared_files = "all", a shared file travels in the download of the first component that hasdownload.
Silent installs
--without samples leaves it out. See Silent installs.