<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

  <?include product_definitions.wxi?>

  <Fragment>
    <!-- UI behaviour -->
    <UI Id="TvnUI">
      <UIRef Id="WixUI_Mondo" />
      <UIRef Id="WixUI_ErrorProgressText" />

      <DialogRef Id="AdditionalTasks" />

      <!-- Skip the License Agreement dialog if it's needed. -->
      <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="SetupTypeDlg" Order="9">
        $(var.NoLicense) = 1
      </Publish>
      <Publish Dialog="SetupTypeDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="9">
        $(var.NoLicense) = 1
      </Publish>

      <!-- Jump to the AdditionalTasks dialog from SetupTypeDlg -->
      <Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="NewDialog" Value="AdditionalTasks" Order="10">1</Publish>
      <Publish Dialog="SetupTypeDlg" Control="CompleteButton" Event="NewDialog" Value="AdditionalTasks" Order="10">1</Publish>
      <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="AdditionalTasks" Order="10">
        (WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete" OR
        WixUI_InstallMode = "InstallCustom" OR WixUI_InstallMode = "Change") AND
        <?ifndef VIEWER_FREE ?>
          <?ifndef SERVER_FREE ?>
          (<![CDATA[&Server=3 OR &Viewer = 3]]>)
          <?else?>
          (<![CDATA[&Viewer = 3]]>)
          <?endif?>
        <?else?>
        (<![CDATA[&Server=3]]>)
        <?endif?>
      </Publish>

      <Publish Dialog="AdditionalTasks" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="1">
        WixUI_InstallMode = "InstallCustom" OR WixUI_InstallMode = "Change"
      </Publish>
      <Publish Dialog="AdditionalTasks" Control="Back" Event="NewDialog" Value="SetupTypeDlg" Order="2">
        WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete"
      </Publish>
      <Publish Dialog="AdditionalTasks" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="3">
        1
      </Publish>

      <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="AdditionalTasks" Order="10">
        (WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete" OR
        WixUI_InstallMode = "InstallCustom" OR WixUI_InstallMode = "Change") AND
        <?ifndef VIEWER_FREE ?>
          <?ifndef SERVER_FREE ?>
          (<![CDATA[&Server=3 OR &Viewer = 3]]>)
          <?else?>
          (<![CDATA[&Viewer = 3]]>)
          <?endif?>
        <?else?>
        (<![CDATA[&Server=3]]>)
        <?endif?>
      </Publish>
    </UI>
  </Fragment>
</Wix>
