Skip to content

Commit b44909e

Browse files
authored
Merge pull request #958 from UE4SS-RE/xmakeupdates
Xmakeupdates
2 parents 4b58d1e + 5fa8df4 commit b44909e

11 files changed

Lines changed: 120 additions & 14 deletions

File tree

UE4SS/src/GUI/GUI.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ namespace RC::GUI
500500
float base_font_size = 14 * UE4SSProgram::settings_manager.Debug.DebugGUIFontScaling;
501501

502502
// Increase font atlas size (if needed for many characters)
503-
io.Fonts->TexDesiredWidth = 2048; // Increase the atlas size to allow more glyphs to fit
503+
io.Fonts->TexMinWidth = 2048; // Increase the atlas size to allow more glyphs to fit
504504

505505
// Load base font (Latin characters)
506506
ImFontConfig font_cfg;
@@ -527,9 +527,6 @@ namespace RC::GUI
527527
icons_cfg.GlyphMinAdvanceX = icon_font_size;
528528
io.Fonts->AddFontFromMemoryTTF(FaSolid900, sizeof(FaSolid900), icon_font_size, &icons_cfg, icons_ranges);
529529

530-
// Build font atlas
531-
io.Fonts->Build();
532-
533530
m_os_backend->init();
534531
m_gfx_backend->init();
535532

UE4SS/src/GUI/LiveView.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4043,7 +4043,7 @@ namespace RC::GUI
40434043
{
40444044
if (objects_to_draw[i] == m_currently_opened_tree_node)
40454045
{
4046-
clipper.ForceDisplayRangeByIndices(i, i + 1);
4046+
clipper.IncludeItemsByIndex(i, i + 1);
40474047
break;
40484048
}
40494049
}

UE4SS/xmake.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ if get_config("ue4ssCross") ~= "msvc-wine" then
22
includes("proxy_generator")
33
end
44

5-
add_requires("imgui v1.91.9b", { debug = is_mode_debug(), configs = { win32 = true, dx11 = true, opengl3 = true, glfw_opengl3 = true , runtimes = get_mode_runtimes()} } )
6-
add_requires("ImGuiTextEdit v1.1.0", { debug = is_mode_debug(), configs = {runtimes = get_mode_runtimes()} })
5+
add_requires("imgui v1.92.1", { debug = is_mode_debug(), configs = { win32 = true, dx11 = true, opengl3 = true, glfw_opengl3 = true , runtimes = get_mode_runtimes()} } )
6+
add_requires("ImGuiTextEdit v1.2.0", { debug = is_mode_debug(), configs = {runtimes = get_mode_runtimes()} })
77
add_requires("IconFontCppHeaders v1.0", { debug = is_mode_debug(), configs = {runtimes = get_mode_runtimes()}})
88
add_requires("glfw 3.3.9", { debug = is_mode_debug() , configs = {runtimes = get_mode_runtimes()}})
99
add_requires("opengl", { debug = is_mode_debug(), configs = {runtimes = get_mode_runtimes()} })
1010
add_requires("glaze v2.9.5", { debug = is_mode_debug(), configs = {runtimes = get_mode_runtimes()} })
11-
add_requires("fmt 10.2.1", { debug = is_mode_debug(), configs = {runtimes = get_mode_runtimes()} })
11+
add_requires("fmt 11.2.0", { debug = is_mode_debug(), configs = {runtimes = get_mode_runtimes()} })
1212

1313
option("ue4ssBetaIsStarted")
1414
set_default(true)

