我正在创建一个wix引导应用程序,其中包含两个msi包。下面是引导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>我使用的是一个自定义主题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>为了更清晰起见,我在这里的主题xml文件中省略了一些代码。
我想要实现的是,在安装UI中显示两个包的名称,并选择他/她希望安装的用户,并在msi包的名称旁边安装两个单选按钮或复选框。可以在不创建自定义UI的情况下实现这一点吗?任何帮助都将不胜感激。
注意:这两个包都有独立的功能,没有一个是从属的。所以我想功能树不是一种选择。我使用的是Wix3.11
发布于 2021-07-20 12:07:46
作为选项,您可以使用WPF (例如)编写自己的引导程序,并通过UI完成。下面是一步一步的指南。似乎您的案例在“快速概念概述”一节中。
优势:
缺点:
https://stackoverflow.com/questions/68445349
复制相似问题