优化打包

This commit is contained in:
MAOMOMO
2026-05-23 19:27:44 +08:00
parent 7d58acf0b4
commit ecf5124700
2 changed files with 2 additions and 8 deletions
+2 -3
View File
@@ -58,7 +58,6 @@ uv sync
- `tinify`:TinyPNG 官方 Python SDK。
- `requests[socks]`:为 HTTP/SOCKS5 代理提供支持。
- `pyinstaller`:开发依赖,用于打包 Windows 二进制。
## 启动 GUI
@@ -241,7 +240,7 @@ uv run tinypng_balancer.py --init-config tinify_keys.json
推荐打包为 `onedir` 文件夹版:
```powershell
uv run pyinstaller --noconfirm --clean --onedir --windowed --name tinypng-gui --add-data "tinify_keys.sample.json;." tinypng_gui.py
uv run --with pyinstaller pyinstaller --noconfirm --clean --onedir --windowed --name tinypng-gui --collect-data tinify --add-data "tinify_keys.sample.json;." tinypng_gui.py
```
输出目录:
@@ -275,7 +274,7 @@ dist/
*.exe
```
是否提交 `pyproject.toml` 中的 `pyinstaller` 开发依赖,取决于是否希望项目自带打包能力。当前项目保留该开发依赖,方便以后重复打包。
`pyinstaller` 只在打包时临时安装和使用,不需要作为项目依赖提交。
## 常见问题
-5
View File
@@ -7,8 +7,3 @@ dependencies = [
"requests[socks]>=2.32.5",
"tinify>=1.6.0",
]
[dependency-groups]
dev = [
"pyinstaller>=6.20.0",
]