Skip to main content
[[requirements]] declares something your app needs on the computer before it runs. Setup only looks (read-only, no administrator rights), and when the item is missing it shows a page with a button to its download and a “Try again” button that looks again. A silent install stops with exit code 1 instead.
bach.toml

Fields

webview2, dotnet, vcredist and windows know their name and download page (windows is named “Windows (build N or newer)” and points at microsoft.com/windows). file and registry need a name and an https url.

Which Windows Bach supports

Setup files are made for Windows 10 version 1809 (build 17763) and newer, and Windows 11. They are tested on Windows 11, on Windows on ARM and on Windows Server 2022; Windows 10 itself is not in the automated tests, because GitHub offers no Windows 10 image. A windows requirement with a build below 17763 makes bach check and bach build warn: the setup window may not run there, so the requirement does not help those users. Ask for a newer build when your own app needs one.

When a requirement is there but not found

Setup looks in the usual places (for .NET: the host’s registry entry, DOTNET_ROOT and the Program Files folders; for the Visual C++ runtime the one for the computer’s architecture; registry keys also in the 32-bit view). An unusual install can still be missed. The requirement page then has Continue anyway, which goes on to the install page and writes the skipped requirements to the log. The app may not start without them. A silent install takes --skip-requirements for the same, and names what it passed over in the terminal and the log.

Behaviour

  • Requirements are checked before anything changes on disk.
  • The window shows a requirement page with the name from [text] requirement_title and its siblings. See [text].
  • bach inspect lists them as Requires.
See Requirements for the guide.