163 lines
9.2 KiB
Markdown
163 lines
9.2 KiB
Markdown
# Build and package RuneStone
|
|
|
|
[Development](development.md) · [Installation](installation.md)
|
|
|
|
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](development.md#run-from-source).
|
|
The commands below use the checked-in dependency versions.
|
|
|
|
```sh
|
|
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:
|
|
|
|
```text
|
|
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](https://v2.tauri.app/distribute/windows-installer/) 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](../AGENTS.md#versioning).
|
|
Publishing an existing artifact does not change its version.
|
|
|
|
1. Select the release version under the shared version policy.
|
|
2. Run the checks above.
|
|
3. Run `pnpm build:installer --version <version>`. The adapter sets matching release and toolchain versions.
|
|
4. Test the installer on a clean Windows account with the checks below.
|
|
5. Attach only installer binaries to the repository release or your chosen download page.
|
|
|
|
Keep `com.runestone.app` as the app identifier so upgrades retain the same app identity.
|
|
Publish installers on the [repository release page](http://10.0.0.5:6610/kwyvern/RuneStone/releases).
|
|
After you publish an installer, add its download link to the README.
|
|
Keep notes, checksums, metadata, logs, and screenshots out of release attachments.
|
|
Keep the release description empty so users reach the downloads directly. Put release notes, test results, and installation instructions in repository documentation.
|
|
Keep build records in the local release directory. Publish installation checksums in `docs/checksums/<version>/` and link them from the installation guide.
|
|
|
|
Local installers are unsigned until the maintainer configures Windows code signing.
|
|
Use [Tauri's signing guide](https://v2.tauri.app/distribute/sign/windows/) 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.
|
|
|
|
## Build Linux packages
|
|
|
|
Prepare the Browser runtime and complete the [Linux development checks](linux.md) on the target processor architecture.
|
|
Run the commands from the RuneStone repository root.
|
|
The examples use the Tauri CLI from [package.json](../package.json) and [Linux bundle configuration](../src-tauri/tauri.linux.conf.json).
|
|
|
|
Choose the package format for the build. Each example produces a package in the output folder listed below:
|
|
|
|
```sh
|
|
# Example: Debian package
|
|
pnpm tauri build --bundles deb -- --locked
|
|
|
|
# Example: AppImage
|
|
pnpm tauri build --bundles appimage -- --locked
|
|
```
|
|
|
|
Do not use `pnpm build:installer` on Linux. That command selects the Windows installer.
|
|
These direct Tauri commands do not manage the project release version or archive a
|
|
release. Before making a distributable, select the next version using the
|
|
[version policy](../AGENTS.md#versioning), keep all four version fields consistent,
|
|
and restore them if packaging fails. Move completed packages into
|
|
`releases/<version>/` together with checksums and the recorded source/test results;
|
|
do not leave duplicate completed packages in the toolchain bundle directory.
|
|
Packages appear under `src-tauri/target/release/bundle/deb/` or `src-tauri/target/release/bundle/appimage/`.
|
|
|
|
Use the [Linux installation procedure](installation.md#install-on-linux) when testing a Debian package.
|
|
Test launch without development tools, same-version reinstall, upgrade, and removal on a separate test account.
|
|
Reinstall and upgrade must preserve settings and workspace files. Removal must preserve workspaces outside the installation folder.
|
|
|
|
For shared packages, build on the oldest distribution you intend to support that supplies WebKitGTK 4.1.
|
|
A package built on a newer system can require libraries unavailable on an older system.
|
|
An AppImage does not remove this compatibility limit.
|
|
See [Tauri's AppImage guidance](https://v2.tauri.app/distribute/appimage/) and [Debian packaging guidance](https://v2.tauri.app/distribute/debian/).
|
|
|
|
Call a distribution supported only after its native tests and package checks pass.
|
|
Repeat the automated checks on a Linux runner before each Linux release.
|
|
Keep the source commit, environment, results, and untested cases with each release.
|
|
See the [October 2026 validation records](archive/linux-validation-2026-10.md) for earlier package checks and their limits.
|
|
|
|
## Experimental macOS packages
|
|
|
|
Build on macOS with the correct Browser runtime.
|
|
|
|
On macOS, a local application bundle can use:
|
|
|
|
```sh
|
|
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](https://v2.tauri.app/distribute/macos-application-bundle/) for platform packaging behavior.
|
|
Signing, notarization, architecture coverage, Browser packaging, and desktop acceptance remain unresolved for RuneStone on macOS.
|