2010-11-17 76 views
2

我是WiX的新手,并尝试通过添加新对话框来自定义对话框队列。新对话框的名称是ServerChoice和流程是:WiX中的新对话框,点击返回跳过对话框

SetupTypeDlg < - >完整或典型< - > ServerChoice < - > VerifyReadyDlg

SetupTypeDlg < - >自定义< - > CustomizeDlg < - > ServerChoice < - > VerifyReadyDlg

唯一的问题是在VerifyReadyDlg的第一种情况。 “返回”将我带到SetupTypeDlg并跳过ServerChoice,尽管在第二个流程中它可以根据需要运行。

来源:

<UI> 
     <DialogRef Id="ServerChoice" /> 
     <Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="NewDialog" Value="ServerChoice">1</Publish> 
     <Publish Dialog="SetupTypeDlg" Control="CompleteButton" Event="NewDialog" Value="ServerChoice">1</Publish> 
     <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ServerChoice">1</Publish> 
     <Publish Dialog="ServerChoice" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">1</Publish> 
     <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ServerChoice">1</Publish> 
     <Publish Dialog="ServerChoice" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="1">WixUI_InstallMode = "InstallCustom"</Publish> 
     <Publish Dialog="ServerChoice" Control="Back" Event="NewDialog" Value="SetupTypeDlg" Order="2">WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete"</Publish> 
     <Publish Dialog="ServerChoice" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="3">WixUI_InstallMode = "Change"</Publish> 
     <Publish Dialog="ServerChoice" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="4">WixUI_InstallMode = "Repair" OR WixUI_InstallMode = "Remove"</Publish> 
    </UI> 

一些帮助的新手? :)

+0

在我看来,这里有一些缺失的信息。如果您还包含WiX提供的发布条目,则会有2个发布条目用于VerifyReadyDlg后退按钮。您可以尝试使用Orca或InstEdit查看MSI的ControlCondition表,或者使用Wix的dark.exe来反编译MSI并查看生成的WiX文件,以确保您没有VerifyReadyDlg后退按钮的多个事件。 – 2010-11-17 16:14:25

+0

感谢您的回复。似乎你是对的,我发现以下内容: VerifyReadyDlg |返回| NewDialog | SetupTypeDlg | WixUI_InstallMode =“InstallTypical”或WixUI_InstallMode =“InstallComplete” 和 VerifyReadyDlg |返回| NewDialog | ServerChoice | 1 如何使用WiX删除第一个? – Cyril 2010-11-18 09:09:26

+0

grrr ...不能作为代码出来。我应该使用哪个标签?去阅读手册... – Cyril 2010-11-18 09:16:22

回答

4

您引用的是哪种类型的用户界面(Mondo?)。此信息不在您的代码片段中。我认为daddyman的评论是正确的,你可能有多个Back按钮事件,因为Mondo本身在这个按钮点击事件上挂钩了它自己的'处理程序'。

我最近创建了一个自定义的UI对话框流程,我的方法根本没有引用WiXUI_Mondo。取而代之的是,我创建了基于Mondo源代码的自己的新用户界面(您必须查看WiX源代码)。最后我有这个代码(不相关的代码部分已被删除),它工作正常。

<Fragment> 
    <!-- this is based on the WixUI_Mondo dialog set --> 
    <UI Id="WixUI_MyNewUI"> 
     <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" /> 
     <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" /> 
     <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" /> 

     <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" /> 
     <Property Id="WixUI_Mode" Value="Mondo" /> 

     <DialogRef Id="ErrorDlg" /> 
     <DialogRef Id="FatalError" /> 
     <DialogRef Id="FilesInUse" /> 
     <DialogRef Id="MsiRMFilesInUse" /> 
     <DialogRef Id="PrepareDlg" /> 
     <DialogRef Id="ProgressDlg" /> 
     <DialogRef Id="ResumeDlg" /> 
     <DialogRef Id="UserExit" /> 

     <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="CustomizeDlg">1</Publish> 
     <!-- we do not use the SetupTypeDlg which allows user to choose either Typical, Complete or Custom installation; this ensures InstallCustom schema is run --> 
     <Publish Dialog="WelcomeDlg" Control="Next" Property="WixUI_InstallMode" Value="InstallCustom" Order="2">1</Publish> 

     <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">WixUI_InstallMode = "InstallCustom"</Publish> 
     <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="MyDlg1">1</Publish> 

     <Publish Dialog="MyDlg1" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="1">MY_CONDITION_PROPERTY = 0</Publish> 
     <Publish Dialog="MyDlg1" Control="Next" Event="NewDialog" Value="MyDlg2" Order="2">MY_CONDITION_PROPERTY = 1</Publish> 

     <Publish Dialog="MyDlg2" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="1" /> 
     <Publish Dialog="MyDlg2" Control="Back" Event="NewDialog" Value="MyDlg1">1</Publish> 


     <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MyDlg1" Order="1">WixUI_InstallMode = "InstallCustom" and MY_CONDITION_PROPERTY = 0</Publish> 
     <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MyDlg2" Order="2">WixUI_InstallMode = "InstallCustom" and MY_CONDITION_PROPERTY = 1</Publish>  
    </UI> 

    <UIRef Id="WixUI_Common" /> 
    <UIRef Id="WixUI_ErrorProgressText" /> 
</Fragment> 

+2

谢谢。你的代码帮助我找到最短的解决方案。添加Order =“2”解决了这个问题。正确的条目是: ' 1' – Cyril 2010-11-18 09:53:03