55 lines
1.5 KiB
Markdown
55 lines
1.5 KiB
Markdown
# Windows 打包说明
|
||
|
||
本目录提供两级交付方式:
|
||
|
||
1. PyInstaller 便携目录:生成 `dist/DouyinGuaji-<version>/`,可直接复制给别人运行。
|
||
2. Inno Setup 安装包:基于便携目录生成 `DouyinGuaji-<version>-Setup.exe`。
|
||
|
||
## 生成便携目录
|
||
|
||
在项目根目录运行:
|
||
|
||
```powershell
|
||
powershell -NoProfile -ExecutionPolicy Bypass -File packaging\pyinstaller\build_windows.ps1
|
||
```
|
||
|
||
如果依赖已经装好,可以跳过安装依赖:
|
||
|
||
```powershell
|
||
powershell -NoProfile -ExecutionPolicy Bypass -File packaging\pyinstaller\build_windows.ps1 -SkipInstall
|
||
```
|
||
|
||
输出目录:
|
||
|
||
```text
|
||
dist\DouyinGuaji-<version>\
|
||
```
|
||
|
||
主要文件:
|
||
|
||
- `DouyinGuajiGUI.exe`:桌面 GUI 主入口
|
||
- `web_gui.exe`:Web GUI 服务入口
|
||
- `run_cli.exe`:后台运行入口,桌面 GUI / Web GUI 会调用它
|
||
- `assets/`、`webui/`、`config/`:运行所需资源
|
||
- `logs/`、`pic/`、`state/`:运行时输出目录
|
||
|
||
## 生成安装包
|
||
|
||
先安装 Inno Setup 6,并确保 `iscc.exe` 在 PATH 中,然后运行:
|
||
|
||
```powershell
|
||
iscc packaging\inno\douyin_guaji.iss /DMyAppVersion=3.3.3
|
||
```
|
||
|
||
输出目录:
|
||
|
||
```text
|
||
dist\installer\DouyinGuaji-3.3.3-Setup.exe
|
||
```
|
||
|
||
## 发给别人前检查
|
||
|
||
- 目标电脑需要能使用 ADB,或者把 Android platform-tools 加入 PATH。
|
||
- 首次启动 PaddleOCR 相关组件可能较慢,杀毒软件也可能扫描 exe。
|
||
- `config/config.json` 是本地运行配置,默认不随安装包带个人配置;让使用者首次打开后在 GUI 中保存配置。
|