gpt4 book ai didi

wix - 自定义 WiX Burn Bootstrap 用户界面?

转载 作者:行者123 更新时间:2023-12-02 03:01:19 27 4
gpt4 key购买 nike

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

我已了解到 Burn 允许通过指定自定义 UX.dll 来替换默认 Bootstrap 应用程序,但我尚未找到任何描述自定义 >ux.dll的构建(即它如何与Burn引擎集成,我使用什么技术,我应该实现什么接口(interface)等)。

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

所以我真的有两个问题:

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

最佳答案

要知道的关键是 WiX 二进制文件中有一个 BootstrapperCore.dll,它定义了一个 BootstrapperApplication 类,用于处理与 Burn 引擎的集成。我需要创建自己的派生类并重写“Run”方法来启动我的自定义 UI。

使用为 WiX Bootstrap 定义 UI 的 WixBA 项目作为使用 BootstrapperApplication 类 (src\Setup\WixBA\WixBA.csproj) 的引用也很有帮助。

我用来引用自定义 Bootstrap DLL 文件的标记是:

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

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

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

AssemblyInfo.cs 文件。

最后,堆栈溢出问题 Specify the INSTALLLOCATION of packages in WiX inside the Burn managed bootstrapper描述如何设置和使用 Burn 变量来帮助驱动安装。

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

关于wix - 自定义 WiX Burn Bootstrap 用户界面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7840380/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com