@echo off chcp 65001 >nul title BYWVoiceHub 点歌系统模拟器打包工具 echo =================================================== echo BYWVoiceHub 点歌系统模拟器打包为 EXE echo =================================================== :: 检查是否安装了 Python python --version >nul 2>&1 if %errorlevel% neq 0 ( echo [错误] 找不到 Python!无法打包。 pause exit /b ) echo [1/3] 正在安装打包依赖 (pyinstaller, requests)... pip install requests pyinstaller -q if %errorlevel% neq 0 ( echo [错误] 依赖安装失败,请检查网络! pause exit /b ) echo [2/3] 开始打包 (使用 pyinstaller)... :: -F 表示打包为单文件, -w 表示不显示控制台窗口 pyinstaller -F -w --clean --name "BYWSongRequestSimulator" simulator.py echo [3/3] 清理临时文件... if exist "build" rmdir /s /q "build" if exist "BYWSongRequestSimulator.spec" del /q "BYWSongRequestSimulator.spec" echo. echo =================================================== echo 打包完成!请在 dist 目录下找到 BYWSongRequestSimulator.exe echo =================================================== pause