Appearance
多平台打包
灵动桌面框架支持一键打包为多平台安装包。
构建命令
bash
pnpm tauri build支持的平台
| 平台 | 格式 | 说明 |
|---|---|---|
| Windows | NSIS (.exe) | 安装向导 |
| Windows | MSI (.msi) | 企业部署 |
| macOS | DMG (.dmg) | 拖拽安装 |
| Linux | DEB (.deb) | Debian/Ubuntu |
| Linux | AppImage | 通用格式 |
打包配置
编辑 src-tauri/tauri.conf.json:
json
{
"bundle": {
"active": true,
"targets": "all",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
]
}
}输出位置
构建产物位于 src-tauri/target/release/bundle/ 目录下。
注意事项
- 首次构建需要下载 Rust 依赖,耗时较长
- Windows 打包需要 NSIS 工具(Tauri 会自动下载)
- macOS 打包建议在 macOS 系统上执行
- 发布前建议进行代码签名