34 lines
1.1 KiB
Batchfile
34 lines
1.1 KiB
Batchfile
@echo off
|
|
chcp 65001 >nul
|
|
REM ============================================================
|
|
REM 打包客户端桌面版为单个 exe
|
|
REM 产物:dist\Boss直聘AI投递.exe
|
|
REM 使用:把 exe 复制到项目根目录(与 client 目录同级)双击运行,
|
|
REM client\.env 等配置照常生效。
|
|
REM ============================================================
|
|
|
|
echo [1/2] 安装打包依赖...
|
|
pip install pyinstaller pywebview --quiet
|
|
if errorlevel 1 (
|
|
echo 依赖安装失败,请检查 Python 环境
|
|
pause & exit /b 1
|
|
)
|
|
|
|
echo [2/2] PyInstaller 打包中(首次较慢,请耐心等待)...
|
|
pyinstaller --noconfirm --clean --onefile --windowed ^
|
|
--name "Boss直聘AI投递" ^
|
|
--collect-all uvicorn ^
|
|
--collect-all webview ^
|
|
--add-data "client\web\templates;client\web\templates" ^
|
|
--add-data "client\web\static;client\web\static" ^
|
|
client\desktop.py
|
|
if errorlevel 1 (
|
|
echo 打包失败,请查看上方报错
|
|
pause & exit /b 1
|
|
)
|
|
|
|
echo.
|
|
echo 打包完成:dist\Boss直聘AI投递.exe
|
|
echo 请将该 exe 复制到项目根目录(与 client 文件夹同级)后双击运行。
|
|
pause
|