Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wix引导程序不';使用自定义主题时不显示许可证_Wix - Fatal编程技术网

Wix引导程序不';使用自定义主题时不显示许可证

Wix引导程序不';使用自定义主题时不显示许可证,wix,Wix,我正在使用带有自定义主题的WixBootstrapperApplicationRef来显示许可证。正如我在中所看到的,我已经将主题添加为有效负载,但是如果我添加自定义主题,则不会显示许可协议 我使用的代码附在下面: <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense"> <Payload SourceFile="..\..\..\Libraries\InstallerFi

我正在使用带有自定义主题的
WixBootstrapperApplicationRef
来显示许可证。正如我在中所看到的,我已经将主题添加为有效负载,但是如果我添加自定义主题,则不会显示许可协议

我使用的代码附在下面:

<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
  <Payload SourceFile="..\..\..\Libraries\InstallerFiles\graphics\UIDialog.bmp"/>
  <Payload SourceFile="..\..\..\Libraries\InstallerFiles\graphics\UIBanner.bmp"/>
  <Payload SourceFile="..\..\..\Libraries\InstallerFiles\graphics\UIBanner2.bmp"/>
  <Payload SourceFile="..\..\..\Libraries\InstallerFiles\graphics\CoreTheme.xml"/>
  <bal:WixStandardBootstrapperApplication LicenseFile="..\..\..\Libraries\InstallerFiles\licenses\License Agreement_Test.rtf" SuppressOptionsUI="yes" ThemeFile="..\..\..\Libraries\InstallerFiles\graphics\CoreTheme.xml" />
</BootstrapperApplicationRef>

主题文件如下所示:

<?xml version="1.0" encoding="utf-8"?>
<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
  <Window Width="500" Height="390" HexStyle="100a0000" FontId="0">[WixBundleName] Setup Wizard.</Window>
  <Font Id="0" Height="-12" Weight="500" Foreground="000000" Background="FFFFFF">Segoe UI</Font>
  <Font Id="1" Height="-18" Weight="575" Foreground="000000">Segoe UI</Font>
  <Font Id="2" Height="-16" Weight="500" Foreground="000000">Segoe UI</Font>
  <Page Name="Install">
    <Text X="175" Y="11" Width="-11" Height="64" FontId="1">Welcome to the [WixBundleName] Setup Wizard</Text>
    <Image X="0" Y="0" Width="164" Height="312" ImageFile="UIDialog.bmp" />
    <Static Height="1" Width="-0" X="0" Y="312" Visible="yes" />
    <Text Name="Welcome" X="175" Y="90" Width="-11" Height="51" FontId="0">This Setup Wizard will install [WixBundleName] on your computer.</Text>
    <Text Name="Welcome" X="175" Y="141" Width="-11" Height="51" FontId="0">It is recommended that you close all other applications before continuing.</Text>
    <Text Name="Welcome" X="175" Y="192" Width="-11" Height="51" FontId="0">Click Install to continue, or Close to exit the Setup Wizard.</Text>
    <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="Progress">
    <Image X="0" Y="0" Width="493" Height="58" ImageFile="UIBanner2.bmp" />
    <Static Height="1" Width="-0" X="0" Y="312" Visible="yes" />
    <Text X="11" Y="11" Width="-11" Height="64" FontId="1">[WixBundleName] Setup Wizard</Text>
    <Static Height="1" Width="-0" X="0" Y="58" />
    <Text X="11" Y="120" Width="-11" Height="25" FontId="2">#(loc.ProgressHeader)</Text>
    <Text X="11" Y="161" Width="70" Height="17" FontId="0">#(loc.ProgressLabel)</Text>
    <Text Name="OverallProgressPackageText" X="85" Y="161" Width="-11" Height="17" FontId="0">#(loc.OverallProgressPackageText)</Text>
    <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="183" Width="-11" Height="15" />
    <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
  </Page>
  <Page Name="Modify">
    <Text X="175" Y="11" Width="-11" Height="64" FontId="1">Welcome to the [WixBundleName] Setup Wizard.</Text>
    <Image X="0" Y="0" Width="164" Height="312" ImageFile="UIDialog.bmp" />
    <Static Height="1" Width="-0" X="0" Y="312" Visible="yes" />
    <Text X="175" Y="90" Width="-11" Height="51" FontId="0">The Setup Wizard allows you to remove the [WixBundleName] features from your computer.</Text>
    <Text X="175" Y="141" Width="-11" Height="51" FontId="0">Click Uninstall to continue, or Close to exit the Setup Wizard.</Text>
    <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
    <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyCloseButton)</Button>
  </Page>
  <Page Name="Success">
    <Text X="175" Y="11" Width="-11" Height="64" FontId="1">Completed the [WixBundleName] Setup Wizard.</Text>
    <Image X="0" Y="0" Width="164" Height="312" ImageFile="UIDialog.bmp" />
    <Static Height="1" Width="-0" X="0" Y="312" Visible="yes" />
    <Text X="175" Y="90" Width="-11" Height="51" FontId="0">Click the Close button to exit the Setup Wizard</Text>
    <Button Name="SuccessCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.SuccessCloseButton)</Button>
  </Page>
  <Page Name="Failure">
    <Text X="175" Y="11" Width="-11" Height="64" FontId="1">The [WixBundleName] Setup Wizard was interrupted.</Text>
    <Image X="0" Y="0" Width="164" Height="312" ImageFile="UIDialog.bmp" />
    <Static Height="1" Width="-0" X="0" Y="312" Visible="yes" />
    <Text Name="FailureText" X="175" Y="90" Width="-11" Height="71" FontId="0">
      The [WixBundleName] Setup was interrupted. Your system has not been modified. To install this program at a later time, please run the installation again. Refer to the installation manual for further instructions.
    </Text>
    <Text Name="FailureMessageText" X="175" Y="161" Width="-11" Height="80" FontId="0" HideWhenDisabled="yes" />
    <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.FailureCloseButton)</Button>
  </Page>
