diff --git a/.gitignore b/.gitignore index 7ede8d74..80685bf3 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ headers ACP_Ray2/ build/ +build_msvc/ # game_re/ windows_libs/ tooling/build/ diff --git a/game_re/CMakeLists.txt b/game_re/CMakeLists.txt index 712ba1cf..204829db 100644 --- a/game_re/CMakeLists.txt +++ b/game_re/CMakeLists.txt @@ -65,8 +65,8 @@ function(setup_target TARGET DBG_MODE) # Potentially might want 1/1 translation for code # For now it has the following values: - # 0 = 100% original (as possible) - # 1 = Runtime QOL (no cd checks, windowed mode, etc.) + # 0 = 100% original (as possible) + # 1 = Runtime QOL (no cd checks, windowed mode, etc.) target_compile_definitions(${TARGET} PRIVATE RE_AUTHENTIC=1 ) @@ -86,6 +86,20 @@ function(setup_target TARGET DBG_MODE) DbgHelp ) + find_program(gh_tool + NAMES gh_tool gh_tool.exe + HINTS ${CMAKE_CURRENT_LIST_DIR}/../tooling/bin + REQUIRED + ) + execute_process( + COMMAND ${gh_tool} -d${CMAKE_CURRENT_SOURCE_DIR}/gh.db + hooks -o ${CMAKE_CURRENT_BINARY_DIR}/hooks.def + ) + + target_sources(${TARGET} PRIVATE + ${CMAKE_CURRENT_BINARY_DIR}/hooks.def + ) + else() target_sources(${TARGET} PRIVATE r3/binders/static_mem.cxx diff --git a/tooling/setup b/tooling/setup index 9d7360d8..aee47b99 100644 --- a/tooling/setup +++ b/tooling/setup @@ -19,9 +19,9 @@ mkdir -p bin # Copy binary to bin folder # Use .exe extension on Windows, no extension on Unix-like systems if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then - cp build/tmp/r3_gh_tool.exe bin/ + cp build/tmp/gh_tool.exe bin/ else - cp build/tmp/r3_gh_tool bin/ + cp build/tmp/gh_tool bin/ fi popd