skyrama_tui/build.bat
2026-06-04 20:51:20 +03:00

31 lines
1.3 KiB
Batchfile

@echo off
setlocal EnableDelayedExpansion
cd /d "%~dp0"
:: ── Check Go ─────────────────────────────────────────────────
where go >nul 2>&1
if errorlevel 1 (
echo [ERROR] Go is not installed or not on PATH.
pause & exit /b 1
)
:: ── Deps ─────────────────────────────────────────────────────
echo [*] go mod tidy...
go mod tidy
if errorlevel 1 ( echo [ERROR] go mod tidy failed. & pause & exit /b 1 )
:: ── Build game ───────────────────────────────────────────────
echo [*] Building skyrama.exe ...
go build -o skyrama.exe .\cmd\skyrama\
if errorlevel 1 ( echo [ERROR] Game build failed. & pause & exit /b 1 )
:: ── Build admin ──────────────────────────────────────────────
echo [*] Building admin.exe ...
go build -o admin.exe .\cmd\admin\
if errorlevel 1 ( echo [ERROR] Admin build failed. & pause & exit /b 1 )
echo.
echo [OK] skyrama.exe and admin.exe built successfully.
echo.
pause
endlocal