2026-02-12 10:14:10 +08:00
|
|
|
@echo off
|
2026-02-12 10:29:01 +08:00
|
|
|
REM ================================
|
2026-02-12 10:31:01 +08:00
|
|
|
REM CutThenThink Windows Build Script
|
2026-02-12 10:29:01 +08:00
|
|
|
REM ================================
|
2026-02-12 10:31:01 +08:00
|
|
|
|
|
|
|
|
REM Change to project directory and run packaging
|
2026-02-12 10:29:01 +08:00
|
|
|
cd /d "%~dp0"
|
2026-02-12 10:31:01 +08:00
|
|
|
|
|
|
|
|
REM Run PyInstaller packaging
|
2026-02-12 10:29:01 +08:00
|
|
|
python -m PyInstaller --noconfirm --name "CutThenThink" --windowed --onefile --add-data "src:src" --hidden-import=PyQt6.QtCore --hidden-import=PyQt6.QtGui --hidden-import=PyQt6.QtWidgets --hidden-import=sqlalchemy src/main.py
|
2026-02-12 10:14:10 +08:00
|
|
|
if errorlevel 1 (
|
2026-02-12 10:31:01 +08:00
|
|
|
echo Build Failed!
|
2026-02-12 10:14:10 +08:00
|
|
|
pause
|
|
|
|
|
exit /b 1
|
|
|
|
|
)
|
2026-02-12 10:31:01 +08:00
|
|
|
|
2026-02-12 10:14:10 +08:00
|
|
|
echo ================================
|
2026-02-12 10:31:01 +08:00
|
|
|
echo Build Complete!
|
|
|
|
|
echo Executable: dist\CutThenThink.exe
|
|
|
|
|
echo File size (without PaddleOCR): ~30-50 MB
|
|
|
|
|
echo ================================
|
|
|
|
|
echo.
|
|
|
|
|
echo On first run, the app will auto-download and install PaddleOCR.
|
2026-02-12 10:14:10 +08:00
|
|
|
echo.
|
|
|
|
|
pause
|