wix:如何使ProgressDlg开始安装过程?

时间:2016-12-25 12:31:48

标签: c# wix

我是Wix的新手。我根据需要对wix github中的ProgressDlg进行了一些更改。但是在我获得ProgressDlg框后,安装过程无法启动。请指出我缺少的东西。谢谢。

ProgressDialog.wxs

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Fragment>
    <UI>
      <Dialog Id="ProgressDialog" Width="370" Height="270" Title="Email System" Modeless="yes"><Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="100" Height="234" TabSkip="no" Text="ascentPic" />

  <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Default="yes" Cancel="yes" Text="Cancel">
    <Publish Event="EndDialog" Value="Return">1</Publish>
  </Control>

  <Control Id="TextInstalling" Type="Text" X="135" Y="65" Width="200" Height="35" Hidden="yes" NoPrefix="yes" Text="Installing">
    <Condition Action="show">NOT Installed OR (Installed AND (RESUME OR Preselected) AND NOT PATCH)</Condition>
  </Control>
  <Control Id="TitleInstalling" Type="Text" X="135" Y="15" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Hidden="yes" Text="Installing...">
    <Condition Action="show">NOT Installed OR (Installed AND (RESUME OR Preselected) AND NOT PATCH)</Condition>
  </Control>

  <Control Id="ActionText" Type="Text" X="135" Y="100" Width="285" Height="10">
    <Subscribe Event="ActionText" Attribute="Text" />
  </Control>
  <Control Id="ProgressBar" Type="ProgressBar" X="135" Y="115" Width="200" Height="10" ProgressBlocks="yes" Text="Prg">
    <Subscribe Event="SetProgress" Attribute="Progress" />
  </Control>
  <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
</Dialog>

<InstallUISequence>
  <Show Dialog="ProgressDialog" Before="ExecuteAction" Overridable="yes" />
</InstallUISequence>
</UI>
 </Fragment>
</Wix>

上面的wxs是验证对话框:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
   <Fragment>
  <UI>
    <Dialog Id="VerifyDialog" Width="370" Height="270" Title="Email System" TrackDiskSpace="yes">
      <Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="100" Height="234" TabSkip="no" Text="ascentPic" />

      <Control Id="Install" Type="PushButton" ElevationShield="yes" X="212" Y="243" Width="80" Height="17" Default="yes" Hidden="yes" Disabled="yes" Text="Install">
        <Condition Action="show">NOT Installed AND ALLUSERS</Condition>
        <Condition Action="enable">NOT Installed</Condition>
        <Condition Action="default">NOT Installed</Condition>
        <Publish Event="DoAction" Value="InstallFiles">1</Publish>
        <Publish Event="NewDialog" Value="ProgressDialog">1</Publish>
      </Control>

      <Control Id="InstallTitle" Type="Text" X="135" Y="15" Width="300" Height="15" Transparent="yes" NoPrefix="yes" Hidden="yes" Text="Ready to install Ascent Partners Email System?">
        <Condition Action="show">NOT Installed</Condition>
      </Control>
      <Control Id="InstallText" Type="Text" X="135" Y="70" Width="200" Height="120" Hidden="yes" Text="Click Install to begin the installation. Click Back to review or change any of your installation settings. Click Cancel to exit the wizard.">
        <Condition Action="show">NOT Installed</Condition>
      </Control>
      <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
      <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel">
        <Publish Event="EndDialog" Value="Return">1</Publish>
      </Control>
      <Control Id="Back" Type="PushButton" X="156" Y="243" Width="56" Height="17" Text="Back">
        <Publish Event="NewDialog" Value="DirDialog">1</Publish>
      </Control>

    </Dialog>
  </UI>
</Fragment>

我是Wix的新手。非常感谢你帮助我。

1 个答案:

答案 0 :(得分:0)

如果我理解正确你需要一个控制器,它是一个id ='Next'的控制器,并且键入='PushButton',点击它后你将进入下一个对话框