Skip to main content
The [installer] section controls how the setup file looks, where it installs, which options the user sees, which languages the window speaks and which license it shows. Every setting is optional.

Look

What compressing costs

Measured with a Release build on 300 MB of mixed files (half random, half text) on 12 cores. The setup file’s size does not change with the thread count. best takes the most memory, so by default a build keeps it under compression_memory (1024 MB) by using fewer threads: 6 of 12 here, with a peak of 880 MB. In a container with a memory limit, set compression_memory below it, or compression_threads = 1.

Online and offline installers

bach build writes the offline installer: one setup file that carries the app, installs without a network and always installs the version it was built from. With online = true it also writes the online installer: a small setup file with the same window and choices and no files. When it runs, it reads the update feed, downloads the newest full setup file, checks it and installs from that. It installs what is current, not what was current when it was built.
bach.toml
  • The download is checked three ways before anything runs: its SHA-256 against the feed’s, that it is a setup file for the same app id, and that it carries the version the feed names.
  • It needs a network and the feed. If either is missing, the window says so and “Try again” resumes the download.
  • Choices a newer version added, like a new component that is ticked by default, are carried over.
  • The feed always describes the full setup file, never the online one. The Bach action signs and publishes both.
  • It never shows the “older version” page, because it cannot know which version it will install.

Where it installs

With scope = "machine", the Apps entry, the shortcuts, start with Windows, PATH, link schemes, file types, [[registry]], [[env]] and [[context_menu]] all go to the computer’s side (HKLM and the shared folders) instead of the user’s. Background updates are off then: [updates] auto must be left out or "never". The install folder must be inside Program Files then. Do not change scope after your first release, because an app installed per user and one installed machine-wide are two installs to Windows.

Options

Each option takes one of four values: Every shortcut setup writes (the Start menu one, the desktop one and those of [[shortcuts]]) carries the app’s AppUserModelID, which is the app id with every character other than letters, digits, ., _ and - turned into a . (at most 128 characters), so My App becomes My.App. Windows uses it to group the app’s windows on the taskbar and to tie its notifications to the app. It does not change with the version, and it lives in the shortcut file, so removing the shortcuts leaves nothing behind. For the grouping to follow a window, your program has to use the same ID: call SetCurrentProcessExplicitAppUserModelID with it, or leave the ID to Windows. The whole row is a click target. On an update, the boxes start the way the user left them last time, and unticking one takes the shortcut, PATH entry or autostart away again.

Languages and license

Built-in languages: en English, de Deutsch, nl Nederlands, fr Français, es Español, it Italiano, pt Português, pl Polski, ru Русский, tr Türkçe, ja 日本語, ko 한국어, zh 简体中文, zh-tw 繁體中文 (Traditional Chinese). The tags zh-TW, zh-HK, zh-MO and zh-Hant pick zh-tw, and zh-CN, zh-SG and zh-Hans pick zh. pt is Brazilian Portuguese. Also built in: sv Svenska, cs Čeština, vi Tiếng Việt, id Bahasa Indonesia and hi हिन्दी.

Example

bach.toml