简体   繁体   English

Wix 工具集引导程序显示选项以选择/选择要安装的 msi 包

[英]Wix toolset bootstrapper display options to chose/select msi packages to be installed

I am creating a wix bootstrap application which contains two msi packages.我正在创建一个包含两个 msi 包的 wix bootstrap 应用程序。 Below is the code for bootstrap bundle.wxs file:下面是 bootstrap bundle.wxs文件的代码:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
  <Bundle Name="WixDemoSetupDefaultUI"
          Version="1.0.0.0" Manufacturer="Priom"
          UpgradeCode="7c77bd1b-fb15-46e5-9fbd-d5bf3c0f3785">

    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLargeLicense">
      <bal:WixStandardBootstrapperApplication
        LicenseFile="Resources/priomEula.rtf"
        ShowVersion="yes"
        LogoFile="Resources/LogoSide.png"
        ThemeFile="Resources/ClassicTheme.xml"
        LocalizationFile="Resources/ClassicTheme.wxl"/>
    </BootstrapperApplicationRef>

    <Variable Name="InstallFolder" Type="string" Value="[ProgramFilesFolder]Priom Biswas" />
    <Chain>
      <MsiPackage Id="ClassLibraryMsi"
                   SourceFile="$(var.WixProjectForDemoClassLibrary.TargetDir)WixProjectForDemoClassLibrary.msi"
                   DisplayName="Demo Class Library"
                   Visible="yes">
        <MsiProperty Name="APPLICATIONFOLDER" Value="[InstallFolder]"/>
      </MsiPackage>
      <MsiPackage Id="ConsoleAppMsi"
                  SourceFile="$(var.WixProjectForDemoConsoleApp.TargetDir)WixProjectForDemoConsoleApp.msi"
                  DisplayName="Demo Console App"
                  Visible="yes">
        <MsiProperty Name="APPLICATIONFOLDER" Value="[InstallFolder]" />
      </MsiPackage>
    </Chain>
  </Bundle>

I am using a custom theme xml file:我正在使用自定义主题 xml 文件:

<?xml version="1.0" encoding="utf-8"?>
<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
  <Window Width="493" Height="320" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
  <Font Id="0" Height="-12" Weight="500" Foreground="000000" Background="F0F0F0" >Segoe UI</Font>
  <Font Id="1" Height="-24" Weight="500" Foreground="000000">Segoe UI</Font>
  <Font Id="2" Height="-22" Weight="500" Foreground="666666" Background="F0F0F0">Segoe UI</Font>
  <Font Id="3" Height="-12" Weight="500" Foreground="000000" Background="F0F0F0" >Segoe UI</Font>
  <Font Id="4" Height="-12" Weight="500" Foreground="ff0000" Background="F0F0F0"  Underline="yes">Segoe UI</Font>
  <Font Id="5" Height="-24" Weight="500" Foreground="000000" Background="E0E0E0">Segoe UI</Font>
  <Font Id="6" Height="-9" Weight="500" Foreground="000000" Background="F0F0F0">Segoe UI</Font>
  <Font Id="7" Height="-16" Weight="500" Foreground="666666" Background="F0F0F0">Segoe UI Bold</Font>
  <Image X="0" Y="0" Width="130" Height="-45" ImageFile="logo.png" Visible="yes"/>
  <Text X="130" Y="-45" Width="500" Height="2" FontId="5" Visible="yes"></Text>
  <Page Name="Help">
    <Text X="150" Y="30" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Text>
    <Text X="150" Y="71" Width="-20" Height="-50" FontId="6" DisablePrefix="yes">#(loc.HelpText)</Text>
    <Button Name="HelpCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.HelpCloseButton)</Button>
  </Page>
  <Page Name="Install">
    <Text X="150" Y="15" Width="-11" Height="100" FontId="7" DisablePrefix="yes">#(loc.WillInstall)</Text>
    <Richedit Name="EulaRichedit" X="150" Y="68" Width="-11" Height="-70" TabStop="yes" FontId="0" HexStyle="0x800000" />
    <Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-49" Width="246" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
    <Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.InstallOptionsButton)</Button>
    <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
    <Button Name="WelcomeCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallCloseButton)</Button>
  </Page>
  <Page Name="Options">
    <Text X="141" Y="20" Width="-11" Height="30" FontId="2">#(loc.OptionsHeader)</Text>
    <Text X="141" Y="61" Width="-11" Height="17" FontId="3">#(loc.OptionsLocationLabel)</Text>
    <Editbox Name="FolderEditbox" X="141" Y="90" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
    <Button Name="BrowseButton" X="-11" Y="90" Width="75" Height="23" TabStop="yes" FontId="3">#(loc.OptionsBrowseButton)</Button>
    <Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsOkButton)</Button>
    <Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsCancelButton)</Button>
    </Page>
