- 添加 tauri-plugin-updater / tauri-plugin-process Rust 依赖 - 注册 updater 和 process 插件到 Tauri 构建器 - 配置 tauri.conf.json 更新器端点与公钥占位 - 添加 @tauri-apps/plugin-updater / plugin-process npm 依赖 - 创建 useUpdater composable(静默检查、手动检查、下载进度、安装重启) - 在 AppLayout 标题栏集成更新交互 UI(下载按钮、进度条、安装状态) - 添加 .pnpm-store 到 .gitignore
56 lines
1.2 KiB
JSON
56 lines
1.2 KiB
JSON
{
|
|
"$schema": "https://schema.tauri.app/config/2",
|
|
"productName": "MQTTX",
|
|
"version": "0.1.0",
|
|
"identifier": "com.mqtt.x",
|
|
"build": {
|
|
"beforeDevCommand": "pnpm dev",
|
|
"devUrl": "http://localhost:1420",
|
|
"beforeBuildCommand": "pnpm build",
|
|
"frontendDist": "../dist"
|
|
},
|
|
"app": {
|
|
"windows": [
|
|
{
|
|
"title": "MQTTX - MQTT v5 调试工具",
|
|
"width": 1200,
|
|
"height": 800,
|
|
"minWidth": 900,
|
|
"minHeight": 600
|
|
}
|
|
],
|
|
"security": {
|
|
"csp": null
|
|
}
|
|
},
|
|
"plugins": {
|
|
"updater": {
|
|
"active": true,
|
|
"dialog": true,
|
|
"endpoints": [
|
|
"https://releases.mqttx.app/update/{{target}}-{{arch}}/{{current_version}}"
|
|
],
|
|
"pubkey": "请替换为你的公钥——使用 `tauri signer generate` 生成签名密钥对后,将公钥粘贴至此"
|
|
}
|
|
},
|
|
"bundle": {
|
|
"active": true,
|
|
"targets": "all",
|
|
"icon": [
|
|
"icons/32x32.png",
|
|
"icons/128x128.png",
|
|
"icons/128x128@2x.png",
|
|
"icons/icon.icns",
|
|
"icons/icon.ico"
|
|
],
|
|
"windows": {
|
|
"nsis": {
|
|
"languages": ["SimpChinese", "English"],
|
|
"displayLanguageSelector": true
|
|
},
|
|
"wix": {
|
|
"language": ["zh-CN", "en-US"]
|
|
}
|
|
}
|
|
}
|
|
} |