Files
gjm 5993d6bda4 新增 ai.memory 项目记忆目录,供跨机器 CodeBuddy CLI 读取
包含工程概览、构建系统、模块划分、决策记录与约定,
随仓库同步以便在不同电脑上保持上下文连续性。
2026-09-28 15:58:16 +08:00

35 lines
1.7 KiB
Markdown
Raw Permalink 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.
# 约定与注意事项
## 构建
- **统一使用 CMake**,禁止再新增/依赖 `.vcxproj`、`.sln`(`StartApp` 除外,见下)。
- 新增业务模块:在模块目录放 `CMakeLists.txt`,并在顶层 `SourceCode/Code2026/cmakelists.txt` 用 `add_custom_module(<相对目录> <FOLDER分组>)` 注册。
- 新增模块的 `CMakeLists.txt` 参考现有模块(如 `HvacCmd/CMakeLists.txt`)的模板:
- `add_library(... SHARED ${SOURCES})`
- `add_def_file_name(SOURCES "<Name>")`
- `target_set_name_and_suffix(<t> "<Name>" ".arx")`
- `target_link_objectarx(<t> <XXX_EXPORT>)`
- `set_debug_post_build(<t> "<Name>" ".arx")`
- 若模块需要授权双版本,参考 `CoreCommand/cmakelists.txt` 的 `get_encryption_modes` + `set_encryption_definitions_and_output_path` 写法。
## 平台差异
- 用 `IsZWCAD()` 判断目标平台;ZRX 产物后缀 `.zrx`,链接 `ThirdParty::ZRX`;ARX 链接 `ThirdParty::ARX`。
- 编译宏:`ARX=<版本号>` 或 `ZWCAD`。
- 部分 SDK 版本才有特定库(如 `acdrawbridge` 需 >19,`acpal`/`acgeoment` 需 >23)——已由 `ThirdPartyDeps.cmake` 处理。
## 授权 / 加密
- 正式版走 `BAL_REMOTE`(网络锁),试用版走 `TRIAL_YEAR`;二者由同一套源码编译出两个目标。
- 加密依赖 **BitAnswer**;相关表由 `utility/generateEncryptionTable` 生成。
## 不要提交的内容
`.gitignore` 已忽略:`Arx/`、`cmake_output/`、`bin/`、`lib/`、`*.obj/*.pdb/*.user/.vs/` 等。
`cmake_output/` 里 CMake 生成的 `*.vcxproj` 属于构建产物,**不要**误提交。
## Git
- 远端 `origin`:`ssh://gjm@47.93.46.28:1216/srv/git/new-start.git`,主分支 `main`。
- 提交信息使用中文描述。