如何在WiX中的安装对话框中添加新对话框?在将来的选择对话框之前,我想弹出一个带有4个复选框的对话框,以添加一些额外的文件。
我在向现有对话框添加复选框时找到了一些帮助,但是如何添加新对话框呢?
我试过这个: 在我的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>
但是对话框没有弹出。
更新:现在对话框正在显示。但, 该复选框不允许取消选中, 如何根据复选框的检查安装文件?
答案 0 :(得分: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>