@echo off
rem Open the Ravin license generator page on this Windows PC.
rem Needs PHP 8.1+ on PATH (https://windows.php.net/download). Vendor tool:
rem it holds the plain signing key, keep it on machines you control.
setlocal
if "%PORT%"=="" set PORT=8099
where php >nul 2>nul
if errorlevel 1 (
  echo error: PHP is not installed or not on PATH. Install PHP 8.1+ and try again.
  pause
  exit /b 1
)
echo Ravin license generator - http://127.0.0.1:%PORT%/  (close this window to stop)
start "" "http://127.0.0.1:%PORT%/"
php -d display_errors=0 -d log_errors=1 -d upload_max_filesize=1M -d post_max_size=2M -S 127.0.0.1:%PORT% -t "%~dp0ui" "%~dp0ui\index.php"
