Files
GOD-CWAK/GODCWAK.bat
2026-05-22 12:47:24 -07:00

50 lines
1.1 KiB
Batchfile

@echo off
title GODCWAK Launcher
color 0A
echo.
echo =========================================
echo GODCWAK v1.0 - Starting...
echo =========================================
echo.
:: Change to the folder this .bat lives in so relative imports work
cd /d "%~dp0"
:: Prefer the project virtual environment, then the Python launcher, then PATH.
set PYTHON_EXE=
set PYTHON_ARGS=
if exist "%~dp0.venv\Scripts\python.exe" (
set "PYTHON_EXE=%~dp0.venv\Scripts\python.exe"
) else (
py -3 --version >nul 2>&1
if %ERRORLEVEL% EQU 0 (
set "PYTHON_EXE=py"
set "PYTHON_ARGS=-3"
) else (
python --version >nul 2>&1
if %ERRORLEVEL% EQU 0 (
set "PYTHON_EXE=python"
)
)
)
if "%PYTHON_EXE%"=="" (
echo [ERROR] Python 3 not found. Install Python or create .venv first.
echo.
pause
exit /b 1
)
:: Launch
"%PYTHON_EXE%" %PYTHON_ARGS% main.py
:: If Python exited with an error, pause so the user can read it
if %ERRORLEVEL% NEQ 0 (
echo.
echo [!] GODCWAK exited with error code %ERRORLEVEL%
echo Check the output above for details.
echo.
pause
)