assets/Changelog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,12 @@ Added improved string and path conversion utilities with proper UTF-8 support ([
167167

168168
### General
169169

170-
Updated ImGui from v1.89 to v1.91.9b for improved functionality and Clang compatability
170+
Updated ImGui from v1.89 to v1.92.1 for improved functionality and Clang compatability
171171

172172
Updated ImGuiTextEdit to support newest ImGui API
173173

174+
Updated fmt library to 11.2.0
175+
174176
Changed the default location of the UE4SS release assets to be in `game executable directory/ue4ss/`. This change is backwards compatible with the old location. ([UE4SS #506](https://github.com/UE4SS-RE/RE-UE4SS/pull/506)) - Buckminsterfullerene
175177

176178
Updated PatternSleuth submodule ([UE4SS #638](https://github.com/UE4SS-RE/RE-UE4SS/pull/638))

deps/first/DynamicOutput/include/DynamicOutput/Output.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#if RC_IS_ANSI == 1
2222
#define RC_STD_MAKE_FORMAT_ARGS fmt::make_format_args
2323
#else
24-
#define RC_STD_MAKE_FORMAT_ARGS fmt::make_format_args<fmt::buffer_context<CharType>>
24+
#define RC_STD_MAKE_FORMAT_ARGS fmt::make_format_args<fmt::buffered_context<CharType>>
2525
#endif
2626

2727
namespace RC::Output
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
package("fmt")
2+
set_homepage("https://fmt.dev")
3+
set_description("fmt is an open-source formatting library providing a fast and safe alternative to C stdio and C++ iostreams.")
4+
set_license("MIT")
5+
6+
add_urls("https://github.com/fmtlib/fmt/archive/refs/tags/$(version).tar.gz",
7+
"https://github.com/fmtlib/fmt.git")
8+
add_versions("11.2.0", "40626af88bd7df9a5fb80be7b25ac85b122d6c21")
9+
10+
on_install(function (package)
11+
import("package.tools.cmake")
12+
13+
local configs = {}
14+
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
15+
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
16+
table.insert(configs, "-DFMT_DOC=OFF")
17+
table.insert(configs, "-DFMT_TEST=OFF")
18+
19+
-- Add /utf-8 flag for MSVC
20+
if package:is_plat("windows") then
21+
table.insert(configs, "-DCMAKE_CXX_FLAGS=/utf-8")
22+
end
23+
24+
cmake.install(package, configs)
25+
26+
-- Apply patches after installation to handle UE macro conflicts
27+
local ranges_h = path.join(package:installdir(), "include", "fmt", "ranges.h")
28+
if os.isfile(ranges_h) then
29+
local content = io.readfile(ranges_h)
30+
31+
-- Check if patch has already been applied
32+
if content:find("FMT_UE_HAD_CHECK") then
33+
print("UE macro conflict patches already applied to fmt/ranges.h")
34+
return
35+
end
36+
37+
io.writefile(ranges_h .. ".backup", io.readfile(ranges_h))
38+
39+
-- Find the include guard or pragma once
40+
local insert_pos = content:find("#define FMT_RANGES_H_")
41+
if not insert_pos then
42+
insert_pos = content:find("#pragma once")
43+
end
44+
45+
if insert_pos then
46+
-- Find the end of the line
47+
local line_end = content:find("\n", insert_pos)
48+
if line_end then
49+
-- Insert the macro guard after the include guard
50+
local guard_code = [[
51+
52+
// Macro conflict guards for 'check'
53+
#ifdef check
54+
#pragma push_macro("check")
55+
#undef check
56+
#define FMT_UE_HAD_CHECK
57+
#endif
58+
]]
59+
content = content:sub(1, line_end) .. guard_code .. content:sub(line_end + 1)
60+
61+
-- Find the last #endif by reversing the string and finding the first occurrence
62+
local reverse_content = content:reverse()
63+
local reverse_endif = reverse_content:find("fidne#")
64+
65+
if reverse_endif then
66+
-- Convert back to forward position
67+
local last_endif_pos = #content - reverse_endif - 5 -- -5 for length of "endif"
68+
69+
local restore_code = [[
70+
71+
// Restore 'check' macro
72+
#ifdef FMT_UE_HAD_CHECK
73+
#pragma pop_macro("check")
74+
#undef FMT_UE_HAD_CHECK
75+
#endif
76+
]]
77+
-- Insert before the last endif
78+
content = content:sub(1, last_endif_pos - 1) .. restore_code .. content:sub(last_endif_pos)
79+
end
80+
81+
io.writefile(ranges_h, content)
82+
print("Applied UE macro conflict patches to fmt/ranges.h")
83+
end
84+
end
85+
end
86+
end)
87+
88+
on_test(function (package)
89+
-- Set up proper compile flags for the test
90+
local configs = {languages = "c++20"}
91+
92+
-- Add /utf-8 flag for MSVC
93+
if package:is_plat("windows") then
94+
configs.cxflags = "/utf-8"
95+
end
96+
97+
assert(package:check_cxxsnippets({test = [[
98+
#include <fmt/format.h>
99+
#include <string>
100+
void test() {
101+
std::string s = fmt::format("{}", 42);
102+
}
103+
]]}, {configs = configs}))
104+
end)

deps/third-repo/packages/i/imguitextedit/xmake.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package("ImGuiTextEdit")
44

55
add_versions("v1.1.0", "master")
66

7-
add_deps("cmake", "imgui v1.91.9b")
7+
add_deps("cmake", "imgui v1.92.1")
88

99
add_includedirs("include", { public = true })
1010

deps/third-repo/packages/p/polyhook_2/xmake.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
package("polyhook_2")
2+
set_urls("https://github.com/stevemk14ebr/PolyHook_2_0.git")
3+
add_versions("v2.0.0", "fd2a88f09c8ae89440858fc52573656141013c7f")
24
set_sourcedir(os.scriptdir())
35

46
add_deps("cmake", "zydis", "zycore")

deps/third-repo/packages/z/zydis/xmake.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package("zydis")
22
add_urls("git@github.com:zyantific/zydis.git")
33
add_urls("https://github.com/zyantific/zydis.git")
44

5-
add_versions("v4.1.1", "a2278f1d254e492f6a6b39f6cb5d1f5d515659dc")
5+
add_versions("v4.1.0", "v4.1.1", "a2278f1d254e492f6a6b39f6cb5d1f5d515659dc")
66

77
add_deps("zycore", "cmake")
88

deps/xmake.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ add_repositories("third-party deps/third-repo", { rootdir = get_config("ue4ssRoo
88

99
add_requires("zycore v1.5.1", { debug = is_mode_debug(), configs = {runtimes = get_mode_runtimes()} })
1010
add_requires("zydis v4.1.1", { debug = is_mode_debug(), configs = {runtimes = get_mode_runtimes()} })
11-
add_requires("polyhook_2", { debug = is_mode_debug(), configs = {runtimes = get_mode_runtimes()} })
11+
add_requires("polyhook_2 v2.0.0", { debug = is_mode_debug(), configs = {runtimes = get_mode_runtimes()} })

0 commit comments

Comments
 (0)