2V1-b/c: PythonNetworkStream phases, AccountConnector and the net module

Port PythonNetworkStream with its HandShake/Login/Select/Loading/Offline
phases, AccountConnector and PythonNetworkStreamModule verbatim; the net
stub goes. PythonBoot creates the network stream, account connector,
player, flying manager and effect manager like CPythonApplication, and
app.Create/Process drive CNetworkDevice and both connectors.

Packet.h long fields become 32-bit LONG; port.packet checks 38
login/select/loading packet sizes against wire_classic.h. Unported units
in the link closure live under platform/pending/ as stand-ins. The macOS
gate now builds all and finds iconv.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-23 15:02:14 +09:00
co-authored by Claude Opus 5.5
parent cd3b8b506f
commit 4d9b800efb
44 changed files with 8292 additions and 324 deletions
+9 -1
View File
@@ -31,7 +31,9 @@ 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), <Python-2.7/*> (ScriptLib).
target_link_libraries(port_logic PUBLIC mt3p::minilzo mt3p::cryptopp)
# common/Win32Crt.cpp converts non-UTF-8 code pages with iconv (MT_ICONV_LIBRARY, extension/CMakeLists.txt).
# common/Win32Crt.cpp converts non-UTF-8 code pages with iconv. macOS ships it as a separate library;
# extension/CMakeLists.txt finds it for mtnet, but the port-only build (script/port_gate.sh) never reads that file.
find_library(MT_ICONV_LIBRARY NAMES iconv)
if(MT_ICONV_LIBRARY)
target_link_libraries(port_logic PUBLIC ${MT_ICONV_LIBRARY})
endif()
@@ -174,6 +176,12 @@ if(BUILD_TESTING AND CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME)
add_test(NAME port.text COMMAND $<TARGET_FILE:port_text_test>)
set_tests_properties(port.text PROPERTIES SKIP_RETURN_CODE 77)
# 批次 2V1: Packet.h struct sizes against the classic wire layouts.
add_executable(port_packet_test ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/port_packet_test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../../tests/port_packet_test_wire.cpp)
target_link_libraries(port_packet_test PRIVATE port_logic)
add_test(NAME port.packet COMMAND $<TARGET_FILE:port_packet_test>)
add_executable(port_net_test ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/port_net_test.cpp)
target_link_libraries(port_net_test PRIVATE port_platform)
add_test(NAME port.net COMMAND $<TARGET_FILE:port_net_test>)