Files
90CNServer/client-patch/tools/README.md
T
hanfuit da502b3524 docs:补上 90CN.dll 自校验 CRC 工具的文档说明
- 新增 docs/客户端补丁与CRC校验.md:SelfCrcSlot 结构、CRC32 算法与种子坑、
  槽位为什么只在 .data/.rdata 里找、info/verify/patch 用法与退出码、
  build_90cn.ps1 集成、与「服务端 DLL 指纹」的区别、六类故障排查
- 新增 client-patch/tools/README.md:脚本清单与常用命令速查
- docs/README.md:文档索引与上手路径补一条
- 根 README:关键设计说明补「客户端自校验(CRC32)」小节,文档索引补一行
- 90CN.cpp:清掉过期的重复注释(旧的 patch_selfcrc.py / .text 段说法),与实现对齐
2026-11-05 16:40:33 +08:00

26 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# client-patch/tools
编译与构建后处理脚本。完整说明见 [docs/客户端补丁与CRC校验.md](../../docs/客户端补丁与CRC校验.md)。
| 文件 | 用途 |
|------|------|
| `build_90cn.bat` | 双击入口,转调下面的 ps1 |
| `build_90cn.ps1` | MSBuild 编 `Release\|Win32` → 收集产物 → 调 `patch_dll_crc.py` 写自校验 CRC;`-SkipCrc` 可跳过(仅调编译用,别拿去发布) |
| `patch_dll_crc.py` | 补齐 / 校验 `90CN.dll` 自校验 CRC32 |
## 常用命令
```bash
# 编 DLL 并自动补 CRC
powershell -NoProfile -ExecutionPolicy Bypass -File build_90cn.ps1
# 只处理已有的 DLL
python patch_dll_crc.py info <dll> # 看节表与槽位
python patch_dll_crc.py verify <dll> # 校验当前 CRC
python patch_dll_crc.py patch <dll> # 重写 CRC(-o 可输出到副本)
```
退出码:`0` 通过 / `1` 校验失败或找不到槽位 / `2` 用法错误。
> ⚠️ 改完 DLL 除了补 CRC,还要**重编服务端**——`DNF90Server.exe` 在编译期绑定了 DLL 的 SHA-256,指纹不配套会被拒绝连接。