adamrehn / ue4cli

Command-line interface for Unreal Engine 4
https://docs.adamrehn.com/ue4cli/
MIT License
249 stars 45 forks source link

API doesn't support launching non-Editor targets #62

Open sleeptightAnsiC opened 3 months ago

sleeptightAnsiC commented 3 months ago

I'm working on https://github.com/adamrehn/ue4cli/issues/56 and already have a solution but it only supports Editor target. According to documentation ue4 run was never meant to support non-Editor targets, so my fix for the linked issue would do a job for now. However, I also wish to support non-Editor targets. Currently ue4cli API does not have any logic for that, but it is possible to implement. If I fail to do so, this ticket will remind about the problem.

sleeptightAnsiC commented 3 months ago

NOTE:

Building, cooking and running Linux Client DebugGame is achieved by following UAT call:

Start UAT Non-Interactively: dotnet AutomationTool.dll -ScriptsForProject=/home/User/Projects/BlankUnrealProject/BlankUnrealProject.uproject BuildCookRun -project=/home/User/Projects/BlankUnrealProject/BlankUnrealProject.uproject -noP4 -clientconfig=DebugGame -serverconfig=DebugGame -nocompileeditor -unrealexe=/home/User/UnrealEngine/Engine/Binaries/Linux/UnrealEditor -utf8output -platform=Linux -client -build -cook -CookCultures=en -unversionedcookedcontent -stage -deploy -cmdline= -Messaging -device=Linux@KAL251123 -addcmdline=-SessionId=44DD4BA21D264D548A65AC2498FE5290 -SessionOwner='User' -SessionName='KAL251123'  -run

After said process I was able to successfully launch the build with:

ue4 uat BuildCookRun -project="/home/User/Projects/BlankUnrealProject/BlankUnrealProject.uproject" -clientconfig=DebugGame -serverconfig=DebugGame -platform=Linux -client -run

So this is doable :)

sleeptightAnsiC commented 3 months ago

So I attempted to fix it but I ran into multiple problems related to said functionality:

That said, I think it's worth to abandon this issue for 'ue4cli' and maybe try to fix it for the successor. Fixing it now would be very very risky and hard to support.