Implement 40250 classic client port

This commit is contained in:
shenlei
2026-09-01 18:49:28 +09:00
parent 2277b1dd60
commit 8f61990a83
481 changed files with 169826 additions and 293 deletions
+25
View File
@@ -21,6 +21,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
option(MTGODOT_BUILD_EXTENSION "Build the Godot GDExtension (pulls in godot-cpp)" ON)
option(MTGODOT_BUILD_TOOLS "Build libgr2 validation tools (gr2dump/gr2fuzz/oracle_diff)" OFF)
option(MTGODOT_BUILD_NET_TOOLS "Build host-only protocol probes without Godot" OFF)
# --- shared, cross-platform core (no godot-cpp, no third-party) ---
add_subdirectory(libgr2)
@@ -46,3 +47,27 @@ if(MTGODOT_BUILD_EXTENSION)
endif()
add_subdirectory(extension)
endif()
# FreeBSD is the native build target of the archived 40250 server, but it is
# not a supported Godot extension target. Keep the live classic probe
# available as a small host-only build so a FreeBSD jail/VM can compile and run
# it without pulling in godot-cpp or the Darwin/iOS/Android extension.
if(MTGODOT_BUILD_NET_TOOLS AND NOT MTGODOT_BUILD_EXTENSION)
add_subdirectory(extension/third_party)
add_library(mtnet_host STATIC
extension/src/net/secure_cipher.cpp
extension/src/net/net_stream.cpp
extension/src/net/entity_store.cpp
extension/src/net/mark_image.cpp
extension/src/net/classic/classic_stream.cpp
extension/src/net/classic/classic_parser.cpp
extension/src/net/classic/classic_session.cpp
extension/src/net/classic/classic_cipher.cpp
)
target_include_directories(mtnet_host PUBLIC extension/src/net)
target_link_libraries(mtnet_host PUBLIC mt3p::sodium mt3p::minilzo mt3p::cryptopp)
target_compile_features(mtnet_host PUBLIC cxx_std_20)
add_executable(net_classic_e2e_host extension/tools/net_classic_e2e.cpp)
target_link_libraries(net_classic_e2e_host PRIVATE mtnet_host)
endif()