From 21298e01b0805a0cffffd292cdd046ccf8550fea Mon Sep 17 00:00:00 2001 From: "j.foucher" Date: Sat, 28 Feb 2026 11:41:58 +0100 Subject: [PATCH] Add LAN test scripts: Package, Host, Join batch files Co-Authored-By: Claude Opus 4.6 --- Unreal/PS_AI_Agent/Host.bat | 25 +++++++++++++++ Unreal/PS_AI_Agent/Join.bat | 25 +++++++++++++++ Unreal/PS_AI_Agent/Package.bat | 56 ++++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 Unreal/PS_AI_Agent/Host.bat create mode 100644 Unreal/PS_AI_Agent/Join.bat create mode 100644 Unreal/PS_AI_Agent/Package.bat diff --git a/Unreal/PS_AI_Agent/Host.bat b/Unreal/PS_AI_Agent/Host.bat new file mode 100644 index 0000000..31b86ab --- /dev/null +++ b/Unreal/PS_AI_Agent/Host.bat @@ -0,0 +1,25 @@ +@echo off +REM ============================================================================ +REM HOST — Lance le jeu en Listen Server +REM Ce PC est le serveur + premier joueur +REM Les autres PC utilisent Join.bat pour se connecter +REM ============================================================================ + +echo. +echo ======================================== +echo PS_AI_Agent — HOST (Listen Server) +echo ======================================== +echo. + +REM Detect IP address for display +for /f "tokens=2 delims=:" %%a in ('ipconfig ^| findstr /C:"IPv4"') do ( + set IP=%%a + goto :found +) +:found +echo Les autres joueurs doivent entrer cette IP: %IP% +echo. +echo Appuyer sur une touche pour lancer... +pause >nul + +start "" "%~dp0PS_AI_Agent\Binaries\Win64\PS_AI_Agent.exe" /PS_AI_ConvAgent/Demo_Metahuman?listen -log -windowed -ResX=1920 -ResY=1080 -WinX=0 -WinY=0 diff --git a/Unreal/PS_AI_Agent/Join.bat b/Unreal/PS_AI_Agent/Join.bat new file mode 100644 index 0000000..9e0b85c --- /dev/null +++ b/Unreal/PS_AI_Agent/Join.bat @@ -0,0 +1,25 @@ +@echo off +REM ============================================================================ +REM JOIN — Se connecter a un Host sur le LAN +REM Entrer l'IP affichee par le Host +REM ============================================================================ + +echo. +echo ======================================== +echo PS_AI_Agent — JOIN (Client) +echo ======================================== +echo. + +set /p HOST_IP="Entrer l'IP du Host: " + +if "%HOST_IP%"=="" ( + echo Aucune IP entree. Abandon. + pause + exit /b 1 +) + +echo. +echo Connexion a %HOST_IP% ... +echo. + +start "" "%~dp0PS_AI_Agent\Binaries\Win64\PS_AI_Agent.exe" %HOST_IP% -log -windowed -ResX=1920 -ResY=1080 -WinX=0 -WinY=0 diff --git a/Unreal/PS_AI_Agent/Package.bat b/Unreal/PS_AI_Agent/Package.bat new file mode 100644 index 0000000..31565e7 --- /dev/null +++ b/Unreal/PS_AI_Agent/Package.bat @@ -0,0 +1,56 @@ +@echo off +REM ============================================================================ +REM Package PS_AI_Agent — Development build for LAN testing +REM Output: Builds\Windows\ +REM ============================================================================ + +set UE_ROOT=C:\Program Files\Epic Games\UE_5.5 +set PROJECT=C:\ASTERION\GIT\PS_AI_Agent\Unreal\PS_AI_Agent\PS_AI_Agent.uproject +set OUTPUT=C:\ASTERION\GIT\PS_AI_Agent\Unreal\PS_AI_Agent\Builds + +echo. +echo ======================================== +echo Packaging PS_AI_Agent (Development) +echo ======================================== +echo. +echo Output: %OUTPUT%\Windows\ +echo. + +"%UE_ROOT%\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun ^ + -project="%PROJECT%" ^ + -noP4 ^ + -platform=Win64 ^ + -clientconfig=Development ^ + -build ^ + -cook ^ + -stage ^ + -pak ^ + -archive ^ + -archivedirectory="%OUTPUT%" ^ + -utf8output + +if %ERRORLEVEL% NEQ 0 ( + echo. + echo ======================================== + echo BUILD FAILED + echo ======================================== + pause + exit /b 1 +) + +echo. +echo ======================================== +echo BUILD SUCCESSFUL +echo ======================================== +echo. +echo Copier le dossier Builds\Windows\ sur chaque PC. +echo Utiliser Host.bat et Join.bat pour lancer. +echo. + +REM Copy Host/Join scripts into the build output +copy /Y "%~dp0Host.bat" "%OUTPUT%\Windows\" +copy /Y "%~dp0Join.bat" "%OUTPUT%\Windows\" + +echo Scripts Host.bat et Join.bat copies dans Builds\Windows\ +echo. +pause