Skip to content

Commit

Permalink
embrace vscode
Browse files Browse the repository at this point in the history
  • Loading branch information
DKingAlpha committed Jul 7, 2023
1 parent 2b87e21 commit 5219680
Show file tree
Hide file tree
Showing 39 changed files with 196 additions and 29 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,6 @@ MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/


build
53 changes: 53 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"env": {
"UE_ROOT_DIR": "G:\\UE\\UnrealEngine-4.21"
},
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}\\build\\_deps\\imgui_project-src",
"${workspaceFolder}\\build\\_deps\\imgui_project-src\\backends",
"${workspaceFolder}\\build\\_deps\\minhook_project-src\\include",
"${workspaceFolder}\\build\\_deps\\minhook_project-src\\src",
"${env:UE_ROOT_DIR}\\Engine\\Source\\Runtime\\Core\\Public",
"${env:UE_ROOT_DIR}\\Engine\\Source\\Runtime\\Core\\Public\\UObject",
"${env:UE_ROOT_DIR}\\Engine\\Source\\Runtime\\CoreUObject\\Public",
"${env:UE_ROOT_DIR}\\Engine\\Source\\Runtime\\TraceLog\\Public"
],
"defines": [
"UE_BUILD_MINIMAL=1",
"COREUOBJECT_VTABLE=",
"UBT_COMPILED_PLATFORM=Windows",
"UE_BUILD_SHIPPING=1",
"WITH_EDITOR=0",
"WITH_EDITORONLY_DATA=0",
"WITH_ENGINE=1",
"WITH_UNREAL_DEVELOPER_TOOLS=0",
"WITH_PLUGIN_SUPPORT=0",
"WITH_SERVER_CODE=0",
"IS_MONOLITHIC=1",
"IS_PROGRAM=1",
"PLATFORM_WINDOWS",
"PLATFORM_64BITS",
"CORE_API=",
"COREUOBJECT_API=",
"NOMINMAX",
"WIN32",
"_DEBUG",
"UEINTERCEPTOR_EXPORTS",
"_WINDOWS",
"_USRDLL",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.22621.0",
"compilerPath": "C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "windows-msvc-x64",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach Game",
"type": "cppvsdbg",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"files.associations": {
"vector": "cpp",
"utility": "cpp",
"xstring": "cpp",
"functional": "cpp"
}
}
28 changes: 28 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: cl.exe build active file",
"command": "cl.exe",
"args": [
"/Zi",
"/EHsc",
"/nologo",
"/Fe${fileDirname}\\${fileBasenameNoExtension}.exe",
"${file}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$msCompile"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
89 changes: 89 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# basic cmake file

cmake_minimum_required(VERSION 3.25)

project(UEInspector)

set(UE_ROOT_DIR "G:/UE/UnrealEngine-4.21" CACHE FILEPATH "Unreal Engine Root Directory")
set(DXSDK_DIR "D:/DirectXSDK" CACHE FILEPATH "DirectX SDK Directory")


set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

file(GLOB_RECURSE SOURCES "src/*.c" "src/*.cpp")
set(HEADERS_DIRECTORIES src src/dxhook src/gui src/mem src/res)

include(FetchContent)
FetchContent_Declare(
imgui_project
GIT_REPOSITORY https://github.com/ocornut/imgui
GIT_TAG v1.89.7
)
FetchContent_MakeAvailable(imgui_project)
file(GLOB IMGUI_SOURCES
${imgui_project_SOURCE_DIR}/*.cpp
${imgui_project_SOURCE_DIR}/backends/imgui_impl_dx11.cpp
${imgui_project_SOURCE_DIR}/backends/imgui_impl_win32.cpp
)
set(IMGUI_HEADER_DIRECTORIES ${imgui_project_SOURCE_DIR} ${imgui_project_SOURCE_DIR}/backends)
add_library(imgui STATIC ${IMGUI_SOURCES})
target_include_directories(imgui PRIVATE ${imgui_project_SOURCE_DIR})


FetchContent_Declare(
minhook_project
GIT_REPOSITORY https://github.com/TsudaKageyu/minhook
)
FetchContent_Populate(minhook_project)
file(GLOB MINHOOK_SOURCES ${minhook_project_SOURCE_DIR}/src/*.c)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(MINHOOK_SOURCES ${MINHOOK_SOURCES} "${minhook_project_SOURCE_DIR}/src/hde/hde64.c")
else()
set(MINHOOK_SOURCES ${MINHOOK_SOURCES} "${minhook_project_SOURCE_DIR}/src/hde/hde32.c")
endif()
set(MINHOOK_HEADER_DIRECTORIES ${minhook_project_SOURCE_DIR}/src ${minhook_project_SOURCE_DIR}/src/hde)
add_library(minhook STATIC ${MINHOOK_SOURCES})
target_include_directories(minhook PRIVATE ${MINHOOK_HEADER_DIRECTORIES})

# UE Insepctor
add_library(UEInspector SHARED ${SOURCES})

target_compile_definitions(UEInspector PRIVATE
UE_BUILD_MINIMAL=1
COREUOBJECT_VTABLE=
UBT_COMPILED_PLATFORM=Windows
UE_BUILD_SHIPPING=1
WITH_EDITOR=0
WITH_EDITORONLY_DATA=0
WITH_ENGINE=1
WITH_UNREAL_DEVELOPER_TOOLS=0
WITH_PLUGIN_SUPPORT=0
WITH_SERVER_CODE=0
IS_MONOLITHIC=1
IS_PROGRAM=1
PLATFORM_WINDOWS
PLATFORM_64BITS
CORE_API=
COREUOBJECT_API=
NOMINMAX
WIN32
NDEBUG
UEINSPECTOR_EXPORTS
_WINDOWS
_USRDLL
UNICODE
_UNICODE
)
set(UE_INCLUDE_DIR
${UE_ROOT_DIR}/Engine/Source/Runtime/Core/Public
${UE_ROOT_DIR}/Engine/Source/Runtime/Core/Public/UObject
${UE_ROOT_DIR}/Engine/Source/Runtime/CoreUObject/Public
${UE_ROOT_DIR}/Engine/Source/Runtime/TraceLog/Public
)

target_include_directories(UEInspector PRIVATE ${HEADERS_DIRECTORIES} ${IMGUI_HEADER_DIRECTORIES} ${minhook_project_SOURCE_DIR}/include ${UE_INCLUDE_DIR})
target_link_directories(UEInspector PRIVATE ${DXSDK_DIR}/Lib)
target_link_libraries(UEInspector PRIVATE minhook imgui
d3d11 d3dcompiler dxgi
)
23 changes: 0 additions & 23 deletions UEInspector/dxhook/GUI.cpp

This file was deleted.

3 changes: 0 additions & 3 deletions UEInspector/dxhook/GUI.h

This file was deleted.

1 change: 0 additions & 1 deletion imgui
Submodule imgui deleted from 05fe21
1 change: 0 additions & 1 deletion minhook
Submodule minhook deleted from 4a4555
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion UEInspector/gui/MainMenu.cpp → src/gui/MainMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,8 +663,8 @@ void DrawUStructInfo(UObjectBase* uobj, UStruct* st) {
ImGui::SetNextWindowSize({ 600, 300 }, ImGuiCond_FirstUseEver);
if (ImGui::Begin("Function Invoker", &s_function_caller_opening)) {
DrawCallUFunction(SearchContext::calling_function);
ImGui::End();
}
ImGui::End();
if (!s_function_caller_opening) {
SearchContext::calling_function = nullptr;
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5219680

Please sign in to comment.