@echo off setlocal rem Builds PLib and starts it. Any arguments are forwarded to the application. rem Usage: run.bat [-c Release] [-- app args] set "ROOT=%~dp0.." set "PROJECT=%ROOT%\src\PLib.Desktop\PLib.Desktop.csproj" set "CONFIGURATION=Debug" if /i "%~1"=="-c" ( set "CONFIGURATION=%~2" shift shift ) where dotnet >nul 2>&1 if errorlevel 1 ( echo [PLib] dotnet SDK was not found in PATH. Install .NET 10 SDK first. exit /b 1 ) rem ffmpeg is only needed at runtime, so a warning is enough to keep going. where ffmpeg >nul 2>&1 if errorlevel 1 echo [PLib] Warning: ffmpeg is not in PATH - thumbnails will not be generated. echo [PLib] Building %CONFIGURATION%... dotnet build "%PROJECT%" -c %CONFIGURATION% --nologo if errorlevel 1 ( echo [PLib] Build failed. exit /b 1 ) echo [PLib] Starting... dotnet run --project "%PROJECT%" -c %CONFIGURATION% --no-build -- %* exit /b %errorlevel%