bach.toml and handing out a setup file: checking it, looking at the window, building, and making sure a real install works.
Check the config
bach.toml and the build folder, then prints a summary and the list of files that will be installed. It changes nothing and works on every system. Look at the file list: anything in it ends up on your users’ computers.
Preview the window
[access], the preview asks for a key. Any key works there.
Preview needs Windows. On a Mac it shows the macOS window, and needs a [macos] section.
Keep the preview open while you edit
bach watch opens the preview and reopens it every time you save bach.toml, your logo, your license or another file it names. If the config has a mistake, it prints it and keeps the old window. Stop it with Ctrl+C.
Build the setup file
dist/<name>-Setup-<version>.exe, for example dist/Hello Notes-Setup-1.0.0.exe. Change the name or folder with installer.output, or for one build with --out:
bach build --fast builds quicker and makes a slightly bigger file.
If the build fails, nothing is left half-written: an earlier setup file stays as it was.
Look inside a setup file
uninstall.exe too. bach verify checks that a setup file isn’t damaged:
Test a real install
Preview shows what your users see, but only a real install shows whether your app starts. A real install changes the computer it runs on, so the safest choice is a computer you can throw away.In Windows Sandbox
Windows 10 and 11 Pro, Enterprise and Education have Windows Sandbox, a temporary copy of Windows. Windows Home doesn’t.- Turn on Windows Sandbox in “Turn Windows features on or off”, if you haven’t.
- Build, then run:
--keep to leave the sandbox open and look around. See bach test for all options.
By hand
Copy the setup file to another computer or virtual machine and run it. Check that:- the app starts from the Start menu
- features that need files next to the program work
- it appears under Settings › Apps and can be removed
Read the log when something fails
Every install, update and removal writes a log to%TEMP%\<app id>-setup.log. To write it somewhere else:
Before you share it
- Sign your setup file so Windows shows your name instead of “Unknown publisher”.
- Publish it somewhere your users can download it.
- Plan how you’ll ship the next version.