Monthly Archives: March 2015

Compiling Unreal Tournament 4 from GitHub source

I am just writing down the steps I take to compile Unreal Tournament 4 from the GitHub source and mention any problems I encounter.

If you plan to use these steps as a guide on how to compile UT4 for yourself, I recommend reading through the steps first! I made some mistakes, so make sure you don’t make the same mistakes ūüôā

Prerequisites

  1. TortoiseGit https://code.google.com/p/tortoisegit/
  2. Visual Studio 2013
  3. A GitHub account associated with an Unreal Engine 4 account

Downloading the source

Use TortoiseGit to download all UT and UE4 sourcecode from https://github.com/EpicGames/UnrealTournament.git

Use right mouse button on a folder and choose “Git Clone…”.

 

TortoiseGit

Log in with your GitHub username and password and it will start downloading.

TortoiseGit2

Download additional necessary binary content

Run [UnrealTournament\Setup.bat] to download necessary additional binary content.

SetupBat

 

SetupBat2

Compiling the Unreal Tournament project

  1. Open up [UnrealTournament\Engine\Source\Programs\UnrealSwarm\UnrealSwarm.sln] with Visual Studio 2013.
  2. Select “Development” as the Solution Configuration.
  3. Compile the whole solution, why not.UnrealSwarm
  4. Then you can close the solution.
  5. Run [UnrealTournament\GenerateProjectFiles.bat] to generate UE4.slnGenerateProjectFiles
  6. Open [UnrealTournament\UE4.sln] with Visual Studio 2013.
  7. Set the Solution Configuration to “Development Editor”.DevEditor
  8. Build “ShaderCompileWorker” and “UnrealLightmass”.ProjectsToCompile
  9. When that’s done, compile the “UnrealTournament” project. This can take quite a while.
  10. After it is done compiling, rightclick the “UnrealTournament” project and select Debug > Start new instance.
  11. The UE4 editor will start.
  12. Press “Launch” to start Unreal Tournament. The first time this can take a long time.LaunchBtn
    1. This took like forever, only to be greeted by this error:Error
      LogPlayLevel: Running AutomationTool...
      LogPlayLevel: RunUAT.bat ERROR: Visual studio and/or AutomationTool.csproj was not found, nor was Engine\Binaries\DotNET\AutomationTool.exe. Can't run the automation tool.
    2. Apparently we also needed to compile this “AutomationTool”!
    3. Close the editor, and compile the “AutomationTool” project under “Programs”.
    4. Once again, start the editor and press “Launch”.
    5. Hurrah! More errors:Error2
      LogPlayLevel: Program.Main: ERROR: AutomationTool terminated with exception:
      LogPlayLevel: Program.Main: ERROR: Exception in AutomationTool: AutomationScripts.Automation.dll was not found or could not be loaded, can't run scripts.
      LogPlayLevel: Stacktrace: at AutomationTool.ScriptCompiler.LoadPreCompiledScriptAssemblies(List`1 OutScriptAssemblies) in d:\my_projects\UnrealTournament\Engine\Source\Programs\AutomationTool\ScriptCompiler.cs:line 256
      LogPlayLevel: at AutomationTool.ScriptCompiler.FindAndCompileAllScripts(List`1 AdditionalScriptsFolders) in d:\my_projects\UnrealTournament\Engine\Source\Programs\AutomationTool\ScriptCompiler.cs:line 87
      LogPlayLevel: at AutomationTool.Automation.Process(String[] CommandLine) in d:\my_projects\UnrealTournament\Engine\Source\Programs\AutomationTool\Automation.cs:line 324
      LogPlayLevel: at AutomationTool.Program.MainProc(Object Param) in d:\my_projects\UnrealTournament\Engine\Source\Programs\AutomationTool\Program.cs:line 168
      LogPlayLevel: at AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param) in d:\my_projects\UnrealTournament\Engine\Source\Programs\AutomationTool\Utils.cs:line 705
      LogPlayLevel: at AutomationTool.Program.Main() in d:\my_projects\UnrealTournament\Engine\Source\Programs\AutomationTool\Program.cs:line 115
      LogPlayLevel: Program.Main: ERROR: AutomationScripts.Automation.dll was not found or could not be loaded, can't run scripts.
    6. Perhaps we also need to compile the “AutomationScripts.Automation” project.
    7. Close the editor, and compile ALL PROJECTS under Programs/Automation, just to be sure.
      Automation
    8. Again, start the editor and press “Launch”.
    9. Now it starts compiling UnrealTournament from within the editor. Once more¬†this will take a while…
    10. After a loooong time, I get this error! ūüôĀError3
    11. I have no idea how to fix this error!
    12. I asked on the forums what the deal is: https://forums.unrealtournament.com/showthread.php?16535-UnrealTournament-exe-incompatible-with-64-bit-windows-(16-Bit-Application)
    13. Apparently you cannot start the game from within the editor (yet).
  13. To start the compiled UT4 game, in the UnrealTournament project, set Command Arguments under Debugging to “unrealtournament -game” and¬†start debugging it!¬†Again,¬†rightclick the “UnrealTournament” project and select Debug > Start new instance.
  14. Hurrahh

References

  1. https://github.com/epicgames/unrealtournament
  2. https://wiki.unrealengine.com/Getting_Started_With_Unreal_Tournament#Building_the_Editor_and_Game
  3. https://code.google.com/p/tortoisegit/
  4. https://forums.unrealtournament.com/showthread.php?16535-UnrealTournament-exe-incompatible-with-64-bit-windows-(16-Bit-Application