X157 Dev Notes

One simulant attempts to share insight with others.

Linux UE5 Dev Notes

Setting up a build machine

Install prerequisite packages

# You need some Ubuntu packages installed before you do anything else
sudo apt-get -y update

sudo apt-get -y install \
  autoconf \
  binutils \
  bison \
  build-essential \
  bzip2 \
  cmake \
  flex \
  gettext \
  gcc \
  git \
  help2man \
  libncurses-dev \
  libtool libtool-bin libtool-doc \
  lsb-core \
  texinfo \
  zip

# These packages seem to be needed for UnrealVersionSelector at least
sudo apt-get -y install xdg-user-dirs xdg-utils

Install PowerShell for UnrealXistTools

If you’re using UnrealXistTools, you need to install PowerShell.

Check this official Microsoft Documentation regarding how else to install Powershell on Ubuntu 22.04.

TLDR you need to run 8-10 commands, you can mostly cut/paste from that page.

Get Engine Source

Either git clone the Engine source, or install p4 and sync your Engine stream.

Run ./Setup.sh

If you cloned git, then run ./Setup.sh from the repo clone just as you would on any other OS.

This is fairly easy and after it completes you can skip to Generate Project Files below.

If your Engine source is derived from UDN P4 rather than Github, then instead of ./Setup.sh (which doesn’t exist), the process is slightly more complex. Keep reading.

./Setup.sh for P4-based Engine source

# cd into Linux-specific Build BatchFiles
pushd Engine/Build/BatchFiles/Linux

# Run Linux-specific SetupToolchain.sh
./SetupToolchain.sh

# Build third party libs if needed
./BuildThirdParty.sh

popd

Generate Project Files

However you go about running your ./Setup.sh, afterward you need to Generate Project Files.

# Generate project files (AFTER Setup completed successfully)
./GenerateProjectFiles.sh

Building the Project

In this example we’re building the LyraEditor target in the Development configuration:

# Change these based on what you want to build
Target="LyraEditor"  # prefix of the "*.Target.cs" to build
Platform="Linux"  # always Linux on Linux
Configuration="Development"  # or "DebugGame" or "Shipping" etc

# cd to your Engine's root dir
./RunUBT.sh $Target $Platform $Configuration

Given this is Linux, you probably want to build LyraServerEOS, right? :)

Building UnrealVersionSelector

To rebuild UnrealVersionSelector for Linux, run this command:

# Rebuild UnrealVersionSelector
./Engine/Build/BatchFiles/Linux/Build.sh UnrealVersionSelector Linux Shipping

This generates Engine/Binaries/Linux/UnrealVersionSelector-Linux-Shipping

Register your Custom Engine

After building UnrealVersionSelector, run:

# Register this custom UE version on the current host
./Engine/Binaries/Linux/UnrealVersionSelector-Linux-Shipping -register -unattended

After running that, you can look in the Linux custom engine registry to find your engine listed:

cat $HOME/.config/Epic/UnrealEngine/Install.ini

The output looks something like this:

[Installations]
148492FA-37EF-4C22-AA40-9C709BBEB08F=/opt/UE_5.5

If you need to coordinate custom engine names with your team, you can add a custom name for your engine, like:

[Installations]
148492FA-37EF-4C22-AA40-9C709BBEB08F=/opt/UE_5.5
MyCustomEngine=/opt/UE_5.5

This will allow you to use EngineAssociation = "MyCustomEngine" in your .uproject file, assuming everyone on your team does this.

See UEngine.ps1 in UnrealXistTools for a fully cross-platform PowerShell script to make custom engine management easier.

See Also