- 移除 GovAI, nomifun-tauri, 算力盒子 的 submodule 引用 - 添加所有子项目的完整源代码 - 保留原始 .git 为 .git.bak 备份
NomiFun Desktop Updater
This directory documents the Tauri updater wiring for nomifun-desktop.
The updater is a scaffold, not a ready production release channel. The plugin is installed and the desktop command exists, but public releases still require release-owner credentials, a real HTTPS endpoint, and a signing key pair that is controlled outside the repository.
Current State
- Rust plugin:
apps/desktop/Cargo.tomlincludestauri-plugin-updater. - Frontend package:
ui/package.jsonincludes@tauri-apps/plugin-updater. - Tauri config:
apps/desktop/tauri.conf.jsoncontainsplugins.updater.endpointsandplugins.updater.pubkey. - Desktop command:
check_for_updatesis exposed through Tauri invoke and returns a version string ornull. - Build script:
bun run build:updaterproduces updater signatures (.sig) next to release installers when the signing environment variables are set.
The configured endpoint is a placeholder. The configured pubkey must be treated as a development value unless the release owner has explicitly replaced it and stored the matching private key in release infrastructure.
Required Before Public Release
-
Generate an updater signing key pair owned by the release owner:
bun x tauri signer generate -w <private-key-output-path> -
Put the printed public key in
plugins.updater.pubkeyinapps/desktop/tauri.conf.json. -
Store the private key and password in CI or another release-secret store. Never commit them.
-
Replace
plugins.updater.endpointswith a real HTTPS URL that serveslatest.json. -
Build release artifacts with updater signing enabled.
-
Upload installers and signatures to your release hosting.
-
Publish
latest.jsonwith the correct URLs and signatures.
Updater signing is separate from OS code signing. macOS Developer ID signing and
notarization are documented in apps/desktop/signing/README.md. Windows
SmartScreen reputation still requires an external code-signing certificate and
publisher reputation.
Build A Signed Update Artifact
Set the private key content, not a path:
export TAURI_SIGNING_PRIVATE_KEY="$(cat <private-key-output-path>)"
export TAURI_SIGNING_PRIVATE_KEY_PASSWORD="<private-key-password-or-empty>"
bun run build:updater
Artifacts land under target/release/bundle/. Each installer that supports
updates gets a sibling .sig file, for example:
target/release/bundle/nsis/NomiFun_0.1.1_x64-setup.exe
target/release/bundle/nsis/NomiFun_0.1.1_x64-setup.exe.sig
Copy the full .sig file content into the matching platform entry in
latest.json.
latest.json
The Tauri updater expects a manifest similar to:
{
"version": "0.1.1",
"notes": "Release notes for users.",
"pub_date": "2026-06-24T00:00:00Z",
"platforms": {
"windows-x86_64": {
"signature": "<contents-of-.sig>",
"url": "https://example.com/downloads/NomiFun_0.1.1_x64-setup.exe"
},
"darwin-aarch64": {
"signature": "<contents-of-.sig>",
"url": "https://example.com/downloads/NomiFun_0.1.1_aarch64.dmg"
},
"linux-x86_64": {
"signature": "<contents-of-.sig>",
"url": "https://example.com/downloads/nomifun_0.1.1_amd64.AppImage"
}
}
}
Common platform keys are:
windows-x86_64darwin-x86_64darwin-aarch64linux-x86_64
Client Behavior
The current command only checks for an available update:
import { invoke } from "@tauri-apps/api/core";
const newVersion = await invoke<string | null>("check_for_updates");
Download/install UX can be implemented either in the frontend with
@tauri-apps/plugin-updater (check, downloadAndInstall) or in the Rust
command by calling download_and_install after a user confirms the action.
Safety Checklist
- Private updater key is stored only in release secrets.
plugins.updater.pubkeymatches the private key used by CI.plugins.updater.endpointspoints to HTTPS.latest.jsoncontains real installer URLs and exact signature contents.- OS code signing and notarization are handled separately for each platform.