From 0f9adda03a04a5e80188f44688ccd075e0387b31 Mon Sep 17 00:00:00 2001 From: Filipe Freire Date: Tue, 1 Aug 2023 20:41:00 +0100 Subject: [PATCH 1/3] specify target platforms --- CoopGameFleep.uproject | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CoopGameFleep.uproject b/CoopGameFleep.uproject index 4e9fc24..3d9eec1 100644 --- a/CoopGameFleep.uproject +++ b/CoopGameFleep.uproject @@ -199,5 +199,8 @@ "Name": "IOSDeviceProfileSelector", "Enabled": false } + ], + "TargetPlatforms": [ + "Windows" ] } \ No newline at end of file From fa37823788598348e0a5f7c7e2835da0f86c6e24 Mon Sep 17 00:00:00 2001 From: Filipe Freire Date: Tue, 1 Aug 2023 23:30:23 +0100 Subject: [PATCH 2/3] split cook and rm duplicate build inside Package.bat --- .github/workflows/build.yml | 5 ++++- scripts/Build.bat | 2 +- scripts/Cook.bat | 5 +++++ scripts/Package.bat | 2 +- scripts/RebuildLighting.bat | 30 +++--------------------------- 5 files changed, 14 insertions(+), 30 deletions(-) create mode 100644 scripts/Cook.bat diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d6618fa..5c90a7c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,7 +51,10 @@ jobs: Saved\Logs\${{env.TEST_LOGNAME}} - name: Rebuild Lighting - run: .\scripts\RebuildLighting.bat $env:UNREAL_PATH (Get-Location).Path $env:PROJECT_NAME $env:TEST_SUITE_TO_RUN $env:TEST_REPORT_FOLDER $env:TEST_LOGNAME $env:UNREAL_EDITOR_CMD Preview P_TestMap + run: .\scripts\RebuildLighting.bat $env:UNREAL_PATH (Get-Location).Path $env:PROJECT_NAME $env:UNREAL_EDITOR_CMD Preview P_TestMap + + - name: Cook + run: .\scripts\Cook.bat $env:UNREAL_PATH (Get-Location).Path $env:PROJECT_NAME - name: Package run: .\scripts\Package.bat $env:UNREAL_PATH (Get-Location).Path $env:PROJECT_NAME $env:TARGET_NAME $env:PACKAGE_FOLDER diff --git a/scripts/Build.bat b/scripts/Build.bat index 97f4934..13a6de3 100644 --- a/scripts/Build.bat +++ b/scripts/Build.bat @@ -2,4 +2,4 @@ set ueLocation=%~1 set projectLocation=%~2 set projectName=%~3 -"%ueLocation%\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="%projectLocation%\%projectName%" -noP4 -platform=Win64 -clientconfig=Development -build +"%ueLocation%\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="%projectLocation%\%projectName%" -noP4 -platform=Win64 -clientconfig=Development -build -skipcook diff --git a/scripts/Cook.bat b/scripts/Cook.bat new file mode 100644 index 0000000..051ddd4 --- /dev/null +++ b/scripts/Cook.bat @@ -0,0 +1,5 @@ +set ueLocation=%~1 +set projectLocation=%~2 +set projectName=%~3 + +"%ueLocation%\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="%projectLocation%\%projectName%" -nop4 -utf8output -cook -stage diff --git a/scripts/Package.bat b/scripts/Package.bat index 2266c0e..265ed2d 100644 --- a/scripts/Package.bat +++ b/scripts/Package.bat @@ -4,4 +4,4 @@ set projectName=%~3 set target=%~4 set packageFolder=%~5 -"%ueLocation%\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="%projectLocation%\%projectName%" -nop4 -utf8output -nocompileeditor -skipbuildeditor -cook -project="%projectLocation%\%projectName%" -target=%target% -platform=Win64 -installed -stage -archive -package -build -pak -iostore -compressed -archivedirectory="%projectLocation%\%packageFolder%" -clientconfig=Development -nocompile -nocompileuat +"%ueLocation%\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="%projectLocation%\%projectName%" -nop4 -utf8output -nocompileeditor -skipbuildeditor -project="%projectLocation%\%projectName%" -target=%target% -platform=Win64 -installed -skipstage -skipcook -archive -package -pak -iostore -compressed -archivedirectory="%projectLocation%\%packageFolder%" -clientconfig=Development -nocompile -nocompileuat diff --git a/scripts/RebuildLighting.bat b/scripts/RebuildLighting.bat index 12a80ec..133a7c6 100644 --- a/scripts/RebuildLighting.bat +++ b/scripts/RebuildLighting.bat @@ -1,38 +1,14 @@ :: reference from https://forums.unrealengine.com/t/build-lighting-from-command-line/297535 :: Not working using RunUAT.bat :: RunUAT.bat RebuildLightmaps -project="E:\unreal\coop-game-fleep\CoopGameFleep.uproject" -noP4 -platform=Win64 -clientconfig=Development -:: Running AutomationTool... -:: Using bundled DotNet SDK version: 6.0.302 -:: Starting AutomationTool... :: Parsing command line: RebuildLightmaps -project=E:\unreal\coop-game-fleep\CoopGameFleep.uproject -noP4 -platform=Win64 -clientconfig=Development -:: Initializing script modules... -:: Total script module initialization time: 0.26 s. :: Command RebuildLightMaps requires P4 functionality. -:: ERROR: System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'p4.exe' with working directory 'E:\unreal\UE_5.2'. O sistema não conseguiu localizar o ficheiro especificado. -:: at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) -:: at System.Diagnostics.Process.Start() -:: at AutomationTool.CommandUtils.Run(String App, String CommandLine, String Input, ERunOptions Options, Dictionary`2 Env, SpewFilterCallbackType SpewFilterCallback, String Identifier, String WorkingDir) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\ProcessUtils.cs:line 915 -:: at AutomationTool.P4Environment.DetectP4Port() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\P4Environment.cs:line 269 -:: at AutomationTool.P4Environment..ctor(CommandEnvironment CmdEnv) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\P4Environment.cs:line 124 -:: at AutomationTool.CommandUtils.InitP4Environment() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\P4Utils.cs:line 990 -:: at AutomationTool.Automation.ProcessAsync(ParsedCommandLine AutomationToolCommandLine, StartupTraceListener StartupListener, HashSet`1 ScriptModuleAssemblies) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 149 -:: (see C:\Users\filipe\AppData\Roaming\Unreal Engine\AutomationTool\Logs\E+unreal+UE_5.2\Log.txt for full exception trace) -:: ERROR: Exception performing nothrow action "Kill All Processes": System.InvalidOperationException: No process is associated with this object. -:: at System.Diagnostics.Process.EnsureState(State state) -:: at System.Diagnostics.Process.get_HasExited() -:: at AutomationTool.ProcessResult.get_HasExited() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\ProcessUtils.cs:line 419 -:: at AutomationTool.ProcessManager.KillAll() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\ProcessUtils.cs:line 122 -:: at AutomationTool.Automation.<>c.b__3_1() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 212 -:: at AutomationTool.Automation.NoThrow(Action Action, String ActionDesc) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 227 set ueLocation=%~1 set projectLocation=%~2 set projectName=%~3 -set testSuiteToRun=%~4 -set testReportFolder=%~5 -set testLogName=%~6 -set UnrealEditorCmd=%~7 -set LightQuality=%~8 -set MapToRebuild=%~9 +set UnrealEditorCmd=%~4 +set LightQuality=%~5 +set MapToRebuild=%~6 :: "%ueLocation%\Engine\Binaries\Win64\%UnrealEditorCmd%" "%projectLocation%\%projectName%" -run=resavepackages -buildlighting -allowcommandletrendering -quality=%LightQuality% From 6b229d4df9f48b6751b1f0842dfd3e027413a4ae Mon Sep 17 00:00:00 2001 From: Filipe Freire Date: Wed, 2 Aug 2023 01:03:53 +0100 Subject: [PATCH 3/3] Revert "split cook and rm duplicate build inside Package.bat" This reverts commit fa37823788598348e0a5f7c7e2835da0f86c6e24. --- .github/workflows/build.yml | 5 +---- scripts/Build.bat | 2 +- scripts/Cook.bat | 5 ----- scripts/Package.bat | 2 +- scripts/RebuildLighting.bat | 30 +++++++++++++++++++++++++++--- 5 files changed, 30 insertions(+), 14 deletions(-) delete mode 100644 scripts/Cook.bat diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c90a7c..d6618fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,10 +51,7 @@ jobs: Saved\Logs\${{env.TEST_LOGNAME}} - name: Rebuild Lighting - run: .\scripts\RebuildLighting.bat $env:UNREAL_PATH (Get-Location).Path $env:PROJECT_NAME $env:UNREAL_EDITOR_CMD Preview P_TestMap - - - name: Cook - run: .\scripts\Cook.bat $env:UNREAL_PATH (Get-Location).Path $env:PROJECT_NAME + run: .\scripts\RebuildLighting.bat $env:UNREAL_PATH (Get-Location).Path $env:PROJECT_NAME $env:TEST_SUITE_TO_RUN $env:TEST_REPORT_FOLDER $env:TEST_LOGNAME $env:UNREAL_EDITOR_CMD Preview P_TestMap - name: Package run: .\scripts\Package.bat $env:UNREAL_PATH (Get-Location).Path $env:PROJECT_NAME $env:TARGET_NAME $env:PACKAGE_FOLDER diff --git a/scripts/Build.bat b/scripts/Build.bat index 13a6de3..97f4934 100644 --- a/scripts/Build.bat +++ b/scripts/Build.bat @@ -2,4 +2,4 @@ set ueLocation=%~1 set projectLocation=%~2 set projectName=%~3 -"%ueLocation%\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="%projectLocation%\%projectName%" -noP4 -platform=Win64 -clientconfig=Development -build -skipcook +"%ueLocation%\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="%projectLocation%\%projectName%" -noP4 -platform=Win64 -clientconfig=Development -build diff --git a/scripts/Cook.bat b/scripts/Cook.bat deleted file mode 100644 index 051ddd4..0000000 --- a/scripts/Cook.bat +++ /dev/null @@ -1,5 +0,0 @@ -set ueLocation=%~1 -set projectLocation=%~2 -set projectName=%~3 - -"%ueLocation%\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="%projectLocation%\%projectName%" -nop4 -utf8output -cook -stage diff --git a/scripts/Package.bat b/scripts/Package.bat index 265ed2d..2266c0e 100644 --- a/scripts/Package.bat +++ b/scripts/Package.bat @@ -4,4 +4,4 @@ set projectName=%~3 set target=%~4 set packageFolder=%~5 -"%ueLocation%\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="%projectLocation%\%projectName%" -nop4 -utf8output -nocompileeditor -skipbuildeditor -project="%projectLocation%\%projectName%" -target=%target% -platform=Win64 -installed -skipstage -skipcook -archive -package -pak -iostore -compressed -archivedirectory="%projectLocation%\%packageFolder%" -clientconfig=Development -nocompile -nocompileuat +"%ueLocation%\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="%projectLocation%\%projectName%" -nop4 -utf8output -nocompileeditor -skipbuildeditor -cook -project="%projectLocation%\%projectName%" -target=%target% -platform=Win64 -installed -stage -archive -package -build -pak -iostore -compressed -archivedirectory="%projectLocation%\%packageFolder%" -clientconfig=Development -nocompile -nocompileuat diff --git a/scripts/RebuildLighting.bat b/scripts/RebuildLighting.bat index 133a7c6..12a80ec 100644 --- a/scripts/RebuildLighting.bat +++ b/scripts/RebuildLighting.bat @@ -1,14 +1,38 @@ :: reference from https://forums.unrealengine.com/t/build-lighting-from-command-line/297535 :: Not working using RunUAT.bat :: RunUAT.bat RebuildLightmaps -project="E:\unreal\coop-game-fleep\CoopGameFleep.uproject" -noP4 -platform=Win64 -clientconfig=Development +:: Running AutomationTool... +:: Using bundled DotNet SDK version: 6.0.302 +:: Starting AutomationTool... :: Parsing command line: RebuildLightmaps -project=E:\unreal\coop-game-fleep\CoopGameFleep.uproject -noP4 -platform=Win64 -clientconfig=Development +:: Initializing script modules... +:: Total script module initialization time: 0.26 s. :: Command RebuildLightMaps requires P4 functionality. +:: ERROR: System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'p4.exe' with working directory 'E:\unreal\UE_5.2'. O sistema não conseguiu localizar o ficheiro especificado. +:: at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) +:: at System.Diagnostics.Process.Start() +:: at AutomationTool.CommandUtils.Run(String App, String CommandLine, String Input, ERunOptions Options, Dictionary`2 Env, SpewFilterCallbackType SpewFilterCallback, String Identifier, String WorkingDir) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\ProcessUtils.cs:line 915 +:: at AutomationTool.P4Environment.DetectP4Port() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\P4Environment.cs:line 269 +:: at AutomationTool.P4Environment..ctor(CommandEnvironment CmdEnv) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\P4Environment.cs:line 124 +:: at AutomationTool.CommandUtils.InitP4Environment() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\P4Utils.cs:line 990 +:: at AutomationTool.Automation.ProcessAsync(ParsedCommandLine AutomationToolCommandLine, StartupTraceListener StartupListener, HashSet`1 ScriptModuleAssemblies) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 149 +:: (see C:\Users\filipe\AppData\Roaming\Unreal Engine\AutomationTool\Logs\E+unreal+UE_5.2\Log.txt for full exception trace) +:: ERROR: Exception performing nothrow action "Kill All Processes": System.InvalidOperationException: No process is associated with this object. +:: at System.Diagnostics.Process.EnsureState(State state) +:: at System.Diagnostics.Process.get_HasExited() +:: at AutomationTool.ProcessResult.get_HasExited() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\ProcessUtils.cs:line 419 +:: at AutomationTool.ProcessManager.KillAll() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\ProcessUtils.cs:line 122 +:: at AutomationTool.Automation.<>c.b__3_1() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 212 +:: at AutomationTool.Automation.NoThrow(Action Action, String ActionDesc) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 227 set ueLocation=%~1 set projectLocation=%~2 set projectName=%~3 -set UnrealEditorCmd=%~4 -set LightQuality=%~5 -set MapToRebuild=%~6 +set testSuiteToRun=%~4 +set testReportFolder=%~5 +set testLogName=%~6 +set UnrealEditorCmd=%~7 +set LightQuality=%~8 +set MapToRebuild=%~9 :: "%ueLocation%\Engine\Binaries\Win64\%UnrealEditorCmd%" "%projectLocation%\%projectName%" -run=resavepackages -buildlighting -allowcommandletrendering -quality=%LightQuality%