From d465617c0163c94feebe5cb0c5078b97078c7fb4 Mon Sep 17 00:00:00 2001 From: narknon <73571427+narknon@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:49:58 -0500 Subject: [PATCH 1/2] Add build configuration for <= 4.21 FName 8 alignment --- tools/xmakescripts/rules/build_rules.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/xmakescripts/rules/build_rules.lua b/tools/xmakescripts/rules/build_rules.lua index 6583ed556..c13d6b1bd 100644 --- a/tools/xmakescripts/rules/build_rules.lua +++ b/tools/xmakescripts/rules/build_rules.lua @@ -15,6 +15,12 @@ local TARGET_TYPES = { "WITH_CASE_PRESERVING_NAME", table.unpack(gameDefines) } + }, + ["LessEqual421"] = { + ["defines"] = { + "FNAME_ALIGN8", + table.unpack(gameDefines) + } } } From 61fb2fb50c60813af9be1925f99c4ab410a0b4e1 Mon Sep 17 00:00:00 2001 From: narknon <73571427+narknon@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:59:49 -0500 Subject: [PATCH 2/2] Update changelog and readme --- README.md | 3 ++- assets/Changelog.md | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5be142a0f..cceda1996 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,8 @@ The build modes are structured as follows: `____` Currently supported options for these are: * `Target` - * `Game` - for regular games + * `Game` - for regular games on UE versions greater than UE 4.21 + * `LessEqual421` - for regular games on UE versions less than or equal to UE 4.21 * `CasePreserving` - for games built with case preserving enabled * `Config` diff --git a/assets/Changelog.md b/assets/Changelog.md index d9b9455cc..356e21cbf 100644 --- a/assets/Changelog.md +++ b/assets/Changelog.md @@ -12,6 +12,10 @@ Added support for UE Version 5.4 - ([UE4SS #503](https://github.com/UE4SS-RE/RE- Added basic support for Development/Debug/Test built Unreal Engine games ([UE4SS #607](https://github.com/UE4SS-RE/RE-UE4SS/pull/607)) - To use this functionality, set DebugBuild to true in UE4SS-Settings.ini +Added new build definition "LessEqual421". Using this definition for games on UE<=4.21 is not mandatory for UE4SS to function, but will ensure the correct alignment is used in containers. +**BREAKING:** - This also changes the default FName alignment from 8 to 4. +- To use this functionality, enter LessEqual421 in the section of the XMake configuration command. + ### General UE Platform support, which allows for much easier internal implementation of new Unreal classes ([UEPseudo #80](https://github.com/Re-UE4SS/UEPseudo/pull/80)) - narknon, localcc