</Theme>

[WixBundleName]安装向导。
微软雅黑效果
微软雅黑效果
微软雅黑效果
欢迎使用[WixBundleName]安装向导
此安装向导将在您的计算机上安装[WixBundleName]。
建议您在继续之前关闭所有其他应用程序。
单击“安装”继续,或单击“关闭”退出安装向导。
#(定位安装按钮)
#(位置安装关闭按钮)
[WixBundleName]安装向导
#(见标题)
#(见附件1)
#(位置:整体进度包装文本)
#(定位按钮)
欢迎使用[WixBundleName]安装向导。
安装向导允许您从计算机中删除[WixBundleName]功能。
单击卸载继续,或单击关闭退出安装向导。
#(位置修改按钮)
#(位置修改关闭按钮)
已完成[WixBundleName]安装向导。
单击关闭按钮退出安装向导
#(定位成功关闭按钮)
[WixBundleName]安装向导被中断。
[WixBundleName]设置被中断。您的系统尚未修改。若要在以后安装此程序,请重新运行安装。有关更多说明,请参阅安装手册。
#(定位故障关闭按钮)
我想要实现的是在
安装
页面之后显示许可协议页面。有什么建议吗


提前谢谢

我再次读到,您希望在安装页面之后添加许可协议,但不修改boostrapper应用程序,这是不可能的

如果您真的想修改bootstrapper应用程序,那么您需要从github下载wix3源代码,并开始了解WixStdBA.vcxproj并将其修改到您自己的BA中,以定义新的UI流


您的主题没有eula丰富的编辑框定义,因此不会显示

由于您正在使用(我假设)默认的WixStdBA.dll,并且正在使用其中一个默认主题,因此您需要遵循它们的结构来使用它们使用过的UI元素。您可以添加一些元素,比如复选框和文本框,但对于其他交互式UI元素来说,您的能力有限

是指向原始RTFLicense主题的链接

请注意他们的安装页面:

<Page Name="Install">
    <Richedit Name="EulaRichedit" X="11" Y="80" Width="-11" Height="-70" TabStop="yes" FontId="0" HexStyle="0x800000" />
    <Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" 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>

#(位置InstallAcceptCheckbox)
#(定位安装选项按钮)
#(定位安装按钮)
#(位置安装关闭按钮)
如果希望在第一页显示EULA,则必须添加名为
EulaRichedit
的Richedit以及名为
EulaAcceptCheckbox
的复选框。此外,主题中的任何交互式UI元素必须保持相同的名称,否则它们将无法在引导程序中工作。在这种情况下,如果您没有复选框,安装按钮将永远被禁用


这是在不编写自己的引导程序的情况下使用内置引导程序的一个限制。如果不修改引导程序应用程序代码,您也无法添加执行任何操作的新按钮。您基本上只限于移动UI元素(如果您真的想),添加静态文本和复选框,可能还包括可编辑的文本框。

我再次读到,您希望在安装页面之后添加许可协议,但不修改boostrapper应用程序,这是不可能的

如果您真的想修改bootstrapper应用程序,那么您需要从github下载wix3源代码,并开始了解WixStdBA.vcxproj并将其修改到您自己的BA中,以定义新的UI流


您的主题没有eula丰富的编辑框定义,因此不会显示

由于您正在使用(我假设)默认的WixStdBA.dll,并且正在使用其中一个默认主题,因此您需要遵循它们的结构来使用它们使用过的UI元素。您可以添加一些元素,比如复选框和文本框,但对于其他交互式UI元素来说,您的能力有限

是指向原始RTFLicense主题的链接

请注意他们的安装页面:

<Page Name="Install">
    <Richedit Name="EulaRichedit" X="11" Y="80" Width="-11" Height="-70" TabStop="yes" FontId="0" HexStyle="0x800000" />
    <Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" 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>

#(位置InstallAcceptCheckbox)
#(定位安装选项按钮)
#(定位安装按钮)
#(位置安装关闭按钮)
如果希望在第一页显示EULA,则必须添加名为
EulaRichedit
的Richedit以及名为
EulaAcceptCheckbox
的复选框。此外,主题中的任何交互式UI元素必须保持相同的名称,否则它们将无法在引导程序中工作。在这种情况下,如果您没有复选框,安装按钮将永远被禁用

这是在不编写自己的引导程序的情况下使用内置引导程序的一个限制。如果不修改引导程序应用程序代码,您也无法添加执行任何操作的新按钮。您基本上只限于移动UI元素(如果您真的想),添加静态文本和复选框,可能还有可编辑的文本框。

谢谢您的解决方案!:)这真的帮了我大忙谢谢你的解决方案!:)这真的帮了我大忙