Skip to content

Commit a73c3df

Browse files
authored
Fix warnings in UE 5.7 caused by deprecated API usage (#1152)
* Add UE 5.7 to docker image build scripts * Add UE 5.7 Android docker file * Add UE 5.7 to Android docker image build script * Fix comments * Remove redundant step for Windows docker image build * Revert "Remove redundant step for Windows docker image build" This reverts commit 7034040. * Try stop docker service on Windows before setup * Disable client/server config for Linux * Try newer ue4-docker for WIndows * Add 5.7 for Linux and Android to CI Test Change windows credential mode GIt credentials setup Revert to using ue4-docker setup util Test Test Test with ltsc2022 Fix Windows prerequisites Test Test Update buildgraph-args to include UseUBA option Update ue-docker-windows.yml Revert "Update buildgraph-args to include UseUBA option" This reverts commit ada15fc. Revert "Update ue-docker-windows.yml" This reverts commit 62f0e44. Revert "Test" This reverts commit cc11e1a. Revert "Test" This reverts commit bb78b1e. Test Reapply "Test" This reverts commit 090a576. # Conflicts: # .github/workflows/ue-docker-windows.yml Reapply "Test" This reverts commit 935cbdd. Update Docker base tag from ltsc2022 to ltsc2025 * Fix deprecated API usage for UE 5.7 * Update changelog * Add UE 5.7 to supported engine versions list * Revert Windows docker image build steps * Clean up * Fix paths permissions * Fix * Fix
1 parent dc1954e commit a73c3df

File tree

10 files changed

+62
-4
lines changed

10 files changed

+62
-4
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ jobs:
144144
matrix:
145145
# Note: these versions must match scripts/packaging/engine-versions.txt
146146
# Note: Currently 5.0 is not supported due to ue4-docker issue https://github.com/adamrehn/ue4-docker/issues/373
147-
unreal: ['4.27', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6']
147+
unreal: ['4.27', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '5.7']
148148
uses: ./.github/workflows/test-linux.yml
149149
with:
150150
unreal-version: ${{ matrix.unreal }}
@@ -169,7 +169,7 @@ jobs:
169169
strategy:
170170
fail-fast: false
171171
matrix:
172-
unreal: ['4.27', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6']
172+
unreal: ['4.27', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '5.7']
173173
uses: ./.github/workflows/test-android.yml
174174
with:
175175
unreal-version: ${{ matrix.unreal }}
@@ -181,7 +181,7 @@ jobs:
181181
strategy:
182182
fail-fast: false
183183
matrix:
184-
unreal: ['4.27', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6']
184+
unreal: ['4.27', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '5.7']
185185
uses: ./.github/workflows/integration-test-linux.yml
186186
with:
187187
unreal-version: ${{ matrix.unreal }}

.github/workflows/test-android.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ jobs:
9393
mkdir -p /home/ue4/UnrealEngine/Epic/UnrealEngine && chown -R $uid /home/ue4/UnrealEngine/Epic ;
9494
mkdir -p /home/ue4/UnrealEngine/Engine/Source/Epic/UnrealEngine && chown -R $uid /home/ue4/UnrealEngine/Engine/Source/Epic ;
9595
mkdir -p /home/ue4/UnrealEngine/Engine/Intermediate/Build/BuildCookRun && chown -R $uid /home/ue4/UnrealEngine/Engine/Intermediate/Build/BuildCookRun ;
96+
mkdir -p /home/ue4/UnrealEngine/Engine/Intermediate/Build/Android/a/UnrealGame/Development/BuildSettings/Gen && chown -R $uid /home/ue4/UnrealEngine/Engine/Intermediate/Build/Android/a/UnrealGame/Development/BuildSettings/Gen ;
9697
mkdir -p /home/ue4/.config/Epic/UnrealEngine && chown -R $uid /home/ue4/.config ;
9798
mkdir -p /home/ue4/UnrealEngine/UnrealTrace && chown -R $uid /home/ue4/UnrealEngine/UnrealTrace ;
9899
mkdir -p /home/ue4/.gradle && chown -R $uid /home/ue4/.gradle ;

.github/workflows/test-linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ jobs:
8383
run: |
8484
uid=$(id -u) # the GH action user ID
8585
docker exec --user root unreal bash -c "
86+
chown -R $uid /home/ue4/.config/Epic/UnrealEngine/XmlConfigCache-+home+ue4+UnrealEngine.bin ;
8687
chown -R $uid /home/ue4/UnrealEngine/Engine/Binaries/ThirdParty/Mono/Linux ;
8788
chown -R $uid /home/ue4/UnrealEngine/Engine/\"$ENGINE_PATH\" ;
8889
chown -R $uid /home/ue4/UnrealEngine/Engine/Binaries/ThirdParty/USD/UsdResources/Linux ;

.github/workflows/ue-docker-android.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
- 5.4
1616
- 5.5
1717
- 5.6
18+
- 5.7
1819
ue_repo:
1920
description: Set Unreal Engine repository
2021
required: true

.github/workflows/ue-docker-linux.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
- 5.4
1616
- 5.5
1717
- 5.6
18+
- 5.7
1819
ue_repo:
1920
description: Set Unreal Engine repository
2021
required: true
@@ -97,7 +98,8 @@ jobs:
9798
--target minimal \
9899
--exclude debug \
99100
--exclude templates \
100-
--exclude ddc
101+
--exclude ddc \
102+
--opt buildgraph_args="-set:WithClient=false -set:WithServer=false"
101103
102104
- name: Log in to GitHub package registry
103105
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a

.github/workflows/ue-docker-windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ on:
1616
- 5.4
1717
- 5.5
1818
- 5.6
19+
- 5.7
1920
ue_repo:
2021
description: Set Unreal Engine repository
2122
required: true

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Fixes
6+
7+
- No more warnings in UE 5.7 caused by deprecated API usage ([#1152](https://github.com/getsentry/sentry-unreal/pull/1152))
8+
59
### Dependencies
610

711
- Bump Native SDK from v0.12.0 to v0.12.1 ([#1136](https://github.com/getsentry/sentry-unreal/pull/1136))
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
ARG NAMESPACE
2+
ARG PREREQS_TAG
3+
FROM ${NAMESPACE}/ue4-base-build-prerequisites:${PREREQS_TAG}
4+
5+
# Switch to root to install additional packages
6+
USER root
7+
8+
# Install Java 21 (required for UE 5.7 Android builds)
9+
RUN apt-get update && apt-get install -y --no-install-recommends \
10+
openjdk-21-jdk \
11+
wget \
12+
unzip && \
13+
rm -rf /var/lib/apt/lists/*
14+
15+
# Set up environment variables for Android SDK/NDK
16+
# Unreal Engine checks multiple environment variable names, so we set all of them
17+
ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
18+
ENV ANDROID_HOME=/home/ue4/android-sdk
19+
ENV ANDROID_SDK_ROOT=/home/ue4/android-sdk
20+
ENV ANDROID_NDK=/home/ue4/android-sdk/ndk/27.2.12479018
21+
ENV ANDROID_NDK_ROOT=/home/ue4/android-sdk/ndk/27.2.12479018
22+
ENV NDKROOT=/home/ue4/android-sdk/ndk/27.2.12479018
23+
ENV NDK_ROOT=/home/ue4/android-sdk/ndk/27.2.12479018
24+
ENV PATH=${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools
25+
26+
# Switch to ue4 user for SDK installation (to ensure correct permissions)
27+
USER ue4
28+
29+
# Download and install Android command-line tools
30+
RUN mkdir -p ${ANDROID_HOME}/cmdline-tools && \
31+
cd ${ANDROID_HOME}/cmdline-tools && \
32+
wget -q https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip && \
33+
unzip -q commandlinetools-linux-9477386_latest.zip && \
34+
rm commandlinetools-linux-9477386_latest.zip && \
35+
mv cmdline-tools latest
36+
37+
# Accept licenses and install Android SDK components
38+
# UE 5.7 requires: API Level 34, Build Tools 35.0.1, NDK r27c (27.2.12479018)
39+
RUN yes | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --licenses && \
40+
${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager \
41+
"platform-tools" \
42+
"platforms;android-34" \
43+
"build-tools;35.0.1" \
44+
"ndk;27.2.12479018"

plugin-dev/Source/Sentry/Private/SentrySubsystem.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "Misc/AssertionMacros.h"
2727
#include "Misc/CoreDelegates.h"
2828
#include "Misc/EngineVersion.h"
29+
#include "Misc/EngineVersionComparison.h"
2930
#include "SentryAttachment.h"
3031

3132
#include "Interface/SentrySubsystemInterface.h"
@@ -994,7 +995,9 @@ void USentrySubsystem::ConfigureOutputDevice()
994995
if (OutputDevice)
995996
{
996997
GLog->AddOutputDevice(OutputDevice.Get());
998+
#if UE_VERSION_OLDER_THAN(5, 7, 0)
997999
GLog->SerializeBacklog(OutputDevice.Get());
1000+
#endif
9981001
}
9991002
}
10001003

scripts/packaging/engine-versions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
5.7
12
5.6
23
5.5
34
5.4

0 commit comments

Comments
 (0)