diff --git a/EnginePatches/EnginePatch-5.5.4 b/EnginePatches/EnginePatch-5.5.4 new file mode 100644 index 00000000..cc99f821 --- /dev/null +++ b/EnginePatches/EnginePatch-5.5.4 @@ -0,0 +1,165 @@ +--- Engine/Plugins/Developer/VisualStudioCodeSourceCodeAccess/Source/VisualStudioCodeSourceCodeAccess/Private/VisualStudioCodeSourceCodeAccessor.cpp.orig 2026-04-12 22:58:34.075320964 -0400 ++++ Engine/Plugins/Developer/VisualStudioCodeSourceCodeAccess/Source/VisualStudioCodeSourceCodeAccess/Private/VisualStudioCodeSourceCodeAccessor.cpp 2026-04-12 23:03:40.139226303 -0400 +@@ -149,7 +149,7 @@ + FString SolutionDir = GetSolutionPath(); + TArray Args; + Args.Add(MakePath(SolutionDir)); +- Args.Add(TEXT("-g ") + MakePath(FullPath) + FString::Printf(TEXT(":%d:%d"), LineNumber, ColumnNumber)); ++ Args.Add(TEXT("-g ") + MakePath(FullPath + FString::Printf(TEXT(":%d:%d"), LineNumber, ColumnNumber))); + return Launch(Args); + } + +--- Engine/Source/Editor/UnrealEd/Private/SourceCodeNavigation.cpp.orig 2026-04-12 22:58:34.169323705 -0400 ++++ Engine/Source/Editor/UnrealEd/Private/SourceCodeNavigation.cpp 2026-04-12 23:04:02.208867909 -0400 +@@ -463,7 +463,7 @@ + ISourceCodeAccessModule& SourceCodeAccessModule = FModuleManager::LoadModuleChecked("SourceCodeAccess"); + ISourceCodeAccessor& SourceCodeAccessor = SourceCodeAccessModule.GetAccessor(); + +-#if PLATFORM_WINDOWS ++#if PLATFORM_WINDOWS || PLATFORM_LINUX + FString SourceFileName; + uint32 SourceLineNumber = 1; + uint32 SourceColumnNumber = 0; +@@ -622,8 +622,8 @@ + } + + UE_LOG(LogSelectionDetails, Warning, TEXT("NavigateToFunctionSource: Unable to look up symbol: %s in module:%s"), *FunctionSymbolName, *FunctionModuleName); +- +-#endif // PLATFORM_WINDOWS ++ ++#endif // PLATFORM_WINDOWS || PLATFORM_LINUX + } + + +--- Engine/Source/Runtime/ApplicationCore/Private/Linux/LinuxPlatformApplicationMisc.cpp.orig 2026-04-12 22:58:34.254326184 -0400 ++++ Engine/Source/Runtime/ApplicationCore/Private/Linux/LinuxPlatformApplicationMisc.cpp 2025-11-10 23:34:18.481701126 -0500 +@@ -299,6 +299,9 @@ + SDL_SetHint(SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE, "1"); // When relative mouse mode is active, don't hide cursor. + SDL_SetHint(SDL_HINT_MOUSE_RELATIVE_MODE_WARP, "0"); // Don't warp the cursor to the center in relative mouse mode. + ++ // Unreal does its own dynamic capturing, we don't need SDL to do it. ++ SDL_SetHint(SDL_HINT_MOUSE_AUTO_CAPTURE, "0"); ++ + // If we're rendering offscreen, use the "dummy" SDL video driver + if (FParse::Param(FCommandLine::Get(), TEXT("RenderOffScreen")) && !getenv("SDL_VIDEODRIVER")) + { +--- Engine/Source/Runtime/ApplicationCore/Private/Linux/LinuxWindow.cpp.orig 2026-04-12 22:58:34.538334467 -0400 ++++ Engine/Source/Runtime/ApplicationCore/Private/Linux/LinuxWindow.cpp 2026-04-12 22:48:15.848291098 -0400 +@@ -235,7 +235,26 @@ + + // The SDL window doesn't need to be reshaped. + // the size of the window you input is the sizeof the client. ++ ++ // Under XWayland, non-override-redirect popup windows don't receive input ++ // events from the compositor. SDL already sets override_redirect for ++ // tooltips and popup menus, but other borderless child windows (like ++ // notification popups and dialogs) also need it. We temporarily enable ++ // the SDL hint to force override_redirect for these windows. ++ bool bForceOverrideRedirect = !Definition->HasOSWindowBorder ++ && InParent.IsValid() ++ && !(WindowStyle & (SDL_WINDOW_TOOLTIP | SDL_WINDOW_POPUP_MENU)); ++ if (bForceOverrideRedirect) ++ { ++ SDL_SetHint(SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT, "1"); ++ } ++ + HWnd = SDL_CreateWindow( TCHAR_TO_ANSI( *Definition->Title ), X, Y, ClientWidth, ClientHeight, WindowStyle ); ++ ++ if (bForceOverrideRedirect) ++ { ++ SDL_SetHint(SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT, "0"); ++ } + // produce a helpful message for common driver errors + if (HWnd == nullptr) + { +--- Engine/Source/Runtime/Core/Private/Unix/UnixPlatformStackWalk.cpp.orig 2026-04-12 22:58:34.349328955 -0400 ++++ Engine/Source/Runtime/Core/Private/Unix/UnixPlatformStackWalk.cpp 2026-04-12 23:05:56.395187515 -0400 +@@ -15,6 +15,7 @@ + #include "HAL/ExceptionHandling.h" + #include "HAL/PlatformProcess.h" + #include "HAL/PlatformTime.h" ++#include "Modules/ModuleManager.h" + #include "AutoRTFM/AutoRTFM.h" + + #include +@@ -1060,3 +1061,69 @@ + } + ReportLock.Unlock(); + } ++ ++bool FUnixPlatformStackWalk::GetFunctionDefinitionLocation(const FString& FunctionSymbolName, const FString& FunctionModuleName, FString& OutPathname, uint32& OutLineNumber, uint32& OutColumnNumber) ++{ ++ // Find the .so path for this module. ++ FString ModulePath; ++ TArray AllModules; ++ FModuleManager::Get().QueryModules(AllModules); ++ for (const FModuleStatus& Status : AllModules) ++ { ++ if (FPaths::GetBaseFilename(Status.FilePath) == FunctionModuleName) ++ { ++ ModulePath = Status.FilePath; ++ break; ++ } ++ } ++ if (ModulePath.IsEmpty()) ++ { ++ return false; ++ } ++ ++ // Debug symbols are in a separate .debug file alongside the .so. ++ FString DebugPath = FPaths::ChangeExtension(ModulePath, TEXT("debug")); ++ if (!FPaths::FileExists(DebugPath)) ++ { ++ return false; ++ } ++ ++ // Use lldb to look up the source file and line number. ++ // Run: lldb -b -o "image lookup -v -n ClassName::FuncName" ++ FString LldbParams = FString::Printf(TEXT("-b -o \"image lookup -v -n %s\" \"%s\""), *FunctionSymbolName, *DebugPath); ++ int32 ReturnCode = 0; ++ FString AllOutput; ++ FString Errors; ++ FPlatformProcess::ExecProcess(TEXT("/usr/bin/lldb"), *LldbParams, &ReturnCode, &AllOutput, &Errors); ++ if (ReturnCode != 0) ++ { ++ return false; ++ } ++ ++ // Parse the LineEntry from lldb verbose output. ++ // Format: "LineEntry: [0x...-0x...): /path/to/file.cpp:132" ++ TArray Lines; ++ AllOutput.ParseIntoArrayLines(Lines); ++ for (const FString& Line : Lines) ++ { ++ FString Trimmed = Line.TrimStartAndEnd(); ++ if (!Trimmed.StartsWith(TEXT("LineEntry:"))) ++ continue; ++ ++ int32 ParenIndex = Trimmed.Find(TEXT("): ")); ++ if (ParenIndex == INDEX_NONE) ++ continue; ++ FString FileAndLine = Trimmed.Mid(ParenIndex + 3); ++ ++ int32 ColonIndex; ++ if (!FileAndLine.FindLastChar(TCHAR(':'), ColonIndex)) ++ continue; ++ ++ OutPathname = FileAndLine.Left(ColonIndex); ++ OutLineNumber = FCString::Atoi(*FileAndLine.Mid(ColonIndex + 1)); ++ OutColumnNumber = 0; ++ return true; ++ } ++ ++ return false; ++} +--- Engine/Source/Runtime/Core/Public/Unix/UnixPlatformStackWalk.h.orig 2026-04-12 22:58:34.451331930 -0400 ++++ Engine/Source/Runtime/Core/Public/Unix/UnixPlatformStackWalk.h 2026-04-12 23:06:10.273590986 -0400 +@@ -24,6 +24,8 @@ + static CORE_API void ThreadStackWalkAndDump(ANSICHAR* HumanReadableString, SIZE_T HumanReadableStringSize, int32 IgnoreCount, uint32 ThreadId); + static CORE_API int32 GetProcessModuleCount(); + static CORE_API int32 GetProcessModuleSignatures(FStackWalkModuleInfo *ModuleSignatures, const int32 ModuleSignaturesSize); ++ ++ static CORE_API bool GetFunctionDefinitionLocation(const FString& FunctionSymbolName, const FString& FunctionModuleName, FString& OutPathname, uint32& OutLineNumber, uint32& OutColumnNumber); + }; + + typedef FUnixPlatformStackWalk FPlatformStackWalk; diff --git a/EnginePatches/EnginePatch b/EnginePatches/EnginePatch-5.7.4 similarity index 100% rename from EnginePatches/EnginePatch rename to EnginePatches/EnginePatch-5.7.4 diff --git a/UnrealEngine-5.5.4-release.zip b/UnrealEngine-5.5.4-release.zip new file mode 100644 index 00000000..f32033b9 --- /dev/null +++ b/UnrealEngine-5.5.4-release.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f2327f5104d4dad26dac639804d4603194b7ae6f57b5df5c348a65d0c3b64c1 +size 655101165 diff --git a/UnrealEngine-5.7.4-release.zip b/UnrealEngine-5.7.4-release.zip deleted file mode 100644 index 46d47ab7..00000000 --- a/UnrealEngine-5.7.4-release.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c2db07679703ae809ab887d02eb4da8d617b191b316a508892e30262e3ccf082 -size 709315911 diff --git a/build.py b/build.py index 2fc6b99f..5f267be6 100755 --- a/build.py +++ b/build.py @@ -221,7 +221,10 @@ def unzip_unreal_engine_and_apply_patch(): print(f"Unzipping {zipfn}...") with JZipFile(zipfn) as zf: zf.extractall(INTEGRATION) - patchfile = f"{INTEGRATION}/EnginePatches/EnginePatch" + version = zips[0].stem.split("-")[1] + patchfile = f"{INTEGRATION}/EnginePatches/EnginePatch-{version}" + if not Path(patchfile).is_file(): + sys.exit(f"Cannot find engine patch: {patchfile}") shell(extracted, f"patch -p0 < {patchfile}") Path(extracted).rename(UNREALENGINE) Path(touchfile).touch()