Files
UnrealEngineUWP/Engine/Source/Runtime/Launch
Wojciech Krywult c9118e07e4 Command line: EngineLoop: Reworked the way we handle command-line parameters during initialization to allow more flexibility (project/game name).
Previously, it was assumed that the first parameter was the project path (.uproject) or the game name. The next one was optionally a map override name or a commandlet. While this expectation makes sense, it was difficult to comply given that on some platforms and some launch modes we combine command-line parameters provided to the executable (e.g. from Visual Studio) with ones in uecommandline.txt script. We had some conflicting requirements and because of that certain launch scenarios didn't work.

Modified the code to look for the game name / project path withing all the parameters, regardless of the position. Other than that, I've tried to preserve the preexisting behavior. In a few places I've updated the code to allow other switches at arbitrary location withing the command line.

Testing done:
   * Editor: no parameters (project selector); running commandlets (short and long names and/or -run=) with different sets of parameters; running the editor with different parameters; running the game (-game)
   * Game (cpp + bp): running commandlets (short and long names) with different parameters; running the game with different combonations of project, map and other switches.

#preflight
#rb David.Harvey
#jira UE-99467 UE-159599

#rn fix core Allowed more flexibility when looking for the project name command-line parameter. Previously, it was expected to be always the first parameter. Now, we check all the provided parameters. It fixes some launch scenarios (e.g. launching blueprint-only projects with additional command-line parameters) that didn't work due to the fixed order in which we combine command-line parameters with the contents of uecommandline.txt script.

[CL 22626782 by Wojciech Krywult in ue5-main branch]
2022-10-19 11:46:11 -04:00
..
2022-09-07 16:36:52 -04:00