Files
jianli-boss/build_exe.bat
T
2026-08-26 12:16:54 +08:00

35 lines
1.4 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
chcp 65001 >nul
REM ============================================================
REM 打包客户端桌面版(PySide6 + QtWebEngine,Win10/11 通用,零系统依赖)
REM 产物:dist\Boss直聘AI投递-%APP_VERSION%\ 文件夹(内含 exe 及运行时)
REM 每次升级改 APP_VERSION,避免与正在运行的旧版本目录冲突
REM 使用:把整个文件夹拷到目标机器(或压缩成 zip 发送),
REM 双击文件夹里的 Boss直聘AI投递-%APP_VERSION%.exe 运行。
REM ============================================================
set APP_VERSION=1.1
echo [1/2] 安装打包依赖...
pip install pyinstaller PySide6 --quiet
if errorlevel 1 (
echo 依赖安装失败,请检查 Python 环境
pause & exit /b 1
)
echo [2/2] PyInstaller 打包中(Qt 体积大,首次较慢,请耐心等待)...
pyinstaller --noconfirm --clean --onedir --windowed ^
--name "Boss直聘AI投递-%APP_VERSION%" ^
--collect-all uvicorn ^
--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投递-%APP_VERSION%\Boss直聘AI投递-%APP_VERSION%.exe
echo 请将 dist\Boss直聘AI投递-%APP_VERSION% 整个文件夹拷贝到目标机器后双击 exe 运行。
pause