Skip to main content
[[components]] declares optional parts of your app. Each one is shown as a box on the install page. Files that no component claims are always installed. You can repeat the table for as many components as you need.
bach.toml

Rules

  • A file belongs to the first component whose pattern matches it.
  • A component must match at least one file, or bach check reports it.
  • app.executable cannot be in a component.
  • Unticking a component on an update removes its files.
  • On an update, the boxes start the way the user left them last time.

Components that are downloaded

Language packs, HD textures or demo files that most people won’t want don’t have to make everybody’s download bigger. Add download and the component’s files stay out of the setup file; they are downloaded when somebody ticks the box.
bach.toml
bach build writes those files to a file of their own next to the setup file, like dist/Hello-hd-textures-1.4.0.bachpack. Upload it to the link the component names. The install page says how big the download is, setup checks it against the SHA-256 recorded in the setup file, and puts the files in place together with the others. A failed download changes nothing, and Cancel works while it downloads.
  • The file is checked, not the host: a changed file is refused.
  • Updates download again only when a file of the component changed. --with hd-textures in a silent install downloads it too.
  • A setup file locked with [access] can’t have a downloaded component.
  • bach verify checks the archive when it is next to the setup file; bach build --json lists them as packs.

Silent installs

See Silent installs.