[[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 checkreports it. app.executablecannot 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. Adddownload 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-texturesin a silent install downloads it too. - A setup file locked with
[access]can’t have a downloaded component. bach verifychecks the archive when it is next to the setup file;bach build --jsonlists them aspacks.