WiX Toolset覆盖退出对话框会导致编译错误

时间:2017-02-12 21:55:42

标签: xml wix

我尝试通过编写自己的退出对话框来解决退出对话框中的复选框背景问题。但是,无论我尝试什么,我都无法进行编译。 最后,我总是得到错误ICE82: This action MyExitDialog has duplicate sequence number -1 in the table InstallUISequenceAdminUISequence也是如此。我已经看到很多人用安装顺序实现自己的对话框的例子。有什么我做错了吗?我使用的是WiX Toolset v3.10

我的退出对话框:

<Fragment>
  <UI>
    <Dialog Id="MyExitDialog" Width="370" Height="270" Title="!(loc.ExitDialog_Title)">
      <Control Id="Finish2" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUIFinish)" />
      <Control Id="Cancel2" Type="PushButton" X="304" Y="243" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUICancel)" />
      <Control Id="Bitmap2" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.ExitDialogBitmap)" />
      <Control Id="Back2" Type="PushButton" X="180" Y="243" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUIBack)" />
      <Control Id="BottomLine2" Type="Line" X="0" Y="234" Width="370" Height="0" />
      <Control Id="Description2" Type="Text" X="135" Y="70" Width="220" Height="40" Transparent="yes" NoPrefix="yes" Text="!(loc.ExitDialogDescription)" />
      <Control Id="Title2" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.ExitDialogTitle)" />
      <Control Id="OptionalText2" Type="Text" X="135" Y="110" Width="220" Height="80" Transparent="yes" NoPrefix="yes" Hidden="yes" Text="[WIXUI_EXITDIALOGOPTIONALTEXT]">
        <Condition Action="show">WIXUI_EXITDIALOGOPTIONALTEXT AND NOT Installed</Condition>
      </Control>
      <Control Id="OptionalCheckBox2" Type="CheckBox" X="139" Y="206" Width="13" Height="13" Hidden="yes" Property="WIXUI_EXITDIALOGOPTIONALCHECKBOX2" CheckBoxValue="1">
        <Condition Action="show">WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT AND NOT Installed</Condition>
      </Control>
      <Control Type="Text" Id="OptionalCheckBoxText2" Width="190" Height="17" X="154" Y="206" Text="[WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT]">
        <Condition Action="show">WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT AND NOT Installed</Condition>
      </Control>
    </Dialog>
  </UI>
  <InstallUISequence>
    <Show Dialog="MyExitDialog" OnExit="success">1</Show>
  </InstallUISequence>
  <AdminUISequence>
    <Show Dialog="MyExitDialog" OnExit="success">1</Show>
  </AdminUISequence>
</Fragment>

我的用户界面:

<Fragment>
  <UIRef Id="WixUI_Common" />
  <UI Id="MyWixUI">
    <TextStyle Id="WixUI_Font_Normal" FaceName="Segoe UI" Size="9" />
    <TextStyle Id="WixUI_Font_Bigger" FaceName="Segoe UI" Size="12" />
    <TextStyle Id="WixUI_Font_Title" FaceName="Segoe UI" Size="9" Bold="yes" />
    <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
    <Property Id="WixUI_Mode" Value="InstallDir" />
    <DialogRef Id="WelcomeDlg" />
    <DialogRef Id="DiskCostDlg" />
    <DialogRef Id="VerifyReadyDlg" />
    <DialogRef Id="ErrorDlg" />
    <DialogRef Id="FatalError" />
    <DialogRef Id="FilesInUse" />
    <DialogRef Id="MsiRMFilesInUse" />
    <DialogRef Id="PrepareDlg" />
    <DialogRef Id="ProgressDlg" />
    <DialogRef Id="ResumeDlg" />
    <DialogRef Id="UserExit" />
    <DialogRef Id="MyExitDialog" />
    <DialogRef Id="BasicFeatureDlg" />
    <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="BasicFeatureDlg" Order="0">1</Publish>
    <Publish Dialog="BasicFeatureDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="1">1</Publish>
    <Publish Dialog="BasicFeatureDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="1">1</Publish>
    <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="BasicFeatureDlg" Order="2">NOT Installed</Publish>
    <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
    <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed</Publish>
    <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
    <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
    <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
    <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
    <!--<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>-->
    <Publish Dialog="MyExitDialog" Control="Finish2" Event="DoAction" Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX2 = 1 and NOT Installed</Publish>
  </UI>
</Fragment>

1 个答案:

答案 0 :(得分:0)

显然这是我的一个错误。显然,以下内容嵌套在我的Publish列表中,该列表引用了它导致ICE错误。一旦我将其更改为Dialog="MyExitDialog",编译的所有内容和我的新退出对话框都能正常工作!我想之前的版本引用了ExitDialog

<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>