port 2A step 4: platform skeleton + rest of the 2V3 header closure
- Mirror the remaining non-Python 2V3 closure headers (98 more, 173 total): EffectLib, EterGrnLib, SpeedTreeLib, SphereLib, PRTerrainLib, EterImageLib, EterBase/Poly, cipher/tea, EterLib Grp*/IME/Input/MSWindow/StateManager, GameLib actor/map/race headers, EterPack. - SDK shims: granny.h, SpeedTreeRT.h, imm.h, Dimm.h (the SDK MIDL header, not mirrored), dinput/d3dx8 additions; D3D8 render-state enums, FVF macros and the COM resource hierarchy; more Win32 GDI/handle types with layout static_asserts. - PORT edits for MSVC-permissive code (typename, friend visibility, <algorithm>, pointer→uintptr_t) and PRTerrainLib/StdAfx.h dropping the ScriptLib/Python include. - port_logic links the vendored cryptopp/minilzo. - extension/src/platform: port_platform target with 103 generated stub files (1917 function stubs, 146 static members) from the new platform_stub.py (clang -ast-dump-filter); MT_PLATFORM_STUB() marks every unimplemented body. libmtgodot links port_platform and port_gate.sh builds it. Gate: macOS, Android, iOS, Windows (mingw) PASS; Linux BLOCKED (no toolchain). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,9 +18,10 @@ set(MT_PORT_SHIMS ${CMAKE_CURRENT_SOURCE_DIR}/common/shim/sdk)
|
||||
if(NOT WIN32)
|
||||
list(APPEND MT_PORT_SHIMS ${CMAKE_CURRENT_SOURCE_DIR}/common/shim/win32)
|
||||
endif()
|
||||
# EterBase/lzo.h includes <lzo/lzo1x.h>; third_party/minilzo provides that path.
|
||||
list(APPEND MT_PORT_SHIMS ${CMAKE_CURRENT_SOURCE_DIR}/../../third_party/minilzo)
|
||||
target_include_directories(port_logic PUBLIC ${MT_PORT_SHIMS})
|
||||
# Libraries 40250 links that are vendored as-is: <lzo/lzo1x.h> (EterBase/lzo.h), <cryptopp/*>
|
||||
# (EterBase/cipher.h).
|
||||
target_link_libraries(port_logic PUBLIC mt3p::minilzo mt3p::cryptopp)
|
||||
# 40250 sources carry MSVC `#pragma warning(...)` lines verbatim, and non-literal printf formats
|
||||
# (EterImageLib/StdAfx.h) that the Android toolchain turns into errors.
|
||||
set(MT_PORT_WARNING_FLAGS)
|
||||
@@ -83,10 +84,13 @@ foreach(hdr IN LISTS MT_PORT_HEADERS)
|
||||
endforeach()
|
||||
add_library(port_header_gate OBJECT ${MT_PORT_GATE_SOURCES})
|
||||
target_include_directories(port_header_gate PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${MT_PORT_SHIMS})
|
||||
target_link_libraries(port_header_gate PRIVATE mt3p::minilzo mt3p::cryptopp)
|
||||
target_compile_features(port_header_gate PRIVATE cxx_std_20)
|
||||
target_compile_options(port_header_gate PRIVATE ${MT_PORT_WARNING_FLAGS})
|
||||
add_dependencies(port_logic port_header_gate)
|
||||
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../platform ${CMAKE_CURRENT_BINARY_DIR}/../platform)
|
||||
|
||||
if(BUILD_TESTING AND CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME)
|
||||
add_executable(port_common_test ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/port_common_test.cpp)
|
||||
target_link_libraries(port_common_test PRIVATE port_logic)
|
||||
|
||||
Reference in New Issue
Block a user