Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
b91b43d
fix .gitmodules common_cmake url.
Ry0511 Oct 1, 2024
626daef
Add .idea to the .gitignore
Ry0511 Oct 1, 2024
fda92b9
dirty bl1 AbstractHook impl
Ry0511 Oct 1, 2024
940f9a6
rename include guard to match bl2
Ry0511 Oct 1, 2024
3f7a403
Updating CMake & CMakePresets for BL1 standalone.
Ry0511 Oct 1, 2024
921e2cc
Additional guard for BL1
Ry0511 Oct 1, 2024
719f44d
Offsets for UField, UProperty, UStruct, and UClass; Potentially inval…
Ry0511 Oct 1, 2024
b3316eb
Reformat, Comments, and removal of unused function variable names.
Ry0511 Oct 1, 2024
6aa1d7d
Revert "fix .gitmodules common_cmake url."
Ry0511 Oct 2, 2024
28d3850
Merge branch 'bl-sdk:master' into master
Ry0511 Oct 2, 2024
24c9bdf
Drop unnecessary commit revert.
apple1417 Oct 2, 2024
844ba7f
Merge remote-tracking branch 'origin/master'
Ry0511 Oct 2, 2024
ba14b2a
manually reapply submodule url fix.
Ry0511 Oct 2, 2024
2bb5d29
Fix compilation errors on standard cmake configurations.
Ry0511 Oct 2, 2024
d1f881f
add BL1Hook to selector.cpp
Ry0511 Oct 2, 2024
0e56eeb
Realign UClass::Interfaces
Ry0511 Oct 3, 2024
261b3b3
Remove old temporary hooks and go back to using `OutputTextLine` unsu…
Ry0511 Oct 3, 2024
811f6d0
Merge branch 'bl-sdk:master' into master
Ry0511 Oct 7, 2024
e45fb34
Merge branch 'bl-sdk:master' into bl1sdk
Ry0511 Oct 7, 2024
47b62d8
Reformat, add SavePackage hook, and re-implement the hex-edits since …
Ry0511 Oct 7, 2024
29a6ccb
Cleaning up and reformatting the hex-edits.
Ry0511 Oct 7, 2024
cbb1338
Apply consistent style to hex signatures excluding (GMalloc & SavePac…
Ry0511 Oct 7, 2024
a16a2f0
GMalloc signature should now be unique to GMalloc
Ry0511 Oct 7, 2024
a675b27
Exposing 'UFunction::Func' for bl1 since its useful for getting addre…
Ry0511 Oct 12, 2024
628b96f
Refactoring and pulling everything out of bl1.cpp and into their appr…
Ry0511 Oct 12, 2024
68e4b17
Merge branch 'bl-sdk:master' into master
Ry0511 Oct 13, 2024
9fa029c
Merge branch 'bl-sdk:master' into bl1sdk
Ry0511 Oct 13, 2024
5d0ea5a
Merge remote-tracking branch 'origin/bl1sdk' into bl1sdk
Ry0511 Oct 13, 2024
03ca959
Remove comments relating to bl2's implementation and provide override…
Ry0511 Oct 13, 2024
cf07fca
Potential fix/hack for stopping the game from reloading manually modi…
Ry0511 Oct 14, 2024
d0df9b4
Shorten environment key names and add a key for hooking save package.
Ry0511 Oct 15, 2024
bcfb6db
Added a hook to log an error message generator.
Ry0511 Oct 16, 2024
af14609
Merge branch 'bl-sdk:master' into master
Ry0511 Oct 20, 2024
272bc55
Merge branch 'bl-sdk:master' into bl1sdk
Ry0511 Oct 20, 2024
acb8d63
Added a hook into an initialisation function which can be used to del…
Ry0511 Oct 22, 2024
bf7c409
Remove unneeded QoL hook function.
Ry0511 Oct 24, 2024
0c921cf
Added an option to enable locking in the uconsole_output_text function.
Ry0511 Oct 24, 2024
972708f
Disable logging in resolve_error_detour temporarily.
Ry0511 Oct 24, 2024
68d9698
Add Steam signature for the init function as it differs slightly.
Ry0511 Oct 25, 2024
dbebacc
Init function hooking will now try multiple times before eventually a…
Ry0511 Oct 26, 2024
da32165
Added extra logging information for when a detour fails.
Ry0511 Oct 31, 2024
de54b99
Hooking the init function should be a bit more consistent now.
Ry0511 Oct 31, 2024
65b8e0e
Use a recursive mutex for locking console writes.
Ry0511 Oct 31, 2024
9e4d2d1
Merge branch 'bl-sdk:master' into master
Ry0511 Nov 24, 2024
74ce0ad
Merge branch 'bl-sdk:master' into bl1sdk
Ry0511 Nov 24, 2024
f981faf
Update to new toml configuration system.
Ry0511 Nov 24, 2024
c5fa188
Merge branch 'bl-sdk:master' into master
Ry0511 Nov 25, 2024
6fb81f5
Merge branch 'bl-sdk:master' into bl1sdk
Ry0511 Nov 25, 2024
844d0fb
Merge branch 'bl-sdk:master' into master
Ry0511 Dec 22, 2024
51eea8d
Merge branch 'bl-sdk:master' into bl1sdk
Ry0511 Dec 22, 2024
0276b9a
Merge branch 'bl-sdk:master' into master
Ry0511 Jan 17, 2025
7803d86
Merge branch 'master' into bl1sdk
Ry0511 Jan 19, 2025
806f70f
Add comments to uclass.h and ustruct.h indicating when a merge confli…
Ry0511 Jan 19, 2025
0966bea
Merge branch 'bl-sdk:master' into bl1sdk
Ry0511 Jan 19, 2025
33b8431
Add a note comment and replace cstyle cast with a much more annoying …
Ry0511 Feb 8, 2025
394a9c8
raise a runtime exception if the pointer from `find_gmalloc` is null
Ry0511 Feb 8, 2025
c59064a
Fix: CallFunction was not synchronised which caused crashes when hook…
Ry0511 Feb 8, 2025
11ec11d
upgrade to c++23, remove libfmt
apple1417 Feb 16, 2025
18ecfc3
change construct_objects flags to always be u64
apple1417 Feb 16, 2025
1f84e5d
prototype dynamic field offsets
apple1417 Feb 16, 2025
12e5e47
switch all members to function calls
apple1417 Feb 16, 2025
e05bf30
ci cleanup
apple1417 Feb 16, 2025
f4554ac
Merge branch 'master' into v2
apple1417 Feb 25, 2025
1528ee2
try containerize linux builds
apple1417 Feb 25, 2025
6d856a1
add dynamic offsets for bl3
apple1417 Feb 25, 2025
a7ed7a7
support ufield
apple1417 Mar 1, 2025
86628e4
support ustruct
apple1417 Mar 1, 2025
ddbc026
support uproperty
apple1417 Mar 1, 2025
ca29e8d
few misc fixups
apple1417 Mar 1, 2025
b5686b7
Merge remote-tracking branch 'ry/bl1sdk' into v2
apple1417 Mar 4, 2025
1defc14
formatting pass
apple1417 Mar 4, 2025
5350419
compile bl1 into ue3 builds
apple1417 Mar 4, 2025
f24a88c
Merge remote-tracking branch 'origin/v2' into v2
apple1417 Mar 4, 2025
2b8cd5c
linting fixups
apple1417 Mar 4, 2025
23f81e0
update cruft
apple1417 Mar 4, 2025
1c32c89
rearrange game specific offsets, add bl1 ones
apple1417 Mar 6, 2025
c344f55
convert all ustruct subclasses to new system
apple1417 Mar 6, 2025
25c4254
convert remaining non-properties
apple1417 Mar 6, 2025
3adca08
linting cleanup
apple1417 Mar 6, 2025
c2a918d
Merge branch 'master' into v2b
apple1417 May 11, 2025
0e0e04c
Merge branch 'ry/bl1sdk' into v2b
apple1417 May 11, 2025
0975e15
revert uenum changes
apple1417 May 11, 2025
e560aa1
add helper comments to field macro
apple1417 May 11, 2025
cf74e9c
merge unreal version and architechure defines into single build "flav…
apple1417 May 12, 2025
d63aab3
linting fixups
apple1417 May 12, 2025
18f69eb
remove postbuild script
apple1417 May 12, 2025
45b1fae
make basic copyable properties generic
apple1417 May 12, 2025
67a7ca1
move naming lint suppressing into macro
apple1417 May 12, 2025
5745e31
support the object-like properties
apple1417 May 13, 2025
38a5191
support remaining properties
apple1417 May 14, 2025
f84fb14
remove all traces of the old object layout switching system
apple1417 May 14, 2025
9c079c8
crash fixes
apple1417 May 14, 2025
4b36dab
linting fixes
apple1417 May 14, 2025
d10e4e1
expose get exe range
apple1417 May 14, 2025
485bc15
fix `UInterfaceProperty` inheriting incrorrectly, add debuging type c…
apple1417 May 17, 2025
ed05821
replace deducing this with macro-generated overloads, lower to c++20
apple1417 May 17, 2025
057eb52
update cmake toolchains
apple1417 May 17, 2025
bc3a5a9
linting fixes
apple1417 May 17, 2025
be879cf
clean up hook signatures, rework a few
apple1417 May 21, 2025
2eb7b17
change how enum names are handled
apple1417 May 22, 2025
a611960
don't match next line console commands on automated inputs
apple1417 May 24, 2025
e5bad41
update changelog
apple1417 May 24, 2025
e3a8847
compeltely rework hook data structures
apple1417 May 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "[email protected]:bl-sdk/common_dotfiles.git",
"commit": "cee5c9dbf5b95f57bb636e5138171aa6a4964cf1",
"commit": "597ec422d3b5692927f325b9b5c2ae42288e8cc5",
"checkout": null,
"context": {
"cookiecutter": {
Expand All @@ -16,7 +16,7 @@
"include_cpp": true,
"include_py": false,
"_template": "[email protected]:bl-sdk/common_dotfiles.git",
"_commit": "cee5c9dbf5b95f57bb636e5138171aa6a4964cf1"
"_commit": "597ec422d3b5692927f325b9b5c2ae42288e8cc5"
}
},
"directory": null
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
fail-fast: false
matrix:
preset: [
"clang-ue3-x86-release",
"clang-ue4-x64-release",
"msvc-ue3-x86-release",
"msvc-ue4-x64-release",
"clang-willow-release",
"clang-oak-release",
"msvc-willow-release",
"msvc-oak-release",
]

steps:
Expand All @@ -29,7 +29,7 @@ jobs:
if: startswith(matrix.preset, 'msvc')
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: ${{ fromJSON('["x86", "x64"]')[contains(matrix.preset, 'x64')] }}
arch: ${{ fromJSON('["x86", "x64"]')[contains(matrix.preset, 'oak')] }}

- name: Setup CMake and Ninja
uses: lukka/get-cmake@latest
Expand All @@ -52,17 +52,17 @@ jobs:
fail-fast: false
matrix:
toolchain:
- preset: clang-cross-ue3-x86-release
- preset: clang-cross-willow-release
container: clang-cross
- preset: clang-cross-ue4-x64-release
- preset: clang-cross-oak-release
container: clang-cross
- preset: llvm-mingw-ue3-x86-release
- preset: llvm-mingw-willow-release
container: llvm-mingw
- preset: llvm-mingw-ue4-x64-release
- preset: llvm-mingw-oak-release
container: llvm-mingw
- preset: mingw-ue3-x86-release
- preset: mingw-willow-release
container: mingw
- preset: mingw-ue4-x64-release
- preset: mingw-oak-release
container: mingw

steps:
Expand Down Expand Up @@ -93,7 +93,6 @@ jobs:
cmake . --preset ${{ matrix.toolchain.preset }} -G Ninja
cmake --build out/build/${{ matrix.toolchain.preset }}


# ==============================================================================

clang-tidy:
Expand All @@ -103,8 +102,8 @@ jobs:
fail-fast: false
matrix:
preset: [
"clang-ue3-x86-release",
"clang-ue4-x64-release",
"clang-willow-release",
"clang-oak-release",
]

steps:
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
.gdbinit
out

# User scripts with templates
postbuild
postbuild.bat

# CMake (from https://github.com/github/gitignore/blob/main/CMake.gitignore)
CMakeLists.txt.user
CMakeCache.txt
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "libs/minhook"]
path = libs/minhook
url = https://github.com/TsudaKageyu/minhook.git
[submodule "libs/fmt"]
path = libs/fmt
url = https://github.com/fmtlib/fmt.git
[submodule "libs/tomlplusplus"]
path = libs/tomlplusplus
url = https://github.com/marzer/tomlplusplus.git
Expand Down
61 changes: 8 additions & 53 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
cmake_minimum_required(VERSION 3.25)

