congsh
|
0ce1d71a90
|
build: 添加 Windows 打包方案
- 更新 PyInstaller spec 配置
- 简化 build.sh 构建脚本
- 更新 build.bat Windows 打包脚本
- 添加 docs/BUILD.md 打包说明文档
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 15:59:23 +08:00 |
|
congsh
|
a5e50876a0
|
fix: 添加编码设置和源码大小检查
更改:
1. 开头添加 chcp 65001 设置控制台编码为 UTF-8
2. 添加源码大小检查(步骤 2/5)
- 如果 src 大于 5MB 则警告
- 防止构建过大的 exe
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 14:15:21 +08:00 |
|
congsh
|
313e1f40d8
|
refactor: 重构为纯云端版本,移除所有本地ML库依赖
重大更改:
1. requirements.txt - 移除 paddleocr/paddlepaddle,使用纯 API 版本
2. src/core/ocr.py - 完全重写
- 移除 PaddleOCREngine 和 ensure_paddleocr()
- 移除 numpy 依赖(不再需要)
- 实现完整的 CloudOCREngine
- 支持百度/腾讯/阿里云 OCR API
- 添加自定义 API 支持
3. src/config/settings.py - 简化 OCR 配置
- OCRMode 枚举仅保留 CLOUD
- OCRConfig 添加 provider 字段
4. src/core/__init__.py - 移除 PaddleOCREngine 导出
5. src/gui/main_window.py - 移除 ensure_paddleocr 导入
6. build.bat/build.sh - 简化构建参数
- 移除所有 ML 库的 --exclude-module
- 移除 pyi_hooks 依赖
- 添加 openai/anthropic hidden-import
测试:
- ✓ 所有核心模块导入成功
- ✓ 没有 PaddleOCR 相关错误
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 13:42:46 +08:00 |
|
congsh
|
4589289635
|
fix: 修复Python 3.13环境下PyInstaller构建崩溃问题
问题:
- PyInstaller在分析阶段尝试导入torch/transformers等ML库
- 这些库与Python 3.13不兼容,导致"Windows fatal exception: access violation"
- 构建过程无法完成,无法生成exe文件
解决方案:
1. 添加pyi_hooks/pyi_rth_ignore_torch.py运行时hook
- 在PyInstaller分析阶段阻止torch等模块的导入
- 这些模块将在运行时动态安装
2. 添加pyi_hooks/hook-exclude-ml.py和hook-paddleocr.py
- 明确告诉PyInstaller不收集这些ML库
3. 更新build.bat和build.sh
- 使用--runtime-hook和--additional-hooks-dir
- 添加--exclude-module参数排除所有ML库
测试:
- 验证所有hook文件语法正确
- 验证项目核心功能可以在不导入torch的情况下正常工作
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 13:31:49 +08:00 |
|
congsh
|
a5897a1cd8
|
fix: 移除tkinter依赖,改用PyQt6实现
- message_handler.py: 重写为兼容模式,tkinter不可用时使用PyQt6
- result_widget.py: 完全重写为PyQt6版本
- models/__init__.py: 更新导出BaseModel而非Base
- build.bat: 添加PyQt6的hidden-import参数
这样可以解决Windows打包时tkinter模块找不到的问题
|
2026-02-12 11:25:14 +08:00 |
|
congsh
|
5ac2bd98d4
|
fix: 添加Pillow等模块的hidden-import参数
- 添加PIL及其子模块的hidden-import
- 添加numpy和pyperclip的hidden-import
- 添加--collect-all pyqt6确保完整打包
|
2026-02-12 11:14:06 +08:00 |
|
congsh
|
c6025d9858
|
fix: 修复Windows打包Python 3.13兼容性问题
- 升级SQLAlchemy到2.0.36+以支持Python 3.13
- 升级PyQt6到6.7.0+解决DLL加载问题
- 添加setuptools作为构建依赖
- 添加build/dist清理步骤
- 改进输出格式和错误信息
|
2026-02-12 10:41:27 +08:00 |
|
congsh
|
56b3c5a5b2
|
fix: 完善Windows打包脚本
- 修复 PyInstaller 和 Python 检测逻辑
- 使用 Python 模块检测(instead of where command)
- 统一依赖安装方式
- 添加 setuptools 检测
- 自动安装所有缺失的依赖包
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 10:38:44 +08:00 |
|
congsh
|
47c86c69ae
|
fix: 修复Windows打包脚本依赖检查
- 检查 Python 是否正确安装
- 检查 PyQt6 是否可用
- 如果缺失则自动安装
- 提供清晰的错误提示和安装指引
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 10:32:31 +08:00 |
|
congsh
|
8bc9cad901
|
fix: 移除build.bat中文注释避免编码问题
- 将所有中文注释改为英文
- 保持脚本功能不变
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 10:31:01 +08:00 |
|
congsh
|
a2d731e91b
|
fix: 修复Windows打包脚本
- 简化build.bat,使用Python命令直接打包
- 移除导致错误的^续行符
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 10:29:01 +08:00 |
|
congsh
|
154d53dbfd
|
feat: 添加轻量打包和OCR自动安装功能
- 添加Windows打包脚本 build.bat
- 更新打包文档 BUILD.md(轻量版方案)
- OCR模块:添加首次运行时自动安装PaddleOCR的功能
- 主窗口:添加OCR安装检测和提示逻辑
- 创建应用入口 src/main.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-12 10:14:10 +08:00 |
|