48 lines
1.6 KiB
Markdown
48 lines
1.6 KiB
Markdown
# Windows 发布打包说明
|
||
|
||
本项目是 Wails 桌面应用,发布包基于现有 Go + Vue + Wails 架构生成,不需要 Electron。
|
||
|
||
## 开发机依赖
|
||
|
||
最终用户不需要安装这些工具;只有打包机器需要:
|
||
|
||
- Go
|
||
- Node.js / npm
|
||
- Wails CLI
|
||
- NSIS `makensis.exe`
|
||
|
||
如果 NSIS 没有加入 PATH,可以在执行脚本时传入 `-MakensisPath`。
|
||
|
||
## 一键生成安装包
|
||
|
||
```powershell
|
||
powershell -ExecutionPolicy Bypass -File .\scripts\package-windows.ps1
|
||
```
|
||
|
||
如果 NSIS 不在 PATH:
|
||
|
||
```powershell
|
||
powershell -ExecutionPolicy Bypass -File .\scripts\package-windows.ps1 -MakensisPath "C:\Program Files (x86)\NSIS\makensis.exe"
|
||
```
|
||
|
||
输出文件:
|
||
|
||
```text
|
||
build/bin/qiweimanager-amd64-installer.exe
|
||
```
|
||
|
||
## 安装包行为
|
||
|
||
- 当前用户安装,不需要管理员权限。
|
||
- 默认目录:`%LOCALAPPDATA%\Programs\QiweiManager`。
|
||
- 自动安装/检测 WebView2 Runtime。
|
||
- 安装包包含 `qiweimanager.exe`、`helper.exe`、企业微信 Helper/Loader DLL、`requestdata/`、`eventdata/`。
|
||
- 升级安装会覆盖程序和模板,但不会覆盖已有 `config/config.json`、`config/client_status.json` 和 `config/knowledge/`。
|
||
- 安装时会删除旧版残留 `helper_auto_reply.exe`,避免主程序优先启动旧 helper。
|
||
|
||
## 注意事项
|
||
|
||
- 打包脚本会在构建前关闭正在运行的 `helper.exe` / `helper_auto_reply.exe`,避免 Windows 文件锁导致 helper 覆盖失败。
|
||
- 代码签名入口保留在 NSIS 脚本中,默认不启用。
|
||
- `ffmpeg.exe` 暂未作为必需资源打包;需要完整语音转换能力时,可后续加入安装资源。
|