fix(desktop): 打包元数据还是 wails3 脚手架模板值,app 根本起不来
现象:wails3 package 出来的 .app 双击报「可执行文件不存在」,macOS 直接拒绝启动。 根因是我迁移 v3 时埋的:build/darwin/Info.plist 里 CFBundleExecutable 写着 "wails3ref"、bundle ID 是 "com.example.wails3ref",全是脚手架模板默认值, 而实际二进制叫 sundynix_desktop —— 对不上,macOS 认为 bundle 坏了。 我当时在 build/config.yml 里填了正确的产品信息(com.sundynix.agentix / sundynix-agentix),但漏了那个文件顶部写明的一步:改了 info 要跑 `wails3 task common:update:build-assets` 重新生成资产。补跑之后不只 macOS, Linux 的 desktop/nfpm、Windows 的 info.json/nsis/manifest 里的 "My Product"/"My Company"/"wails3ref" 也一并换成了真实产品信息 —— 这些留到打包分发才发现就麻烦了。 Assets.car/icons.icns 一并提交:体积变化大(1.63→2.03MB / 52→45KB)不是噪声, 是真被重新生成了;但逐像素比对确认图案没变(平均差 0.6/255),无回归。 顺带删掉重生成又造出来的 build/ios —— 项目是 desktop-only。这次它只有 plist/storyboard/pbxproj、没有 .go 文件,不会像当初那样让 go build ./... 挂掉, 但也没必要留。已验 go build ./... 通过。 已知待办(非本次引入):app 图标至今是 Wails 默认的 "W" logo,从没做过自定义。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=My Product
|
||||
Comment=A wails3ref application
|
||||
Name=sundynix-agentix
|
||||
Comment=事件驱动的 AI Agent 工作台
|
||||
# The Exec line includes %u to pass the URL to the application
|
||||
Exec=/usr/local/bin/wails3ref %u
|
||||
Exec=/usr/local/bin/sundynix_desktop %u
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=wails3ref
|
||||
Icon=sundynix_desktop
|
||||
Categories=Utility;
|
||||
StartupWMClass=wails3ref
|
||||
StartupWMClass=sundynix_desktop
|
||||
|
||||
|
||||
|
||||
@@ -3,26 +3,26 @@
|
||||
#
|
||||
# The lines below are called `modelines`. See `:help modeline`
|
||||
|
||||
name: "wails3ref"
|
||||
name: "sundynix_desktop"
|
||||
arch: ${GOARCH}
|
||||
platform: "linux"
|
||||
version: "0.1.0"
|
||||
section: "default"
|
||||
priority: "extra"
|
||||
maintainer: ${GIT_COMMITTER_NAME} <${GIT_COMMITTER_EMAIL}>
|
||||
description: "A wails3ref application"
|
||||
vendor: "My Company"
|
||||
description: "事件驱动的 AI Agent 工作台"
|
||||
vendor: "sundynix"
|
||||
homepage: "https://wails.io"
|
||||
license: "MIT"
|
||||
release: "1"
|
||||
|
||||
contents:
|
||||
- src: "./bin/wails3ref"
|
||||
dst: "/usr/local/bin/wails3ref"
|
||||
- src: "./bin/sundynix_desktop"
|
||||
dst: "/usr/local/bin/sundynix_desktop"
|
||||
- src: "./build/appicon.png"
|
||||
dst: "/usr/share/icons/hicolor/128x128/apps/wails3ref.png"
|
||||
- src: "./build/linux/wails3ref.desktop"
|
||||
dst: "/usr/share/applications/wails3ref.desktop"
|
||||
dst: "/usr/share/icons/hicolor/128x128/apps/sundynix_desktop.png"
|
||||
- src: "./build/linux/sundynix_desktop.desktop"
|
||||
dst: "/usr/share/applications/sundynix_desktop.desktop"
|
||||
|
||||
# Default dependencies for the GTK4 + WebKitGTK 6.0 stack (Ubuntu 24.04+ / Debian 13+)
|
||||
depends:
|
||||
|
||||
Reference in New Issue
Block a user