Integrate 0.9.8 NDS read-only lab, repair upstream hook and simplify setup guidance

This commit is contained in:
2026-11-30 21:13:35 +00:00
parent b9fe2e61d2
commit c3aa4688d8
57 changed files with 2894 additions and 36 deletions

View File

@@ -93,3 +93,16 @@ foreach(t nwserv nwconn ncpserv nwclient nwbind nwrouted dbmtool ftrustee nwqcon
endif()
endforeach()
CMAKE
# Opt-in while native NDS compatibility is not certified. Discovery and read operations require separate runtime flags.
if [[ ${MARS_ENABLE_NDS_LAB:-0} == 1 ]]; then
python3 "$here/upstream-adapter/add-nds.py" "$root"
cp "$here/nds/server.c" "$root/src/mars_nds_server.c"
cp "$here/nds/server.h" "$root/src/mars_nds_server.h"
cp "$here/nds/fragger.c" "$here/nds/fragger.h" "$here/nds/nds_directory.c" "$here/nds/nds_directory.h" "$root/src/"
sed -i 's/#include "server.h"/#include "mars_nds_server.h"/' "$root/src/mars_nds_server.c"
cat >> "$root/src/CMakeLists.txt" <<'CMAKE'
target_sources(nwconn PRIVATE mars_nds_server.c fragger.c nds_directory.c)
target_link_libraries(nwconn PkgConfig::MARS_JSON PkgConfig::MARS_SQLITE)
CMAKE
fi