2013-12-18 100 views
2

如何将新对话框添加到WiX中的安装对话框中?在未来的选择对话框之前,我想弹出一个对话框,其中包含4个复选框以添加一些额外的文件。使用4个复选框创建新对话框并添加对话框UI.wxs

我已经找到了添加复选框到现有对话框的一些帮助,但是如何添加新的对话框?

我已经试过这样: 加在我UI.wxs

<Dialog Id="NewDlg" Width="370" Height="270" Title="Conditions dialog"> 
    <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" /> 
    <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" /> 
    <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)"> 
     <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish> 
    </Control> 
    <Control Id="OP1" Type="CheckBox" X="20" Y="160" Width="290" Height="17" Property="OPONE" Text="Op1" /> 
    <Control Id="OP2" Type="CheckBox" X="20" Y="160" Width="290" Height="17" Property="OPTWO" Text="Op2" /> 
    <Control Id="OP2" Type="CheckBox" X="20" Y="160" Width="290" Height="17" Property="OPTHREE" Text="Op3" /> 
    <Control Id="OP2" Type="CheckBox" X="20" Y="160" Width="290" Height="17" Property="OPFOUR" Text="Op4" /> 

    </Dialog> 


<Publish Dialog="NewDlg" Control="Next" Event="NewDialog" Value="FeaturesDlg"></Publish> 
    <Publish Dialog="NewDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg"></Publish> 

但没有弹出的对话框里以下。

UPDATE:现在对话框出现了。但是, 复选框不允许取消选中,并且, 如何根据复选框的检查安装文件?

回答

0

您应该在LicenseAgreementDlg中定义下一步创建对话框。检查下面的标记代码:

<Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="NewDlg" Order="1"></Publish>   
<Publish Dialog="NewDlg" Control="Next" Event="NewDialog" Value="FeaturesDlg"></Publish> 
<Publish Dialog="NewDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg"></Publish>