PCM_Viewer/build.bat

30 lines
533 B
Batchfile
Raw Normal View History

2026-02-11 11:10:50 +08:00
@echo off
REM Windows 打包脚本
echo 正在打包 PCM Viewer...
REM 检查是否在虚拟环境中
if not exist "venv\Scripts\activate.bat" (
echo 错误:未找到虚拟环境
echo 请先创建虚拟环境: python -m venv venv
pause
exit /b 1
)
REM 激活虚拟环境
call venv\Scripts\activate.bat
REM 检查是否安装了 PyInstaller
python -c "import PyInstaller" 2>nul
if errorlevel 1 (
echo 正在安装 PyInstaller...
pip install pyinstaller
)
REM 运行打包脚本
python build.py
pause