Files
BYW-VoiceHub/build-exe.bat
T
Henry_Du 4ce4649aaf
Build VoiceHub FPK / build-fpk (push) Failing after 56m5s
Build and Push Docker Image / build-and-push (push) Canceled after 1h9m35s
初次提交
2026-09-06 08:19:02 +08:00

37 lines
1.1 KiB
Batchfile

@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