@echo off
rem Puts the project toolchain (PHP 8.5, Composer, Node.js, PostgreSQL 17) first in PATH
rem for the current cmd.exe session. Usage: scripts\dev\env.cmd

if "%LARAGON_ROOT%"=="" set "LARAGON_ROOT=D:\laragon"
if "%LOYAL_PHP_DIR%"=="" set "LOYAL_PHP_DIR=%LARAGON_ROOT%\bin\php\php-8.5.11-Win32-vs17-x64"
if "%LOYAL_NODE_DIR%"=="" set "LOYAL_NODE_DIR=%LARAGON_ROOT%\bin\nodejs\node-v22"
if "%LOYAL_PG_DIR%"=="" set "LOYAL_PG_DIR=%LARAGON_ROOT%\bin\postgresql\postgresql-17.11"
if "%LOYAL_PG_DATA%"=="" set "LOYAL_PG_DATA=%LARAGON_ROOT%\data\postgresql"

set "PATH=%LOYAL_PHP_DIR%;%LARAGON_ROOT%\bin\composer;%LOYAL_NODE_DIR%;%LOYAL_PG_DIR%\bin;%PATH%"
php -r "echo 'PHP: ' . PHP_VERSION . PHP_EOL;"
