Skip to content

Commit 9687c68

Browse files
committed
5.3.0 compat: build Editor target for first-run setup
1 parent 5ccc0e0 commit 9687c68

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/ue4docker/dockerfiles/ue4-minimal/linux/Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ LABEL com.adamrehn.ue4-docker.excluded.templates={% if excluded_components.templ
9797
# Perform first-run setup for Mono, UnrealBuildTool and AutomationTool, which makes it possible to build Unreal projects and plugins as users other than `ue4`
9898
# (Note that this will only work with 4.26.0 and newer, older Engine versions will always require write access to `/home/ue4/UnrealEngine`)
9999
# See the comments on this issue for details, including the need to ensure $HOME is set correctly: <https://github.com/adamrehn/ue4-docker/issues/141>
100-
RUN ./Engine/Build/BatchFiles/Linux/Build.sh ShaderCompileWorker Linux Development -SkipBuild && \
100+
COPY print-editor-target.py /tmp/print-editor-target.py
101+
RUN EDITOR_TARGET=$(python3 /tmp/print-editor-target.py /home/ue4/UnrealEngine) && \
102+
./Engine/Build/BatchFiles/Linux/Build.sh "$EDITOR_TARGET" Linux Development -SkipBuild && \
101103
mkdir -p ./Engine/Programs/AutomationTool/Saved && \
102104
chmod a+rw ./Engine/Programs/AutomationTool/Saved
103105

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env python3
2+
from pathlib import Path
3+
import json, sys
4+
5+
# Parse the Unreal Engine version information
6+
engineRoot = Path(sys.argv[1])
7+
versionFile = engineRoot / "Engine" / "Build" / "Build.version"
8+
versionDetails = json.loads(versionFile.read_text("utf-8"))
9+
10+
# Determine the name of the Editor target based on the version
11+
target = "UE4Editor" if versionDetails["MajorVersion"] == 4 else "UnrealEditor"
12+
print(target)

0 commit comments

Comments
 (0)