</Theme>

I have omitted some code in the theme xml file here for better clarity.为了更清晰,我在这里省略了主题 xml 文件中的一些代码。

What I want to achieve is displaying the name of two msi packages in the installation UI and chose user which msi he/she wants to install with two radio buttons or check boxes along side the name of the msi packages.我想要实现的是在安装 UI 中显示两个 msi 包的名称,并选择他/她想要安装的 msi 用户,并在 msi 包的名称旁边使用两个单选按钮或复选框。 Can this be achieved without creating a custom UI?这可以在不创建自定义 UI 的情况下实现吗? Any kind of help will be appreciated.任何形式的帮助将不胜感激。

Note: Both of these msi packages have standalone functionality and none of them is a subordinate of one another.注意:这两个 msi 包都具有独立的功能,它们都不是彼此的从属。 So I guess feature tree wouldn't be an option.所以我猜特征树不会是一个选择。 I am using wix 3.11我正在使用wix 3.11

As option you can write your own bootstrapper using WPF (for example) and do it via UI.作为选项,您可以使用 WPF(例如)编写自己的引导程序并通过 UI 来完成。 Here's great step-by-step guide how to do it . 这是如何做到这一点的分步指南 And seems like your case is in "Quick concept overview" section.并且您的案例似乎在“快速概念概述”部分。

Advantages:优点:

  1. Great UI that can be as flexible as you want.出色的用户界面,可以随心所欲。
  2. Access to all processes inside bootstrapper (running of MSIs, order, working with result, log, etc.)访问引导程序中的所有进程(运行 MSI、订单、处理结果、日志等)

Disadvantages:缺点:

  1. Time - unfortunately you'll need some time to implement all the stuff, design your UI and, surely, test it.时间 - 不幸的是,您需要一些时间来实现所有的东西,设计您的 UI,当然还要测试它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用设置MSI的Wix Bootstrapper自动版本控制 - Wix Bootstrapper automated versioning with Setup MSI WiX Bootstrapper - 从CustomAction安装MSI - WiX Bootstrapper - Install MSI from CustomAction 使用WIX工具集和Heat工具集为BHO PLugin开发.msi文件 - Develop .msi file using wix toolset and heat toolset for BHO PLugin Wix托管的引导程序应用程序:通过捆绑包将变量传递给msi - Wix Managed bootstrapper Application: Passing variables to msi through bundle 如何使用MSI中包含的xml文件在wix工具集中填充文本框? - how to populate a text box in wix toolset using xml file included in the msi? 如何使用Wix Toolset为ASP.NET Core应用程序创建MSI安装程序 - How to create MSI installer for ASP.NET Core application using Wix Toolset WIX-使用自定义引导程序WPF UI时如何在Msi中设置属性 - WIX - How to Set Properties in Msi when using Custom Bootstrapper WPF UI 每个用户的WIX引导程序 - WIX bootstrapper per User 在WiX自定义托管引导程序应用程序中下载安装程序包的正确方法是什么? - What is the proper way to download setup packages in a WiX custom managed bootstrapper application? 如何安装从维克斯自定义引导程序/卸载单MSI软件包包含多个类似的MSI安装项目的添加/删除功能? - How to install / uninstall single msi from wix custom bootstrapper bundle containing multiple MSIs like add/remove feature of Setup project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM