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安装程序的条件GUI对话框_Wix_Windows Installer_Wix3_Wix3.8 - Fatal编程技术网

Wix-Wix安装程序的条件GUI对话框

Wix-Wix安装程序的条件GUI对话框,wix,windows-installer,wix3,wix3.8,Wix,Windows Installer,Wix3,Wix3.8,我有一个自定义GUI,如下所示: <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Fragment> <UI Id="myUi"> <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" /> <TextStyle Id="WixUI_Font_Bigger" FaceName=

我有一个自定义GUI,如下所示:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Fragment>
    <UI Id="myUi">
      <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="Minimal" />
      <DialogRef Id="ErrorDlg" />
      <DialogRef Id="FatalError" />
      <DialogRef Id="FilesInUse" />
      <DialogRef Id="MsiRMFilesInUse" />
      <DialogRef Id="PrepareDlg" />
      <DialogRef Id="ProgressDlg" />
      <DialogRef Id="ResumeDlg" />
      <DialogRef Id="UserExit" />

      <!-- This is the welcome dialog you specified-->
      <DialogRef Id="WelcomeDlg" />
      <!-- Hook the new welcome dialog to the next one in the stack-->
      <Dialog Id="DemoDatabaseDlg"  Width="370" Height="270" Title="Configutation settings" NoMinimize="yes">

        <Control Id="QueryServiceLabel" Type="Text" X="45" Y="73" Width="220" Height="15" TabSkip="no" Text="QueryService Value" />
        <Control Id="QueryServiceNameEdit" Type="Edit" X="45" Y="85" Width="220" Height="18" Property="QUERYSERVICEVALUE" Text="{80}" />
        <Control Id="IFinderLabel" Type="Text" X="45" Y="105" Width="100" Height="15" TabSkip="no" Text="&amp;IFinder Value" />
        <Control Id="IFinderEdit" Type="Edit" X="45" Y="117" Width="220" Height="18" Property="IFINDERVALUE" Text="{80}" />
        <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="Back"></Control>
     <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="Next"></Control>
        <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>
      </Dialog>

      <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="DemoDatabaseDlg">1</Publish>
    <Publish Dialog="DemoDatabaseDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg"><![CDATA[Version < "0.8.0.0"]]></Publish>
    <Publish Dialog="DemoDatabaseDlg" Control="Next" Event="NewDialog" Value="PrepareDlg">1</Publish> -->
      <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>


      <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</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>

      <Property Id="ARPNOMODIFY" Value="1" />
    </UI>

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

1.
1.
1 -->
1.
1.
1.
1.
1.
1.
我试图使DemoDatabaseDlg对话框有条件,因此,如果用户是第一次安装安装程序,则应显示“DemoDatabaseDlg”,如果不跳过此对话框并跳到下一个对话框。 我想通过检查安装程序的版本来设置此条件,因此如果是1.0及以上版本(版本>1.0),则跳过该对话框。 你认为这是一个可行的想法吗?欢迎提供任何提示或建议。

Wix可以将子元素设置为条件并发布。使用它们来创建您的逻辑。您还可以定义单独的发布元素来有条件地触发事件,就像您的示例中一样

答案在
发布
-元素
控件
事件
属性中