新增: Tauri 2.0 桌面版脚手架(B0)
- src-tauri/ 完整项目结构: Cargo.toml / build.rs / tauri.conf.json - Rust 入口 lib.rs: ping IPC 命令验证双向通信 - 应用图标生成(SVG → ico/icns/png 多尺寸) - Tauri 窗口配置: 1280×800, 最小 900×600, 可缩放 - package.json 新增 tauri / tauri:dev / tauri:build 脚本 - vite.config.ts 环境检测: Tauri 模式端口 5173, Web 模式 8080 - @tauri-apps/cli + @tauri-apps/api 依赖安装 - cargo check 编译通过,前端构建不受影响 - 桌面版与 Web 版共享同一套前端代码
This commit is contained in:
39
src-tauri/tauri.conf.json
Normal file
39
src-tauri/tauri.conf.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "u-ppt",
|
||||
"version": "1.0.0",
|
||||
"identifier": "com.uppt.desktop",
|
||||
"build": {
|
||||
"frontendDist": "../dist",
|
||||
"devUrl": "http://localhost:5173",
|
||||
"beforeDevCommand": "npm run dev",
|
||||
"beforeBuildCommand": "npm run build"
|
||||
},
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"title": "u-ppt · 在线演示工具",
|
||||
"width": 1280,
|
||||
"height": 800,
|
||||
"minWidth": 900,
|
||||
"minHeight": 600,
|
||||
"resizable": true,
|
||||
"fullscreen": false
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
"csp": null
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user