Files
cutThenThink/build.bat
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

50 lines
1.2 KiB
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@echo off
REM CutThenThink 极简版本 Windows 打包脚本
echo ===================================
echo CutThenThink v2.0 极简版构建
echo ===================================
echo.
echo 特点:
echo - 核心依赖PyQt6, requests, Pillow
echo - 可选 OCRRapidOCR 插件
echo - 无重型依赖torch, transformers, paddleocr
echo ===================================
echo.
REM [1/3] 清理旧的构建
echo [1/3] 清理旧的构建...
if exist build rmdir /s /q build
if exist dist rmdir /s /q dist
REM [2/3] 安装构建依赖
echo.
echo [2/3] 安装构建依赖...
pip install pyinstaller 2>NUL || echo PyInstaller 已安装
REM [3/3] 构建可执行文件
echo.
echo [3/3] 构建可执行文件...
python -m PyInstaller CutThenThink.spec --clean
if errorlevel 1 (
echo.
echo 构建失败!
pause
exit /b 1
)
echo.
echo ===================================
echo 构建完成!
echo ===================================
echo.
echo 输出位置:
echo - dist\CutThenThink\ # 可执行文件目录
echo.
echo 首次运行前请配置:
echo 1. 可选安装 OCRpip install -r requirements-ocr.txt
echo 2. 配置文件:%%USERPROFILE%%\.cutthenthink\config.yaml
echo.
pause