按 Tauri 2 官方文档 Window::add_child Known issues:「On Windows, this function deadlocks when used in a synchronous command」。项目里 canvas_webview_ensure 是同步 fn,第一个触发 add_child 即死锁,导致 Windows 用户开画布网页节点完全无反应。 把 8 个相关 command 改成 async fn(同 open_browser_window 模式,命令内部无 await,但走 async runtime 不占 IPC 主线程): 必改: - canvas_webview_ensure(唯一 add_child 调用点) 防御性对齐 doc.rs 推荐(操作子 webview 主线程 API): - canvas_webview_metrics / bounds / navigate / action / close_all 约定统一(操作独立 webview window): - browser_control / browser_state canvas_webview_state 仅读 url(),保留同步。 JS 层 src/canvas-webview.js 用 Promise 调用,IPC 协议透明,零改动。 未补:cwv_round 非 mac 分支是空 stub,Windows 上画布网页节点无圆角,cosmetic 另排。 未验证:Windows 实测未做(这台 mac arm64 不能交叉编译 win 产物,见 DESKTOP_BUILD.md 第四章)。修完需 win 拉代码构建 v3.25.31 包并跑测试矩阵,三平台同批齐平发布才能上线。 cargo check --release 通过(mac 侧,0 错 0 警)。
55 lines
1.8 KiB
JSON
55 lines
1.8 KiB
JSON
{
|
|
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
|
"productName": "image-workbench",
|
|
"version": "3.25.31",
|
|
"identifier": "com.malongan.imageworkbench",
|
|
"build": {
|
|
"frontendDist": "../dist",
|
|
"beforeDevCommand": "npm run build",
|
|
"beforeBuildCommand": "npm run lint && npm run build && node scripts/strip-plugins.js"
|
|
},
|
|
"app": {
|
|
"withGlobalTauri": true,
|
|
"windows": [
|
|
{
|
|
"label": "main",
|
|
"title": "无限画布",
|
|
"width": 1440,
|
|
"height": 900,
|
|
"minWidth": 1024,
|
|
"minHeight": 640,
|
|
"resizable": true,
|
|
"fullscreen": false,
|
|
"center": true,
|
|
"dragDropEnabled": false
|
|
}
|
|
],
|
|
"security": {
|
|
"csp": "default-src 'self'; script-src 'self' blob:; worker-src 'self' blob:; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https:; font-src 'self' data:; connect-src 'self' ipc: http://ipc.localhost https: blob: data: http://127.0.0.1:30092 http://localhost:30092; object-src 'none'; base-uri 'none'; frame-ancestors 'none'"
|
|
}
|
|
},
|
|
"bundle": {
|
|
"active": true,
|
|
"targets": "all",
|
|
"category": "GraphicsAndDesign",
|
|
"shortDescription": "无限画布 · 生图工作台",
|
|
"longDescription": "节点式无限画布,本地编排与生成图片,支持系统原生另存为。",
|
|
"icon": [
|
|
"icons/32x32.png",
|
|
"icons/128x128.png",
|
|
"icons/[email protected]",
|
|
"icons/icon.icns",
|
|
"icons/icon.ico"
|
|
],
|
|
"createUpdaterArtifacts": true
|
|
},
|
|
"plugins": {
|
|
"updater": {
|
|
"endpoints": [
|
|
"https://download.maqiart.eu.org/updates/latest.json"
|
|
],
|
|
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE3QUU1N0QwQUM5RjE1RjEKUldUeEZaK3MwRmV1RnhjNVhhSlhaSHkvbVRXNDdscHpOa0s0VHF4NHBBQVJBdDQ0dEVlck5FeEsK"
|
|
}
|
|
}
|
|
}
|