43 lines
1.1 KiB
Batchfile
43 lines
1.1 KiB
Batchfile
@echo off
|
|
setlocal
|
|
|
|
rem Starts the whole app: game server, Vite client and the Aspire dashboard.
|
|
rem Arguments are passed through, e.g. run-aspire.cmd --launch-profile http
|
|
|
|
cd /d "%~dp0"
|
|
|
|
where dotnet >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo [run-aspire] dotnet SDK not found in PATH.
|
|
echo Install .NET 10: https://dotnet.microsoft.com/download
|
|
call :maybe_pause
|
|
exit /b 1
|
|
)
|
|
|
|
where node >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo [run-aspire] Node.js not found in PATH - the client resource will fail to start.
|
|
echo Install Node 22.12 or newer: https://nodejs.org
|
|
echo.
|
|
)
|
|
|
|
echo [run-aspire] Starting the Aspire AppHost. Press Ctrl+C to shut everything down.
|
|
echo.
|
|
|
|
dotnet run --project "src\HSchool.AppHost\HSchool.AppHost.csproj" %*
|
|
set "EXITCODE=%ERRORLEVEL%"
|
|
|
|
if not "%EXITCODE%"=="0" (
|
|
echo.
|
|
echo [run-aspire] AppHost exited with code %EXITCODE%.
|
|
)
|
|
|
|
call :maybe_pause
|
|
endlocal & exit /b %EXITCODE%
|
|
|
|
rem Keeps the window open when the file was double-clicked from Explorer.
|
|
:maybe_pause
|
|
echo %cmdcmdline% | find /i "%~nx0" >nul
|
|
if not errorlevel 1 pause
|
|
exit /b 0
|