Files
bot-rates/build.bat

30 lines
808 B
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
REM 在 Windows 執行此檔即可產生 dist\bot_rates_gui.exe
REM 需求:已安裝 Python 3.8+(勾選 Add to PATH
where python >nul 2>nul
if errorlevel 1 (
echo [X] 找不到 Python請先到 https://www.python.org/downloads/ 安裝並勾選 Add Python to PATH
pause
exit /b 1
)
echo [1/3] 安裝 PyInstaller...
python -m pip install --upgrade pip >nul
python -m pip install pyinstaller || goto :err
echo [2/3] 打包中...
python -m PyInstaller --noconfirm --onefile --windowed ^
--name bot_rates_gui ^
bot_rates_gui.py || goto :err
echo [3/3] 完成執行檔位置dist\bot_rates_gui.exe
echo 將 dist\bot_rates_gui.exe 複製給使用者,雙擊即可執行。
pause
exit /b 0
:err
echo [X] 打包失敗,請檢查上方錯誤訊息。
pause
exit /b 1