# Build RuneStone [Development](development.md) · [Releases](releases.md) · [Installation](installation.md) This guide tells maintainers how to build RuneStone installers and packages. Users install a supplied file with the [installation guide](installation.md). Use the [release policy](releases.md) to select the version, store the files, and publish them. ## Build the Windows installer `pnpm build:installer` builds an NSIS setup file for 64-bit Windows (x64). The script stops on other operating systems. Prerequisites: - The source setup in [Run from source](development.md#run-from-source). - The pin of the browser engine in `src-tauri/browser-engine.json`. To build a new engine first, see [Build the browser engine](#build-the-browser-engine). The installer does not include the engine. - Internet access for the first build. Tauri downloads NSIS and the WebView2 bootstrapper. Procedure, in the RuneStone repository root: 1. Run `pnpm install --frozen-lockfile`. 2. Run `pnpm check`. 3. Run `pnpm test`. 4. Select the version with the [version policy](releases.md#versions). 5. Run `pnpm build:installer --version --dry-run`. Make sure that the plan shows the correct versions. A dry run changes no file. 6. Run `pnpm build:installer --version `. Without `--version`, the script uses the version in `package.json`. Output: | File | Contents | | --- | --- | | `releases//RuneStone__x64-setup.exe` | The setup file to distribute | | `releases//host.json` | The release version, the encoded toolchain and Windows versions, the file name, the size in bytes, and the SHA-256 hash | The script prints `Installer available: ` when it completes. After a successful build, the version fields keep the new version. Example, from the 0.1.44 download link in the README: version `0.1.44` gives `releases/0.1.44/RuneStone_0.1.44_x64-setup.exe`. ### What the script does Source: `scripts/buildInstaller.mjs`. 1. Reads the version and makes sure that all version fields match the current version. 2. Makes sure that downgrade protection stays on in `tauri.conf.json` and `tauri.windows.conf.json`. Makes sure that `tauri.windows.conf.json` names the installer hooks and that `tauri.conf.json` does not bundle the browser engine. 3. Stops if the setup file or `host.json` exists in the bundle folder or in `releases//`. A dry run prints the plan and stops here. 4. Saves copies of the four version files as `*.before` in `output/installer-build//