插件自定义规则文件参考
优质
小牛编辑
135浏览
2023-12-01
Dism++的“空间回收”通过插件自定义规则文件来加载插件自定义清理项目,插件信息文件必须命名为Custom.xml且放在插件目录下
这是一个xml文件,如果要寻找使用方法,请参考Dism++的帮助文档
插件自定义规则文件格式
<?xml version="1.0" encoding="utf-8"?>
<Data>
<CleanCollection4>
<Item Name="清理项目名" Level="2">
<Discription>清理项目描述 </Discription>
<Warning>警告对话框要显示的内容</Warning>
<Group>清理项目所属组</Group>
<ScanCollection>
<Scan Type="Custom">
<Activate>
<Custom ProcName="插件dll对应的导出符号"/>
</Activate>
</Scan>
</ScanCollection>
</Item>
</CleanCollection4>
</Data>
单个清理项目示例
<?xml version="1.0" encoding="utf-8"?>
<Data>
<CleanCollection4>
<Item Name="HelloWorld" Level="2">
<Discription>Dism++插件开发教程演示插件,显示一个Hello World对话框</Discription>
<Group>TestPlugin</Group>
<ScanCollection>
<Scan Type="Custom">
<Activate>
<Custom ProcName="HelloWorldCleanup"/>
</Activate>
</Scan>
</ScanCollection>
</Item>
</CleanCollection4>
</Data>
多个清理项目示例
<?xml version="1.0" encoding="utf-8"?>
<Data>
<CleanCollection4>
<Item Name="#Package Cache目录" Level="2">
<Discription>#Package Cache目录存放以WIX为基础的安装程序的安装源</Discription>
<Warning>#清理后基于WIX的安装程序例如VS可以正常卸载;但升级、修复、增添组件需要联网或者备好安装镜像</Warning>
<Group>#NCleaner</Group>
<ScanCollection>
<Scan>
<Applicable>
<FileExist FilePath="%SystemDrive%\ProgramData\Package Cache"/>
</Applicable>
<Activate>
<Custom ProcName="PackageCacheFolderCleanup"/>
</Activate>
</Scan>
</ScanCollection>
</Item>
<Item Name="#WebPI缓存" Level="2">
<Discription>#WebPI即Web平台安装程序,当你配置好你的开发环境后,可以并建议删除</Discription>
<Group>#NCleaner</Group>
<ScanCollection>
<Scan>
<Applicable>
<RegExist Key="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\WebPlatformInstaller"/>
</Applicable>
<Activate>
<General RootPath="%SystemDrive%\Users\*\AppData\Local\Microsoft\Web Platform Installer\"/>
</Activate>
</Scan>
</ScanCollection>
</Item>
</CleanCollection4>
</Data>