Files
gjm 35a412f6f5 docs: 更正远端地址为 envi-code 仓库,补充 SSH 私钥本机配置说明
- 远端由 ssh://gjm@47.93.46.28:1216/srv/git/new-start.git
  更正为 ssh://git@39.107.55.179:222/gjm/envi-code.git
- 补充说明:远端走 SSH 222 端口,各机器私钥不同,
  需在本机 ~/.ssh/config 指定;私钥文件名不入库
2026-10-16 19:39:29 +08:00

36 lines
1.8 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://git@39.107.55.179:222/gjm/envi-code.git`,主分支 `main`。
- 提交信息使用中文描述。
- SSH 走 222 端口;**各机器私钥不同**,在本机 `~/.ssh/config` 里指定即可,不要把私钥文件名写进仓库。