> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Bach builds Windows installers from one bach.toml with the bach command: bach init, bach check, bach preview, bach build. Installs are per user and need no administrator rights by default. installer.scope = "machine" installs for every user after one Windows prompt. On Windows, run setup files with Start-Process -Wait -PassThru in PowerShell, and give signtool arguments that start with the word sign.

# Prepare your build folder

> Bach installs one folder. Learn what belongs in your build folder, where Qt, Flutter, Wails and PyInstaller put theirs, and how to check it.

Bach installs the contents of one folder on your computer, whatever made it. This page explains what that folder should contain, and where common tools put it. If you use Electron, Tauri, Rust, .NET, Godot or Unity, there's a guide for each in this section.

## What a build folder is

When you build an app, your tools write the finished program into a folder. That folder holds the `.exe` people run, and usually other files it needs while running: libraries (`.dll` files), images, sounds, data files. You could copy the whole folder to another computer and the app would start.

That's the folder you give to Bach:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
hello-notes/
  bach.toml           your installer settings
  build/              the build folder (files.source)
    hello-notes.exe   the program to start (app.executable)
    welcome.txt
    themes/
      dark.json
```

After installing, your users get the same structure inside the install folder:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
%LOCALAPPDATA%\Programs\Hello Notes\
  hello-notes.exe
  welcome.txt
  themes\
    dark.json
  uninstall.exe       added by Bach
```

## What should be in it

Everything inside the build folder goes into your installer, including subfolders. So check that:

* the program named in `app.executable` is in it
* every file the program needs at run time is in it
* nothing private or unnecessary is in it

Don't point `files.source` at your whole project folder. Bach stops the build if it finds files that look like secrets, such as `.env`, private keys or access tokens, but it can't recognize every private file. [Choose which files to include](/docs/guides/choose-files.md) explains how to leave files out.

Two rules: the folder can't contain symbolic links, and it can't contain a file called `uninstall.exe` at the top, because Bach adds its own uninstaller with that name.

## Test the folder before you package it

Copy the folder somewhere else, or better, to another computer or a virtual machine that doesn't have your development tools, and start the program from there. If it doesn't start, the installer won't fix that. A common reason is a missing runtime, such as the Microsoft Visual C++ runtime. See [Check that your app's requirements are installed](/docs/guides/requirements.md).

## Where common tools put it

`bach init` looks at your project files and fills in the folder for you in these cases:

| Project | `bach init` recognizes it by | Folder it fills in |
| - | - | - |
| [Electron](/docs/frameworks/electron.md) | `package.json` that depends on `electron` | `dist/win-unpacked`, or `out/<name>-win32-x64` with Electron Forge |
| [Tauri](/docs/frameworks/tauri.md) | `src-tauri/tauri.conf.json` | `src-tauri/target/release` |
| [Rust](/docs/frameworks/rust.md) | `Cargo.toml` with `[package]` | `target/release` |
| [.NET](/docs/frameworks/dotnet.md) | a `.csproj` file | `bin/Release/<framework>/win-x64/publish` |
| [Godot](/docs/frameworks/godot-and-unity.md) | `project.godot` | the folder of your Windows export preset, or `build` |
| [Unity](/docs/frameworks/godot-and-unity.md) | `ProjectSettings/ProjectVersion.txt` | `Build` |
| Flutter | `pubspec.yaml` with a `flutter:` section | `build/windows/x64/runner/Release` |
| Wails (Go) | `wails.json` | `build/bin` |
| PyInstaller | a `.spec` file with `EXE(` | `dist/<name>` (a one-folder build) |
| Qt | `CMakeLists.txt` that finds Qt, or a `.pro` file | `build/Release` |

These are starting guesses. Open the folder and make sure your app is really there.

For Flutter and Qt, `bach init` also adds a requirement for the Visual C++ runtime; for Wails, one for WebView2. Delete the requirement if your build doesn't need it. For Qt, run `windeployqt` first so the Qt libraries are copied next to your program.

For anything else, such as a Go or C++ program, create a folder, copy the program and its files into it, and set `files.source` to that folder.

## Next step

[Make your first installer](/docs/quickstart.md), or go to [How bach.toml works](/docs/guides/write-bach-toml.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.