port 2D step 5a: EterPack/EterPackManager + EterBase file units against the real 40250 packs

- Mirror copies: EterPack (EterPack, EterPackManager, EterPackCursor, CSHybridCrypt policy, Inline.h)
  and EterBase logic units tea/lzo/Timer/Stl/Random, with PORT-tagged width fixes (LONG index
  fields, static_assert(sizeof(TEterPackIndex) == 192), tea_word = Win32 unsigned long).
- TEA pack keys are extracted from the reference EterPack.cpp at configure time into
  build/.../EterPackKeys.generated.h; nothing key-bearing is tracked.
- Platform EterBase: FileBase (stdio, case-insensitive fallback), MappedFile (mmap /
  MapViewOfFile), CRC32, Debug, Utils StringPath/StringLowers.
- Win32Crt: CreateDirectory/DeleteFile/_access/MAKEFOURCC; Win32MinMax.h min/max (force-included
  on MinGW, whose windows.h omits them in C++).
- tests/port_eterpack_test: registers pack/Index like PackInitialize and checks 119
  registrations / 103 packs + root / 54891 entries / 52609 paths / 2282 overrides with
  first-registered-wins, and that exactly the 4 short-layout SECURITY files fail to load.
- 2R count corrected (136 -> 119 registrations, 103 distinct packs + root).

Not runtime-reachable yet (asset_io pack backend is step 5b), so port-map statuses stay TODO.
port_gate: macos/android/ios/windows PASS.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-23 00:56:39 +09:00
co-authored by Claude Opus 5
parent f210f47076
commit 1f1004da79
31 changed files with 4640 additions and 142 deletions
+2 -2
View File
@@ -33,7 +33,7 @@ for p in "${PLATFORMS[@]}"; do
BUILD_EXTRA=()
case "$p" in
macos)
BUILD_EXTRA=(--target port_common_test)
BUILD_EXTRA=(--target port_common_test --target port_eterpack_test)
run macos "$OUT/macos" "${PORT_ONLY[@]}" -DBUILD_TESTING=ON
last=$((${#RESULTS[@]} - 1))
if [[ "${RESULTS[$last]}" == *PASS ]] && ! ctest --test-dir "$OUT/macos" -R '^port\.' --output-on-failure >>"$OUT/macos.log" 2>&1; then
@@ -71,7 +71,7 @@ for p in "${PLATFORMS[@]}"; do
;;
linux)
if [ "$(uname -s)" = Linux ]; then
BUILD_EXTRA=(--target port_common_test)
BUILD_EXTRA=(--target port_common_test --target port_eterpack_test)
run linux "$OUT/linux" "${PORT_ONLY[@]}" -DBUILD_TESTING=ON
elif [ -n "${MT_LINUX_TOOLCHAIN:-}" ]; then
run linux "$OUT/linux" "${PORT_ONLY[@]}" -DBUILD_TESTING=OFF -DCMAKE_TOOLCHAIN_FILE="$MT_LINUX_TOOLCHAIN"