@echo off
rem ============================================================
rem  MoodOn LITE - one-time runtime setup
rem  Installs .NET 8 Desktop Runtime (x64), about 57 MB.
rem  Needed once per PC. After that MoodOn-lite.exe just runs.
rem ============================================================
setlocal
echo.
echo  MoodOn LITE needs the .NET 8 Desktop Runtime (one-time).
echo.

rem ---- try winget first (built into Windows 11) ----
where winget >nul 2>nul
if errorlevel 1 goto manual

echo  Installing via winget...
winget install --id Microsoft.DotNet.DesktopRuntime.8 -e --accept-source-agreements --accept-package-agreements
if errorlevel 1 goto manual

echo.
echo  Done. You can now double-click MoodOn-1.0.0.exe
echo.
pause
exit /b 0

:manual
echo.
echo  winget did not finish the install.
echo  Please install it by hand:
echo.
echo    1) open  https://dotnet.microsoft.com/download/dotnet/8.0
echo    2) under "Desktop Runtime 8.0.x" download  Windows x64 Installer
echo    3) run the downloaded .exe, click through the wizard
echo.
echo  Then double-click MoodOn-1.0.0.exe
echo.
start "" "https://dotnet.microsoft.com/download/dotnet/8.0"
pause
exit /b 0
