kindle manager

This commit is contained in:
douboer
2025-09-18 17:02:40 +08:00
parent 6df3ce42a3
commit 0e370533e7
14 changed files with 241 additions and 158 deletions

43
打包MacBook指南.md Normal file
View File

@@ -0,0 +1,43 @@
# MacBook 打包 PySide6 应用指南
## 1. 安装 PyInstaller
```zsh
pip install pyinstaller
```
## 2. 打包命令(推荐单文件)
```zsh
pyinstaller --noconfirm --windowed --onefile --icon=icons/Cbb20.png kmanapp.py
```
- `--windowed`无控制台窗口GUI应用必选
- `--onefile`:生成单一可执行文件
- `--icon=...`:指定应用图标
## 3. 资源文件处理
如有图片、qrc、数据库等资源需在 `kmanapp.spec``datas` 字段添加:
```python
# 在 .spec 文件的 a = Analysis(...) 里 datas= 加入:
('icons/Cbb20.png', 'icons'),
('kmanapp.qrc', '.'),
('kmanapp_rc.py', '.'),
('vocab.db', '.'),
# 其他资源...
```
## 4. 重新打包
```zsh
pyinstaller kmanapp.spec
```
## 5. 运行
打包后在 `dist/` 目录下生成可执行文件,双击即可运行。
---
如需自动化脚本或遇到打包报错,请告知具体需求。