- 简化build.bat,使用Python命令直接打包 - 移除导致错误的^续行符 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
592 B
Batchfile
18 lines
592 B
Batchfile
@echo off
|
|
REM ================================
|
|
REM CutThenThink Windows 打包脚本
|
|
REM ================================
|
|
REM 使用 Python 打包,避免路径问题
|
|
cd /d "%~dp0"
|
|
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
|
|
if errorlevel 1 (
|
|
echo 打包失败!
|
|
pause
|
|
exit /b 1
|
|
)
|
|
echo ================================
|
|
echo 打包完成!
|
|
echo 可执行文件: dist\CutThenThink.exe
|
|
echo.
|
|
pause
|