Rewrite the documentation and the agent instructions
Move the agent instructions from AGENTS.md to CLAUDE.md. AGENTS.md now points to CLAUDE.md. The UI rules move to docs/ui-design.md. The version and release policy moves to the new docs/releases.md. Rewrite the README, the user guides, and the developer references. Check each claim against the code. Remove old version history and repeated warnings. Link to Gitea at git.knottywyvern.com instead of the LAN address. Move the October 13 menu audit to the archive.
This commit is contained in:
+148
-118
@@ -1,162 +1,192 @@
|
||||
# Build and package RuneStone
|
||||
# Build RuneStone
|
||||
|
||||
[Development](development.md) · [Installation](installation.md)
|
||||
[Development](development.md) · [Releases](releases.md) · [Installation](installation.md)
|
||||
|
||||
This guide is for maintainers. Users install a supplied package through the installation guide.
|
||||
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
|
||||
|
||||
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.
|
||||
`pnpm build:installer` builds an NSIS setup file for 64-bit Windows (x64). The script stops on other operating systems.
|
||||
|
||||
```sh
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm check
|
||||
pnpm test
|
||||
pnpm build:installer
|
||||
```
|
||||
Prerequisites:
|
||||
|
||||
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:
|
||||
- The source setup in [Run from source](development.md#run-from-source).
|
||||
- A Windows Browser runtime staged in `src-tauri/browser-engine`. See [Built-in browser runtime](development.md#built-in-browser-runtime). The installer bundles that folder.
|
||||
- Internet access for the first build. Tauri downloads NSIS and the WebView2 bootstrapper.
|
||||
|
||||
```text
|
||||
releases/<version>/RuneStone_<version>_x64-setup.exe
|
||||
```
|
||||
Procedure, in the RuneStone repository root:
|
||||
|
||||
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.
|
||||
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 <version>`.
|
||||
|
||||
## Installer settings
|
||||
Without `--version`, the script uses the version in `package.json`.
|
||||
|
||||
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.
|
||||
Output:
|
||||
|
||||
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.
|
||||
| File | Contents |
|
||||
| --- | --- |
|
||||
| `releases/<version>/RuneStone_<version>_x64-setup.exe` | The setup file to distribute |
|
||||
| `releases/<version>/host.json` | The release version, the encoded toolchain and Windows versions, the path, the size in bytes, and the SHA-256 hash |
|
||||
|
||||
The script prints `Installer available: <path>` 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`.
|
||||
3. Stops if the setup file or `host.json` exists in the bundle folder or in `releases/<version>/`.
|
||||
4. Saves copies of the four version files as `*.before` in `output/installer-build/<version>/`.
|
||||
It also writes the NSIS template and a configuration override to that folder.
|
||||
5. Writes the new version to `package.json`, `tauri.conf.json`, `Cargo.toml`, and `Cargo.lock`.
|
||||
6. Runs `tauri build --no-bundle -- --locked`. This runs `pnpm build` and compiles the release app.
|
||||
7. Runs `scripts/setWindowsVersion.ps1` to write the version resource of `runestone.exe`.
|
||||
8. Runs `tauri bundle --bundles nsis` with the RuneStone template from `src-tauri/windows/installer.nsi`.
|
||||
9. Moves the setup file into `releases/<version>/`, writes `host.json`, and removes the bundle-folder copy.
|
||||
|
||||
### Failure and rollback
|
||||
|
||||
If a step fails, the script restores the four version files.
|
||||
It moves partial setup files and `host.json` into `output/installer-build/<version>/` with a `.failed-<timestamp>` suffix.
|
||||
|
||||
Ctrl+C stops the script before this cleanup. The version files then keep the new version.
|
||||
Before you run the script again, copy the `*.before` files from `output/installer-build/<version>/` back to their original names.
|
||||
A new run with the same version replaces those copies.
|
||||
|
||||
## Installer requirements
|
||||
|
||||
Keep these properties when you change the installer configuration or template:
|
||||
|
||||
| Requirement | Implementation |
|
||||
| --- | --- |
|
||||
| Reinstall is the default when RuneStone is installed, also for the same version. | The NSIS maintenance page preselects the reinstall option. |
|
||||
| Users do not uninstall RuneStone before an update or a reinstall. | Updates and reinstalls replace the app in place. |
|
||||
| Updates and reinstalls keep workspace files and user settings. | Workspaces stay outside the installation folder. Settings stay in application data. |
|
||||
| Older versions cannot replace a newer installation. | `allowDowngrades` is `false`. `pnpm build:installer` stops if this setting changes. |
|
||||
| The app identity stays the same across upgrades. | The identifier stays `com.runestone.app`. |
|
||||
| WebView2 is available. | The installer embeds the WebView2 bootstrapper. If the runtime is missing, setup downloads it. |
|
||||
|
||||
The installer uses the RuneStone icon, installs for the current Windows account, and adds a Start menu shortcut and an uninstaller.
|
||||
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.
|
||||
Local installers are unsigned. Configure Windows code signing with [Tauri's signing guide](https://v2.tauri.app/distribute/sign/windows/) before public distribution.
|
||||
The NSIS template comes from Tauri CLI 2.11.4. When you update Tauri, compare the template with the new Tauri version.
|
||||
See [Tauri's Windows installer documentation](https://v2.tauri.app/distribute/windows-installer/) for 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.
|
||||
Cargo and Tauri accept only SemVer versions. The Windows version resource accepts only four numbers.
|
||||
`scripts/releaseVersion.mjs` encodes a hotfix version for those fields. The encoding does not create a separate build or change the release version.
|
||||
|
||||
`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 suffix index counts `a` = 1 through `z` = 26, then `aa` = 27. A regular version has index 0.
|
||||
|
||||
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.
|
||||
| Field | Value for `0.1.23a` |
|
||||
| --- | --- |
|
||||
| `package.json`, `[package.metadata.runestone]`, the setup file name, the version in Settings, and the executable `FileVersion` and `ProductVersion` strings | `0.1.23a` |
|
||||
| `tauri.conf.json`, the Cargo package version, and `Cargo.lock` | `0.1.23+1` |
|
||||
| The numeric Windows version resource of the executable and the installer | `0.1.23.1` |
|
||||
| Registry value `RuneStoneReleaseVersion` | `0.1.23a` |
|
||||
| Registry value `DisplayVersion`, which Windows shows in installed apps | `0.1.23+1` |
|
||||
|
||||
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.
|
||||
Each numeric part and the suffix index must not exceed 65535. The last valid suffix is `crxo`.
|
||||
The script rejects other versions before it changes a file.
|
||||
|
||||
## 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.
|
||||
The installer comparison in `src-tauri/windows/versionCompare.nsh` sorts the numeric release first, then the suffix:
|
||||
`0.1.23 < 0.1.23a < 0.1.23b < 0.1.23z < 0.1.23aa < 0.1.24`.
|
||||
The installer reads `RuneStoneReleaseVersion` and uses `DisplayVersion` when that value is missing.
|
||||
An installed version with an unknown format counts as newer, so setup blocks replacement.
|
||||
Older RuneStone installers read `DisplayVersion` as SemVer and treat `0.1.23+1` as newer than `0.1.23`. Thus an older `0.1.23` installer does not replace the hotfix.
|
||||
|
||||
## Installer checks
|
||||
|
||||
Do these checks on a separate Windows test account or virtual machine. A successful build does not prove them.
|
||||
|
||||
| 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.
|
||||
| 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 a development server. |
|
||||
| Create a workspace outside the installation folder | Notes save and open again. |
|
||||
| Install a newer version | Setup updates the app and keeps workspace files. |
|
||||
| Install the same version again | Setup selects reinstall and keeps workspace files and settings. |
|
||||
| Install an older version | Setup blocks the downgrade. |
|
||||
| Install a hotfix over its base version | Setup updates the app. |
|
||||
| Remove RuneStone through Windows Settings | The app and shortcuts are removed. The separate workspace stays. |
|
||||
|
||||
## 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).
|
||||
Prerequisites:
|
||||
|
||||
Choose the package format for the build. Each example produces a package in the output folder listed below:
|
||||
- The [Linux development prerequisites](linux.md) on the processor architecture of the package.
|
||||
- A Linux Browser runtime for that architecture, staged in `src-tauri/browser-engine`.
|
||||
- The new version in all RuneStone version fields. No Linux script sets or restores them. See [Versions](releases.md#versions).
|
||||
|
||||
```sh
|
||||
# Example: Debian package
|
||||
pnpm tauri build --bundles deb -- --locked
|
||||
Procedure, in the RuneStone repository root. The commands use the Tauri CLI from `package.json` and the bundle settings in `src-tauri/tauri.linux.conf.json`.
|
||||
|
||||
# Example: AppImage
|
||||
pnpm tauri build --bundles appimage -- --locked
|
||||
```
|
||||
1. Build the package format that you need:
|
||||
|
||||
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/`.
|
||||
```sh
|
||||
# Debian package
|
||||
pnpm tauri build --bundles deb -- --locked
|
||||
|
||||
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.
|
||||
# AppImage
|
||||
pnpm tauri build --bundles appimage -- --locked
|
||||
```
|
||||
|
||||
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/).
|
||||
2. Find the package in `src-tauri/target/release/bundle/deb/` or `src-tauri/target/release/bundle/appimage/`.
|
||||
3. Move the package into `releases/<version>/`. Do not leave a copy in the bundle folder.
|
||||
4. Put the checksums, the source commit, the environment, the test results, and the untested cases in the same folder.
|
||||
|
||||
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.
|
||||
If the build fails, restore the previous version fields.
|
||||
|
||||
## Experimental macOS packages
|
||||
Example, from the 0.1.44 download link in the README: the x86_64 Debian build of version `0.1.44` is `RuneStone_0.1.44_amd64.deb`.
|
||||
|
||||
Build on macOS with the correct Browser runtime.
|
||||
`pnpm build:installer` does not build Linux packages. It stops on operating systems other than Windows.
|
||||
No Linux script encodes hotfix versions, and Tauri rejects a letter suffix in `tauri.conf.json`. Report this blocker before a Linux hotfix build.
|
||||
|
||||
On macOS, a local application bundle can use:
|
||||
The Debian package depends on `libc6 (>= 2.39)`, as set in `tauri.linux.conf.json`.
|
||||
A package built on a newer system can need libraries that an older system does not have. An AppImage does not remove this limit.
|
||||
For a shared package, build on the oldest distribution that you support and that supplies WebKitGTK 4.1.
|
||||
See [Tauri's Debian guide](https://v2.tauri.app/distribute/debian/) and [Tauri's AppImage guide](https://v2.tauri.app/distribute/appimage/).
|
||||
|
||||
Test a Debian package with the [Linux installation procedure](installation.md#install-on-linux) on a separate test account:
|
||||
|
||||
| Check | Expected result |
|
||||
| --- | --- |
|
||||
| Launch without development tools | RuneStone opens. |
|
||||
| Install the same version again | Settings and workspace files stay. |
|
||||
| Install a newer version | Settings and workspace files stay. |
|
||||
| Remove the package | Workspaces outside the installation folder stay. |
|
||||
|
||||
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.
|
||||
For an example record, see the [Linux 0.1.44 validation](archive/linux-validation-0.1.44.md).
|
||||
|
||||
## macOS packages
|
||||
|
||||
macOS packages are experimental. RuneStone has no validated macOS release procedure.
|
||||
|
||||
Prerequisites: a Mac, the source setup, and a Browser runtime packaged and staged on that Mac.
|
||||
|
||||
In the RuneStone repository root, run:
|
||||
|
||||
```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.
|
||||
Tauri puts the application bundle in `src-tauri/target/release/bundle/macos/`. No script sets the version fields on macOS.
|
||||
|
||||
Example, from the [macOS 0.1.44 record](archive/macos-validation-0.1.44.md): the 0.1.44 DMG used manual steps after this build.
|
||||
Those steps replaced the bundled Browser resources with a copy that keeps the Electron framework symbolic links.
|
||||
Then they applied ad hoc signatures and created the DMG.
|
||||
|
||||
Developer ID signing, notarization, Intel builds, and desktop acceptance tests are not done for macOS.
|
||||
See [Tauri's macOS application bundle guide](https://v2.tauri.app/distribute/macos-application-bundle/).
|
||||
|
||||
Reference in New Issue
Block a user