There are a number of questions relating to how to build from the command line, for example Automated test results from command line - AnswerHub - Unreal Engine Forums, however, none of them appear to work on OSX.
Tok:Engine doug$ Build/BatchFiles/RunUAT.sh BuildCookRun -nop4 -project="/Users/doug/Documents/Unreal\ Projects/Hello/Hello.uproject" -stage -archive -archivedirectory="/tmp/hello" -package -targetplatform=Darwin Running AutomationTool... Setting up Mono Compiling AutomationTool with xbuild xbuild Source/Programs/AutomationTool/AutomationTool_Mono.csproj /p:Configuration=Development /p:Platform=AnyCPU /verbosity:quiet /nologo /p:TargetFrameworkProfile= /p:TargetFrameworkVersion=v4.5 The assembly mscorlib.dll was not found or could not be loaded. It should have been installed in the `/Users/doug/dev/unreal/UnrealEngine/Engine/Binaries/ThirdParty/Mono/Mac/lib/mono/2.0/mscorlib.dll' directory. RunUAT ERROR: AutomationTool failed to compile.
Is my version of mono wrong (how would the Microsoft mscorlib.dll even possibly exist on osx?)? If so, what version do I need?
How do you do this on a mac?
Some people (How can I execute UE4Editor on the command line as a different user than what is logged in? - Programming & Scripting - Unreal Engine Forums) seem to invoke the UE4Editor directly, but that was for an old version of UE.
Edit: After installing the binaries, it still doesn’t work, but with a different error:
InternalUtils.SafeFileExists: SafeFileExists /Users/doug/Documents/Unreal/ Projects/Hello/Hello.uproject=False InternalUtils.SafeFileExists: SafeFileExists /Users/doug/dev/unreal/UnrealEngine/Users/doug/Documents/Unreal/ Projects/Hello/Hello.uproject=False InternalUtils.SafeFileExists: SafeFileExists /Users/doug/dev/unreal/UnrealEngine/Engine/Programs/AutomationTool/Saved/Rules/UATRules_BaseEngine_.dll=False ProjectUtils.CompileAndLoadTargetsAssembly: Compiling targets DLL: /Users/doug/dev/unreal/UnrealEngine/Engine/Programs/AutomationTool/Saved/Rules/UATRules_BaseEngine_.dll BuildCommand.Execute: ERROR: BUILD FAILED Program.Main: ERROR: AutomationTool terminated with exception: Program.Main: ERROR: Exception in AutomationTool: All branches must have the blank project /Samples/Sandbox/BlankProject Stacktrace: at AutomationTool.BranchInfo..ctor (System.Collections.Generic.List`1 InHostPlatforms) [0x00000] in <filename unknown>:0 at BuildCookRun.get_ProjectPath () [0x00000] in <filename unknown>:0 at BuildCookRun.ExecuteBuild () [0x00000] in <filename unknown>:0 at BuildCommand.Execute () [0x00000] in <filename unknown>:0 Program.Main: ERROR: All branches must have the blank project /Samples/Sandbox/BlankProject ProcessManager.KillAll: Trying to kill 0 spawned processes. Program.Main: AutomationTool exiting with ExitCode=1 Domain_ProcessExit ProcessManager.KillAll: Trying to kill 0 spawned processes. RunUAT ERROR: AutomationTool was unable to run successfully.