我需要创建一个 WiX 扩展来处理与 HTTP API (httpapi.dll) 的交互,以便我可以设置 URLACL 和 WCF 服务的">SSL 绑定。
据我了解,我需要创建一个 WiX 编译器扩展,以便我可以定义 XML 语法 (XSD),然后实现编译器将 XML 转换为
我已经启动并运行了大部分内容,但我对如何设置我的项目以使用 XsdGen 自定义工具感到困惑,并且我确信此后还会出现更多问题。
是否有完整教程展示如何创建 Wix 编译器扩展?
I need to create a WiX extension to handle interacting with the HTTP API (httpapi.dll) so that I can set URLACLs and SSL bindings for a WCF service that is being installed.
As I understand it, I need to create a WiX compiler extension, so that I can define an XML grammar (XSD), and then implement a compiler to turn the XML into records in tables defined in the MSI.
I have most of that up and running, but I am stumped on how to set up my project to use the XsdGen custom tool, and I am sure there are more issues lurking around the corner after that.
Is there a full tutorial that shows how to create a Wix compiler extension?
发布评论
评论(3)
XsdGen 在 WixBuild.Common.targets 中为 WiX 构建本身定义;它不会通过“正常”wix.targets 暴露。您可以改为在预构建事件中运行 xsdgen.exe。
XsdGen is defined in WixBuild.Common.targets for the WiX build itself; it's not exposed via the "normal" wix.targets. You can run xsdgen.exe in a prebuild event instead.
您可以查看 WiX contrib 项目中的扩展。由于它们不是 WiX 工具集的一部分,因此需要额外的步骤来构建扩展。
You might take a look at the extensions in the WiX contrib project. Since they aren't part of the WiX toolset they have the extra steps needed to build the extension.
期待完整的教程有点乐观。编写 WiX 扩展是一个非常高级的用例,很少有人需要这样做。相反,您可以在 WiX 源中查看所有官方扩展的源代码。
Expecting a full tutorial is a bit optimistic. Writing a WiX extension is a very advanced use case that very few people will ever need to do. Instead, you can take a look at the source of all the official extensions in the WiX source code.