Files
DirtyLeague_Bot/setup.bat

45 lines
1.2 KiB
Batchfile

@echo off
chcp 65001 > nul
echo ========================================================
echo DirtyLeague Bot - Setup and Installation
echo ========================================================
echo.
echo [1/3] Checking Python installation...
python --version > nul 2>&1
if %ERRORLEVEL% neq 0 (
echo [ERROR] Python not found in PATH!
echo Please install Python 3.10 or newer and make sure to check "Add python.exe to PATH".
pause
exit /b 1
)
echo [2/3] Creating virtual environment (.venv)...
if not exist ".venv" (
python -m venv .venv
if %ERRORLEVEL% neq 0 (
echo [ERROR] Failed to create virtual environment!
pause
exit /b 1
)
) else (
echo Virtual environment already exists (.venv).
)
echo [3/3] Installing dependencies from requirements.txt...
call .venv\Scripts\activate.bat
python -m pip install --upgrade pip
pip install -r requirements.txt
if %ERRORLEVEL% neq 0 (
echo [ERROR] Failed to install requirements!
pause
exit /b 1
)
echo.
echo ========================================================
echo Installation completed successfully!
echo You can now launch the bot using start_bot.bat
echo ========================================================
pause