Skip to content

Commit

Permalink
更新dhao文档
Browse files Browse the repository at this point in the history
  • Loading branch information
pirunxi committed Jun 10, 2024
1 parent 82b5bb4 commit f308af7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/business/ultimate/workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 简化dhao工作流

基于同一版本的原始工程,在发布不同平台时原始dll会有微小区别,导致需要为每个平台都计算单独的dhao文件(即使是相同平台,由于代码编译的不稳定性,
生成的原始dll也可能有微小区别),这导致维护dhao工作变得复杂易错。当多个新旧游戏包同时存在时,这个问题尤为严重。

解决这个问题主要靠`合并dhao文件`

## 合并dhao文件

基于相同或者相似源码发布的游戏包,它们的原始dhe程序集在不同平台之间仅有微小区分,热更新时生成的dhao文件也只有微小区别。
可以考虑将同一个dhe程序集对应的多个平台的dhao文件合并,不影响运行正确性的同时对性能的影响也很小。

我们提供了`HybridCLR.Editor.DHE.BuildUtil::MergeDHAOFiles`函数实现合并dhao文件目标。

注意,带校验的工作流无法使用合并dhao文件的方式,因为带校验的工作流会检查原始dll的md5码,这个肯定是不匹配的。

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Simplify dhao workflow

Based on the same version of the original project, the original dll will have slight differences when publishing different platforms, resulting in the need to calculate a separate dhao file for each platform (even for the same platform, due to the instability of code compilation, the generated original dll may also have slight differences), which makes the maintenance of dhao complicated and error-prone. This problem is particularly serious when multiple new and old game packages exist at the same time.

The solution to this problem mainly relies on `merging dhao files`.

## Merging dhao files

Based on the same or similar source code, the original dhe assemblies of game packages released on different platforms have only slight differences, and the dhao files generated during hot updates also have only slight differences.

You can consider merging the dhao files of multiple platforms corresponding to the same dhe assembly, which does not affect the correctness of the operation and has little impact on performance.

We provide the `HybridCLR.Editor.DHE.BuildUtil::MergeDHAOFiles` function to achieve the goal of merging dhao files.

Note that the workflow with verification cannot use the method of merging dhao files, because the workflow with verification will check the md5 code of the original dll, which is definitely not a match.
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ const sidebars = {
'business/ultimate/quickstartchecked',
'business/ultimate/quickstartunchecked',
'business/ultimate/manual',
'business/ultimate/workflow',
'business/ultimate/freetrial',
'business/ultimate/injectrules',
'business/ultimate/commonerrors',
Expand Down

0 comments on commit f308af7

Please sign in to comment.