6.7 KiB
Build and package RuneStone
This guide is for maintainers. Users install a supplied package through the installation guide.
Build the Windows installer
Build on 64-bit Windows with the tools in the development guide. The commands below use the checked-in dependency versions.
pnpm install --frozen-lockfile
pnpm check
pnpm test
pnpm build:installer
The last command builds the interface, compiles the release app, and creates an NSIS setup executable. The first build needs internet access to download the packaging tools and the WebView2 bootstrapper. Find the installer in:
releases/<version>/RuneStone_<version>_x64-setup.exe
Distribute this setup file. Users do not need the repository, a local server, or build tools.
Build output stays outside version control.
The build moves the completed installer into releases/<version>/ with its host.json metadata.
The toolchain bundle folder does not retain a second installer copy.
Installer settings
Tauri automatically merges src-tauri/tauri.windows.conf.json into the base configuration on Windows.
This file selects NSIS for ordinary pnpm tauri build commands too.
It uses the existing RuneStone icon and installs the app for the current Windows account.
Tauri supplies the setup screens, Start menu shortcut, launch option, and uninstaller.
The installer includes the WebView2 bootstrapper. If WebView2 is missing, setup downloads the runtime. An existing runtime needs no setup download. The configuration blocks version downgrades. It does not register document types or start RuneStone when Windows starts.
See Tauri's Windows installer documentation for the packaging options.
Hotfix installer versions
Hotfix installer versions use the same letter sequence as plugin versions: a, b, c, through z, then aa, ab.
Use pnpm build:installer --version 0.1.23a to produce that release.
The build command checks matching versions, preserves existing installers, and restores previous version fields if the build fails.
package.json, Cargo release metadata, installer metadata, the app version display, and release filenames retain the literal release version.
Cargo and Tauri require SemVer. The adapter encodes 0.1.23a as 0.1.23+1 in their version fields.
Windows requires four numeric parts. The adapter encodes the same version as 0.1.23.1 in the numeric version resource.
The executable's FileVersion and ProductVersion strings retain 0.1.23a.
These internal encodings represent the same release. They do not create a separate build or increase the numeric release version.
The shared NSIS comparison orders the numeric release first, then the hotfix suffix.
For example: 0.1.23 < 0.1.23a < 0.1.23b < 0.1.23z < 0.1.23aa < 0.1.24.
The installer blocks downgrades before uninstall or update actions, including silent and passive installs.
Unknown version formats also block replacement. Reinstall and upgrade retain the existing installation by default.
Windows stores the SemVer encoding in its compatibility version field for older installers.
It stores the literal release version in RuneStoneReleaseVersion for the updated installer.
The app and installer version strings and release filenames use 0.1.23a. Windows Apps can show the equivalent internal value 0.1.23+1.
This keeps older numeric installers from treating a hotfix as an unknown or older release.
The Windows numeric resource limits each part and the hotfix index to 65535. The adapter rejects versions outside those limits before it changes version fields. The NSIS template derives from Tauri CLI 2.11.4. Check its changes when updating Tauri.
Prepare a release
Each project uses its own zz.yy.xx version. Routine source edits and checks retain the current version.
Increase xx once for each completed regular build. For a hotfix, increase the letter suffix. Failed attempts do not consume a version.
Keep version fields consistent, and restore them if no build completes.
Increase yy or zz only for a user-directed release, then reset the lower fields as defined in the version policy.
Publishing an existing artifact does not change its version.
- Select the release version under the shared version policy.
- Run the checks above.
- Run
pnpm build:installer --version <version>. The adapter sets matching release and toolchain versions. - Test the installer on a clean Windows account with the checks below.
- Attach the setup file and release notes to the repository release or your chosen download page.
Keep com.runestone.app as the app identifier so upgrades retain the same app identity.
No public download location or automatic release upload is configured yet.
After you publish an installer, add its download link to the README.
Local installers are unsigned until the maintainer configures Windows code signing. Use Tauri's signing guide before public distribution.
Installer checks
| Check | Expected result |
|---|---|
| Install on an account without Node.js or Rust | Setup completes and RuneStone opens |
| Install without WebView2, with internet access | Setup installs the runtime and RuneStone opens |
| Open RuneStone from the Start menu | The app opens without a terminal or development server |
| Create a workspace outside the installation folder | Notes save and reopen |
| Install a newer version | Setup updates the app and preserves workspace files |
| Reinstall the same version | Setup defaults to reinstall and preserves workspace files and settings |
| Try to install an older version | Setup blocks the downgrade |
| Remove RuneStone through Windows Settings | The app and shortcuts disappear, and the separate workspace remains |
These checks require a Windows test account or virtual machine. A successful build alone does not confirm them.
Experimental platform packages
Linux and macOS packages remain unvalidated. Build on the target platform with the correct Browser runtime. Use the Linux readiness guide for system packages, desktop checks, and Debian/AppImage commands.
On macOS, a local application bundle can use:
pnpm tauri build --bundles app -- --locked
Tauri places the bundle under src-tauri/target/release/bundle/macos/.
This command is a test route, not a validated RuneStone release workflow.
Check the Tauri application bundle guide for platform packaging behavior.
Signing, notarization, architecture coverage, Browser packaging, and desktop acceptance remain unresolved for RuneStone on macOS.