diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 69 |
1 files changed, 32 insertions, 37 deletions
@@ -75,61 +75,56 @@ line. ## Building on Linux -The following instructions have been collated using Ubuntu 20.04. +The following instructions have been collated using Ubuntu 24.04. Other distributions will +likely need a slightly different set of packages installed. -Zen makes use of C++20 features which at the time of writing has limited -toolchain and C++ library support. A minimum compiler version of GCC-11 or -Clang-12 is required, along with GNU's libstdc+++-11 or newer. - -The first step is to acquire a suitable compiler and C++ library. On Ubuntu 20.04 -GCC-11 is not available in the standard package repositories so Ubuntu's tool- -chain test respository needs to be added to Apt (note that this is _not required_ -for Ubuntu 21.04 onwards); - -``` -sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test +```bash +sudo apt install -y build-essential pkg-config unzip ``` -Now GCC-11 can be installed via Apt. This will also install a suitable version of -the C++ library. +Install [xmake](https://xmake.io/#/getting_started). -``` -sudo apt install -y --no-install-recommends g++-11 -g++-11 --version +It's important to use the correct version when installing, pay attention to the last argument in the command line below: + +```bash +curl -fsSL https://xmake.io/shget.text | bash -s v2.9.9 ``` -The easiest way to tell `xmake` to use the correct compiler version is to set -the `CXX` environment variable. +Clone the Zen project. -``` -export CXX=g++-11 +```bash +git clone https://github.com/EpicGames/zen.git ~/zen/main +cd ~/zen/main ``` -Install [xmake](https://xmake.io/#/getting_started). +We recommend building using the UE Linux toolchain, to match the Unreal Editor +setup as closely as possible. It is also the most thoroughly tested toolchain +since this is what is used in the CI environment which produces the binaries +which end up in the UE tree. -``` -curl -fsSL https://xmake.io/shget.text | bash -xmake --version -``` +Using other toolchains may or may not work depending on which version and +compiler you happen to be using. -Clone the Zen project and tell `xmake` to use the correct GCC version. +### Building with the UE Linux toolchain -``` -git clone https://github.com/EpicGames/zen.git ~/zen/main -cd ~/zen/main +To build with the Unreal Engine cross-compile toolchain (producing binaries +compatible with the VFX Reference Platform), first download the toolchain: + +```bash +scripts/ue_build_linux/get_ue_toolchain.sh ``` -Now we are ready to build Zen. The `-y` skips `xmake` from prompting about -building packages. +This downloads to `~/.ue-toolchain` by default. xmake automatically detects the +toolchain at this location, so no extra flags are needed: -``` -xmake config -y --mode=debug +```bash +xmake config -y -m debug xmake build ``` -Note that the command above to set the build variant to debug is optional. Tests -are only built in debug.The `xmake` flags `-vD` can be useful to diagnose -`xmake` issues. +The toolchain can also be selected explicitly with `--toolchain=ue-clang`, and +the SDK location can be overridden with `--sdk=<path>` or the +`UE_TOOLCHAIN_DIR` environment variable. ## Building on Mac |