From 68451e1f97f0095c5af2bca40055e66708a490e8 Mon Sep 17 00:00:00 2001 From: Daniel Seiller Date: Wed, 4 Dec 2019 00:44:56 +0100 Subject: [PATCH 1/2] Update CMakeLists.txt to search for python executable --- ScrapHacks/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ScrapHacks/CMakeLists.txt b/ScrapHacks/CMakeLists.txt index 1daa6c7..481a17f 100644 --- a/ScrapHacks/CMakeLists.txt +++ b/ScrapHacks/CMakeLists.txt @@ -35,8 +35,10 @@ ExternalProject_Get_Property(DirectX SOURCE_DIR) include_directories(AFTER ${SOURCE_DIR}/8.0/include/) link_directories(AFTER ${SOURCE_DIR}/8.0/lib/) +find_package (Python3 REQUIRED COMPONENTS Interpreter) + add_custom_target( - MAKE_D3D8_VMT python ${CMAKE_CURRENT_SOURCE_DIR}/src/make_D3D8_VMT.py ${CMAKE_CURRENT_SOURCE_DIR}/src/D3D8_VMT.hpp ${SOURCE_DIR}/8.0/include/d3d8.h + MAKE_D3D8_VMT ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/src/make_D3D8_VMT.py ${CMAKE_CURRENT_SOURCE_DIR}/src/D3D8_VMT.hpp ${SOURCE_DIR}/8.0/include/d3d8.h DEPENDS DirectX ) From f006214af68ca015794e4ba1b81ce18d85a0c315 Mon Sep 17 00:00:00 2001 From: Daniel Seiller Date: Wed, 4 Dec 2019 00:45:15 +0100 Subject: [PATCH 2/2] small formatting change in D3D8_VMT generator --- ScrapHacks/src/make_D3D8_VMT.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ScrapHacks/src/make_D3D8_VMT.py b/ScrapHacks/src/make_D3D8_VMT.py index bb320a0..0fe87c4 100644 --- a/ScrapHacks/src/make_D3D8_VMT.py +++ b/ScrapHacks/src/make_D3D8_VMT.py @@ -27,5 +27,5 @@ with open(outfile,"w") as ofh: for name in sorted(VMTs.keys()): print(f"namespace {name} {{",file=ofh) for method,idx in sorted(VMTs[name].items(),key=lambda v:v[1]): - print(f"\tconst size_t m_{method} = {idx};",file=ofh) + print(f" const size_t m_{method} = {idx};",file=ofh) print("}",file=ofh) \ No newline at end of file