自定义 WiX Burn 引导程序用户界面? [英] Custom WiX Burn bootstrapper user interface?

查看:36
本文介绍了自定义 WiX Burn 引导程序用户界面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我主要使用 WiX 3.6 创建安装包,以便我可以利用 Burn 引导功能.到目前为止,我将几个 MSI 软件包捆绑在一起,它们将与内置引导程序应用程序 (WixStandardBootstrapperApplication.RtfLicense) 一起安装.

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).

我读过 Burn 允许通过指定自定义 UX.dll 来替换默认引导程序应用程序,但我还没有找到任何描述自定义 ux.dll 被构造(即它如何与 Burn 引擎集成,我使用什么技术,我应该实现什么接口等).

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.).

我的目标是创建一个品牌引导程序,它可以从用户那里收集任意信息并将该信息传递到各种捆绑的 MSI 文件、EXE 文件等中.

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:

  1. 默认引导程序应用的可定制程度如何?
  2. 是否有任何可用资源描述如何构建自定义 UX.dll?

推荐答案

需要知道的关键是 WiX 二进制文件中有一个 BootstrapperCore.dll,它定义了一个 BootstrapperApplication 类 处理与 Burn 引擎的集成.我需要创建自己的派生类并覆盖运行"方法以启动我的自定义 UI.

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.

使用定义 WiX 引导程序 UI 的 WixBA 项目作为使用 BootstrapperApplication 类 (src\Setup\WixBA\WixBA.csproj) 的参考也很有帮助.

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).

我用来引用我的自定义引导程序 DLL 文件的标记是:

The markup I used to reference my custom bootstrapper DLL file is:

<BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost" >
  <Payload SourceFile="$(var.InstallSourceResources)Bootstrapper\FusionInstallUX.dll"/>
  <Payload Id="FusionInstallUX.config"
           SourceFile="$(var.InstallSourceResources)Bootstrapper\FusionInstallUX.BootstrapperCore.config"
           Name="BootstrapperCore.config" Compressed="yes"/>
</BootstrapperApplicationRef>

配置文件包括:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        <sectionGroup
            name="wix.bootstrapper"
            type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperSectionGroup, BootstrapperCore">

            <section
                name="host"
                type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.HostSection, BootstrapperCore" />
        </sectionGroup>
    </configSections>

    <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0" />
    </startup>

    <wix.bootstrapper>
        <host assemblyName="FusionInstallUX">
            <supportedFramework version="v4\Full" />
            <supportedFramework version="v4\Client" />
        </host>
    </wix.bootstrapper>
</configuration>

我也遵循了其他示例并附加了

I also followed other examples and appended

[assembly: BootstrapperApplication(typeof([name of class deriving from BootstrapperApplication]))]

AssemblyInfo.cs 文件.

最后,堆栈溢出问题在 Burn 托管引导程序中指定 WiX 中包的安装描述如何设置和使用 Burn 变量来帮助驱动安装.

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.

有了这些信息,我现在准备用我自己的自定义 Bootstrapper 应用程序对世界造成严重破坏!

Armed with this information I am now prepared to wreak havoc on the world with my very own custom Bootstrapper application!

这篇关于自定义 WiX Burn 引导程序用户界面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