project(unrealsdk VERSION 1.8.0)
project(unrealsdk VERSION 2.0.0)

set(UNREALSDK_FLAVOUR "" CACHE STRING "Which \"flavour\" of the SDK to build.")
set_property(CACHE UNREALSDK_FLAVOUR PROPERTY STRINGS "WILLOW" "OAK")
if (NOT UNREALSDK_FLAVOUR MATCHES "(WILLOW|OAK)")
message(FATAL_ERROR "Got invalid sdk flavour '${UNREALSDK_FLAVOUR}'")
endif()

set(UNREALSDK_UE_VERSION "UE4" CACHE STRING "The unreal engine version to build the SDK for. One of 'UE3' or 'UE4'.")
set(UNREALSDK_ARCH "x64" CACHE STRING "The architecture to build the sdk for. One of 'x86' or 'x64'.")
set(UNREALSDK_SHARED False CACHE BOOL "If set, compiles as a shared library instead of as an object.")

add_library(_unrealsdk_interface INTERFACE)
Expand Down Expand Up @@ -32,17 +36,6 @@ if(MINGW)
target_compile_options(_unrealsdk_interface INTERFACE -Werror)
endif()

set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
try_compile(supports_format
SOURCE_FROM_CONTENT test.cpp " \
#include <version>\n \
#ifndef __cpp_lib_format\n \
#error\n \
#endif \
"
CXX_STANDARD 20
)

set(CONFIGURE_FILES_DIR "${CMAKE_CURRENT_BINARY_DIR}/configure")

configure_file(
Expand All @@ -56,29 +49,12 @@ include(common_cmake/git_watcher.cmake)

add_subdirectory(libs/minhook)
add_subdirectory(libs/tomlplusplus)
if(NOT supports_format)
add_subdirectory(libs/fmt)
endif()

# If using the clang windows cross compilation toolchain
if((NOT CMAKE_HOST_WIN32)
AND (CMAKE_SYSTEM_NAME STREQUAL "Windows")
AND (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
# Disable some intrinsics - MSVC implicitly defines intrinsics, but Clang does not, so we get
# a linking error otherwise
target_compile_definitions(minhook PRIVATE MINHOOK_DISABLE_INTRINSICS)
target_compile_definitions(_unrealsdk_interface INTERFACE TOML_ENABLE_SIMD=0)
endif()

target_include_directories(_unrealsdk_interface INTERFACE "src" ${CONFIGURE_FILES_DIR})
target_link_libraries(_unrealsdk_interface INTERFACE minhook tomlplusplus::tomlplusplus)
if(NOT ${supports_format})
target_link_libraries(_unrealsdk_interface INTERFACE fmt)
endif()

target_compile_definitions(_unrealsdk_interface INTERFACE
"${UNREALSDK_UE_VERSION}"
"ARCH_$<UPPER_CASE:${UNREALSDK_ARCH}>"
"UNREALSDK_FLAVOUR=UNREALSDK_FLAVOUR_${UNREALSDK_FLAVOUR}"
"$<$<BOOL:${UNREALSDK_SHARED}>:UNREALSDK_SHARED>"
)

Expand Down Expand Up @@ -123,25 +99,4 @@ else()
# Unconditionally add the exporting flag
# Add it privately, so it doesn't appear in anything linking against this
target_compile_definitions(unrealsdk PRIVATE "UNREALSDK_EXPORTING")

# Postbuild
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(POSTBUILD_SCRIPT "postbuild")
if(CMAKE_HOST_WIN32)
set(POSTBUILD_SCRIPT "${POSTBUILD_SCRIPT}.bat")
endif()
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${POSTBUILD_SCRIPT}")
add_custom_command(
TARGET unrealsdk
POST_BUILD
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/${POSTBUILD_SCRIPT}"
ARGS
"$<SHELL_PATH:$<TARGET_FILE:unrealsdk>>"
"${UNREALSDK_UE_VERSION}"
"${UNREALSDK_ARCH}"
"$<IF:$<CONFIG:DEBUG>,DEBUG,RELEASE>"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif()
endif()
endif()
Loading
Loading