1
0
Files
nex/openspec/changes/fix-windows-desktop-packaging/proposal.md
lanyuanxiaoyao 64dc66afa6 fix: Windows 桌面应用打包问题修复
- 删除通用 desktop target,重命名 platform targets 为简短形式 (desktop-mac/win/linux)
- 构建产物文件名统一为 nex-{os}-{arch}[.exe] 格式
- Windows 托盘图标使用 .ico 格式(运行时按平台选择)
- Windows 原生对话框使用 user32.MessageBoxW 替代 msg * 命令
- 更新 README.md 和 package-macos.sh 中的引用
- 添加单元测试覆盖 MessageBoxW 封装和图标选择逻辑
- 同步更新 desktop-app spec 规范文档
2026-04-22 23:20:39 +08:00

29 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## Why
Windows 桌面应用存在三个影响用户体验的问题:构建产物无 `.exe` 后缀无法双击运行、运行时弹出控制台窗口、系统托盘图标加载失败。此外 `showError`/`showAbout` 在 Windows 上使用 `msg *` 命令不可靠。这些问题导致应用在 Windows 上不够专业,需要统一修复。
## What Changes
- 删除通用 `desktop` Makefile target仅保留按平台分离的 target
- Makefile target 重命名为简短形式:`desktop-win``desktop-mac``desktop-linux`
- 构建产物文件名统一为 `nex-{os}-{arch}[.exe]` 格式
- 系统托盘图标在 Windows 上使用 `.ico` 格式(运行时 `runtime.GOOS` 判断)
- Windows `showError`/`showAbout` 改用 `user32.dll``MessageBoxW` 原生对话框
- 同步更新已有 `desktop-app` spec 中的构建产物命名和图标格式要求
## Capabilities
### New Capabilities
### Modified Capabilities
- `desktop-app`: 构建产物命名规范变更(`nex-{os}-{arch}`Windows 托盘图标需使用 `.ico` 格式Windows 原生对话框替代 `msg *` 命令
## Impact
- `Makefile`:删除 `desktop` target重命名其余三个 target 和产物文件名
- `backend/cmd/desktop/main.go`:修改 `setupSystray` 图标加载逻辑、`showError`/`showAbout` Windows 实现
- `openspec/specs/desktop-app/spec.md`:更新构建产物命名和 Windows 图标格式要求