自定义 WiX Burn 引导程序用户界面?
我主要使用 WiX 3.6 创建安装包,这样我就可以利用 Burn 引导功能。到目前为止,我已经将多个 MSI 软件包捆绑在一起,这些软件包将与内置引导程序应用程序 (WixStandardBootstrapperApplication.RtfLicense
) 一起安装。
我读到 Burn 允许通过指定自定义 UX.dll 来替换默认引导程序应用程序,但我还没有找到任何描述自定义 ux.dll 的资源。 dll的构建(即它如何与Burn引擎集成,我使用什么技术,我应该实现什么接口等)。
我的目标是创建一个品牌引导程序,它可以从用户收集任意信息并将该信息传递到各种捆绑的 MSI 文件、EXE 文件等中。
因此,我确实有两个问题:
- 默认引导程序应用程序可自定义的程度如何?
- 是否有任何资源可以描述如何构建自定义
UX.dll
?
I'm creating an installation package with WiX 3.6 primarily so I can take advantage of the Burn bootstrapping features. So far I have several MSI packages bundled together that will be installed with the built-in bootstrapper application (WixStandardBootstrapperApplication.RtfLicense
).
I have read that Burn allows the default bootstrapper application to be replaced by specifying a custom UX.dll
, but I haven't yet been able to locate any resources that describes how the custom ux.dll
is constructed (that is, how it integrates with the Burn engine, what technologies do I use, what interfaces should I implement, etc.).
My goal is to create a branded bootstrapper that can collect arbitrary information from a user and pass that information onto the various bundled MSI files, EXE files, etc.
So I have two questions really:
- To what degree is the default bootstrapper application customizable?
- Are there any resources available that describe how to construct a custom
UX.dll
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
要知道的关键是 WiX 二进制文件中有一个 BootstrapperCore.dll,它定义了一个 BootstrapperApplication 类,用于处理与 Burn 引擎的集成。我需要创建自己的派生类并重写“Run”方法来启动我的自定义 UI。
使用为 WiX 引导程序定义 UI 的 WixBA 项目作为使用 BootstrapperApplication 类 (src\Setup\WixBA\WixBA.csproj) 的参考也很有帮助。
我用来引用自定义引导程序 DLL 文件的标记是:
配置文件包含:
我还遵循了其他示例并将其附加
到
AssemblyInfo.cs
文件中。最后,Stack Overflow 问题在 Burn 托管引导程序内指定 WiX 中软件包的安装描述了如何设置并使用 Burn 变量来帮助驱动安装。
有了这些信息,我现在准备用我自己的自定义 Bootstrapper 应用程序对世界造成严重破坏!
The key thing to know is that there is a BootstrapperCore.dll in the WiX binaries that defines a BootstrapperApplication class that handles the integration with the Burn engine. I needed to create my own derived class and override the 'Run' method to launch my custom UI.
It was also helpful to use the WixBA project that defines the UI for the WiX bootstrapper as a reference for using the BootstrapperApplication class (src\Setup\WixBA\WixBA.csproj).
The markup I used to reference my custom bootstrapper DLL file is:
The configuration file consists of:
I also followed other examples and appended
to the
AssemblyInfo.cs
file.And lastly, Stack Overflow question Specify the INSTALLLOCATION of packages in WiX inside the Burn managed bootstrapper describes how to set and use Burn variables to help drive the installation.
Armed with this information I am now prepared to wreak havoc on the world with my very own custom Bootstrapper application!
为了补充@Bill Campbell的答案,我在 在 .NET 中编写自定义 WiX Bootstrapper,它更深入地介绍了所涉及的各个部分,至少对于托管代码解决方案而言是如此。
To supplement @Bill Campbell's answer, I've written a series of blog posts on writing a custom WiX Bootstrapper in .NET which goes into more depth about the pieces involved, at least for a managed code solution.
不准确回答这个问题,但如果您想自定义 ManagedBootstrapperApplicationHost 的外观,则 这就是您需要做的。
简而言之,您需要像这样声明变量(我将其放在 BootstrapperApplicationRef 之前),
假设 tt.thm 是您的主题文件,tt.wxl 是您的翻译文件。
请注意,这些文件以及它们引用的所有文件必须作为 Payoload 包含在 BootstrapperApplicationRef 中,例如
作为布局示例,您可以使用 mbapreq.thm,在 WiX 源下找到。
Not precisely answer to this question, but if you want to customize appearance of ManagedBootstrapperApplicationHost, then this is what you need to do.
To keep short, you need to declare your variables like this (I put it before BootstrapperApplicationRef)
assuming tt.thm is your theme file, and tt.wxl is your translation file.
Note those files, as well as all files they reference must be included to BootstrapperApplicationRef as Payoload, like
As an example of layout you can use mbapreq.thm, found under WiX sources.
除了此处列出的其他资源之外,Burn 的自定义引导程序应用程序的一个很好的简单示例是 自定义 WiX 托管引导程序应用程序。
我发现在深入研究其他更彻底的示例(例如 WiX 源代码中的 WixBA 项目)之前,这是一个很好的起点。
In addition to the other resources listed here, a good bare-bones example of a custom bootstrapper application for Burn is Custom WiX Managed Bootstrapper Application.
I found that this is a good place to start with before digging deeper into other more thorough examples like the WixBA project in the WiX sources.
设置此功能时我遗漏的一个细节是我必须包含对
WixBalExtension.dll
的引用。这是因为ManagedBootstrapperApplicationHost
是在该 DLL 中定义的,并在捆绑包中使用,如下所示:One detail I was missing when setting this up was that I had to include a reference to
WixBalExtension.dll
. That's because theManagedBootstrapperApplicationHost
is defined in that DLL and used in the bundle like this: