@echo off
setlocal EnableExtensions

set "PROJECT_DIR=%~dp0.."
set "PACKAGE_DIR=%PROJECT_DIR%\Builds\WindowsDevelopment"
set "DEMO_EXE=%PACKAGE_DIR%\AgrarianGame.exe"
set "CAPTURE_ROOT=%PROJECT_DIR%\Saved\VisualQA\InvestorDemo"

if not exist "%DEMO_EXE%" (
	echo ERROR: Packaged demo executable not found: "%DEMO_EXE%"
	exit /b 2
)

sc query SunshineService | find /I "RUNNING" >nul 2>nul
if errorlevel 1 (
	echo ERROR: SunshineService is not running. Start Sunshine before the investor visual QA capture.
	exit /b 3
)

if /I "%~1"=="--check-tools" (
	echo READY: packaged demo exists and SunshineService is running.
	exit /b 0
)

if not exist "%CAPTURE_ROOT%" mkdir "%CAPTURE_ROOT%" >nul 2>nul

echo.
echo Agrarian investor-demo full visual QA evidence checklist
echo --------------------------------------------------------
echo Package: "%PACKAGE_DIR%"
echo Capture root: "%CAPTURE_ROOT%"
echo.
echo Use Sunshine plus Moonlight or an equivalent real GPU desktop capture path.
echo Do not use QEMU guest-agent screenshots for this visual gate.
echo Use the Default rendering preset unless intentionally validating another profile.
echo.
echo Required capture labels:
echo   01-startup-credits
echo   02-character-selection
echo   03-first-spawn
echo   04-terrain
echo   05-vegetation
echo   06-water
echo   07-campfire
echo   08-shelter
echo   09-pause-menu
echo   10-save-quit
echo.
echo Create visual-qa-summary.txt beside the captures with package path,
echo version label, rendering preset, capture method, tester, pass/fail result,
echo visible defects, and investor-viewing decision.
echo.
exit /b 0
