Skip to content

Instantly share code, notes, and snippets.

@delebash
Forked from iwer/UnrealGDAL_UE5.md
Created December 27, 2023 23:36
Show Gist options
  • Save delebash/8e8279268aed872679873c2e111bbcf6 to your computer and use it in GitHub Desktop.
Save delebash/8e8279268aed872679873c2e111bbcf6 to your computer and use it in GitHub Desktop.
A writeup of how to to get UnrealGDAL based projects up-and-running with Unreal Engine 5

UnrealGDAL based plugin setup

UnrealGDAL utilizes a python based cli tool to build thirdparty libraries with the Unreal toolchain and to include the build artifacts into the Unreal project build process. It is built around the conan C++ package manager.

There are several gotchas on the way to migrating the stack like: UE dependencies changing requiring conan recipe changes, conan upgrading to 2.0, ubuntu phasing out old autotools and so on...

As I understand, the original author of UnrealGDAL and the build-tools is quite busy, so I cloned relevant repositories and try to maintain something that is functioning for me.

However, maybe this can also be usefull to someone else, so here you go:

UE 5.1

Prepare UE

Install from Epic Launcher and clone UE source to separate directory. In the clone:

./Setup.bat
./GenerateProjectFiles.bat

Build 3rd party libs

Get Build tools

1.57 <= conan <= 1.59 (ue4cli is not yet ready for conan2)

pip3 install --upgrade conan==1.59

ue4cli>=0.0.54 ,conan-ue4cli>=0.0.38

pip3 install ue4cli conan-ue4cli

ue4-conan-recipes (with ue5 compatibility)

git clone [email protected]:iwer/ue4-conan-recipes.git
Windows
git switch -c ue5 origin/ue5

Copy directories to ~/AppData/Roaming/conan-ue4cli/recipes

Linux
git switch -c gdal3 origin/gdal3

Build libs

Windows
ue4 setroot <path/to/ue5/source>
ue4 conan generate
ue4 setroot <path/to/ue5/installation>
ue4 conan update
ue4 conan build gdal-ue4==2.4.0 mergetiff-ue4
Linux
ue4 setroot <path/to/ue5/source>
ue4 conan generate
ue4 setroot <path/to/ue5/installation>
ue4 conan update

I could not build gdal 2.4.0 on Ubuntu anymore due to autoconf >= 2.71. So I created conan recipes for gdal 3.5.1. Get conan recipes from https://github.com/iwer/ue4-conan-recipes and copy the recipes to ~/.config/conan-ue4cli/recipes. Then build:

ue4 conan build gdal-ue4==3.5.1 mergetiff-ue4

Get Plugins

Optional: Populate built thirdparty libs (e.g. to store them in VCS)

cd <UnrealProjectDirectory>
ue4 conan precompute host -d .\Plugins\UnrealGDAL\Source\GDAL\
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment