38 lines
1.6 KiB
Plaintext
38 lines
1.6 KiB
Plaintext
|
|
<project outputDir="." baseDir="." xmlns="http://confuser.codeplex.com">
|
|||
|
|
<!--
|
|||
|
|
1. 全局规则:开启常规混淆
|
|||
|
|
preset="normal" 包含了:控制流混淆、参数重命名、资源加密等。
|
|||
|
|
它也会默认开启重命名(rename)。
|
|||
|
|
-->
|
|||
|
|
<rule pattern="true" preset="normal">
|
|||
|
|
<!-- 可以在这里微调全局设置,比如加强控制流 -->
|
|||
|
|
<protection id="ctrl flow" />
|
|||
|
|
</rule>
|
|||
|
|
|
|||
|
|
<!--
|
|||
|
|
2. 关键规则:保留所有类名(不重命名类)
|
|||
|
|
pattern="member-type('type')" 意思是指:匹配所有的“类型”定义(Class/Interface/Struct)。
|
|||
|
|
action="remove" 意思是指:对匹配到的这些项,移除指定的保护。
|
|||
|
|
-->
|
|||
|
|
<rule pattern="member-type('type')">
|
|||
|
|
<protection id="rename" action="remove" />
|
|||
|
|
</rule>
|
|||
|
|
|
|||
|
|
<!-- 3. (可选但推荐) 确保 RevitAPI 接口方法不被错误重命名 -->
|
|||
|
|
<!--
|
|||
|
|
通常 ConfuserEx 会自动识别接口实现不进行重命名,但为了保险,
|
|||
|
|
可以显式排除 Execute 和 OnStartup 方法。
|
|||
|
|
-->
|
|||
|
|
<rule pattern="name('Execute') or name('OnStartup') or name('OnShutdown')">
|
|||
|
|
<protection id="rename" action="remove" />
|
|||
|
|
</rule>
|
|||
|
|
|
|||
|
|
<!-- 4. 指定模块 -->
|
|||
|
|
<module path="ShrlAlgoToolkit.RevitAddins.dll" />
|
|||
|
|
|
|||
|
|
<!-- 5. 引用路径 (非常重要) -->
|
|||
|
|
<!-- 为了让ConfuserEx知道哪些方法是接口实现(从而不重命名它们),它需要找到 RevitAPI.dll -->
|
|||
|
|
<!-- 请根据您的Revit安装路径修改,或者确保RevitAPI.dll在编译输出目录中 -->
|
|||
|
|
<!-- <probePath>C:\Program Files\Autodesk\Revit 2020</probePath>-->
|
|||
|
|
|
|||
|
|
</project>
|