From bf4a3bb922e3a37d1e9555a4f8fbfc08d61c4e14 Mon Sep 17 00:00:00 2001 From: Leonid Pershin Date: Sat, 8 Aug 2026 07:14:42 +0300 Subject: [PATCH] Enhance README.md with installation instructions and usage examples for PLib video library manager. --- scripts/run.bat | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 scripts/run.bat diff --git a/scripts/run.bat b/scripts/run.bat new file mode 100644 index 0000000..3e870c2 --- /dev/null +++ b/scripts/run.bat @@ -0,0 +1,36 @@ +@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%