2

我正在使用WixEdit为我们的应用程序创建安装。我正在考虑创建一个自定义对话框以放入 UI 序列中,该序列允许安装程序输入一些配置,这些配置进入.config与可执行文件一起安装的文件中。

但是,我在定义 UI 序列时遇到了一些麻烦。我创建了一个带有文本和编辑字段的简单对话框。我想在ProgressDlg.

我在 WXS 文件中有以下 XML:

<UI>
    <Dialog Id="ProductConfigurationDialog" Width="370" Height="270" Title="[ProductName] Setup">
        <Control Type="Text" Id="TextServerName" Width="60" Height="17" X="8" Y="15" Text="OPC Server:" />
        <Control Type="Edit" Id="EditServerName" Width="151" Height="15" X="79" Y="15" Text="[SERVERNAME]" />
    </Dialog>
    <InstallUISequence>
        <Show Dialog="FatalError" OnExit="error" />
        <Show Dialog="UserExit" OnExit="cancel" />
        <Show Dialog="ExitDialog" OnExit="success" />
        <Show Dialog="PrepareDlg" After="LaunchConditions" />
        <Show Dialog="WelcomeDlg" After="MigrateFeatureStates"><![CDATA[NOT Installed]]></Show>
        <Show Dialog="ResumeDlg" After="WelcomeDlg"><![CDATA[Installed AND (RESUME OR Preselected)]]></Show>
        <Show Dialog="MaintenanceWelcomeDlg" After="ResumeDlg"><![CDATA[Installed AND NOT RESUME AND NOT Preselected]]></Show>
        <Show Dialog="ProductConfigurationDialog" After="MaintenanceWelcomeDlg" />
        <Show Dialog="ProgressDlg" After="ProductConfigurationDialog" />
    </InstallUISequence>
</UI>

所以我的自定义对话框叫做 ProductConfigurationDialog。我已经从 UISample.wxs 复制了 InstallUISequence,但我收到以下错误。

C:\delivery\Dev\wix30_public\src\ext\UIExtension\wixlib\FatalError.wxs(29) : error LGHT0170 : The InstallUISequence table contains an action 'FatalError' that is declared in two different locations.  Please remove one of the actions or set the Overridable='yes' attribute on one of their elements.
D:\Sandbox\OPS Wix Install\SetupOPC\SetupOPC\QuorumOPCSetup.wxs(122) : error LGHT0171 : The location of the action related to previous error.
C:\delivery\Dev\wix30_public\src\ext\UIExtension\wixlib\UserExit.wxs(29) : error LGHT0170 : The InstallUISequence table contains an action 'UserExit' that is declared in two different locations.  Please remove one of the actions or set the Overridable='yes' attribute on one of their elements.
D:\Sandbox\OPS Wix Install\SetupOPC\SetupOPC\QuorumOPCSetup.wxs(123) : error LGHT0171 : The location of the action related to previous error.
C:\delivery\Dev\wix30_public\src\ext\UIExtension\wixlib\ExitDialog.wxs(33) : error LGHT0170 : The InstallUISequence table contains an action 'ExitDialog' that is declared in two different locations.  Please remove one of the actions or set the Overridable='yes' attribute on one of their elements.
D:\Sandbox\OPS Wix Install\SetupOPC\SetupOPC\QuorumOPCSetup.wxs(124) : error LGHT0171 : The location of the action related to previous error.
C:\delivery\Dev\wix30_public\src\ext\UIExtension\wixlib\PrepareDlg.wxs(35) : error LGHT0170 : The InstallUISequence table contains an action 'PrepareDlg' that is declared in two different locations.  Please remove one of the actions or set the Overridable='yes' attribute on one of their elements.
D:\Sandbox\OPS Wix Install\SetupOPC\SetupOPC\QuorumOPCSetup.wxs(125) : error LGHT0171 : The location of the action related to previous error.
C:\delivery\Dev\wix30_public\src\ext\UIExtension\wixlib\WelcomeDlg.wxs(29) : error LGHT0170 : The InstallUISequence table contains an action 'WelcomeDlg' that is declared in two different locations.  Please remove one of the actions or set the Overridable='yes' attribute on one of their elements.
D:\Sandbox\OPS Wix Install\SetupOPC\SetupOPC\QuorumOPCSetup.wxs(126) : error LGHT0171 : The location of the action related to previous error.
C:\delivery\Dev\wix30_public\src\ext\UIExtension\wixlib\ProgressDlg.wxs(60) : error LGHT0170 : The InstallUISequence table contains an action 'ProgressDlg' that is declared in two different locations.  Please remove one of the actions or set the Overridable='yes' attribute on one of their elements.
D:\Sandbox\OPS Wix Install\SetupOPC\SetupOPC\QuorumOPCSetup.wxs(130) : error LGHT0171 : The location of the action related to previous error.
C:\delivery\Dev\wix30_public\src\ext\UIExtension\wixlib\ResumeDlg.wxs(46) : error LGHT0170 : The InstallUISequence table contains an action 'ResumeDlg' that is declared in two different locations.  Please remove one of the actions or set the Overridable='yes' attribute on one of their elements.
D:\Sandbox\OPS Wix Install\SetupOPC\SetupOPC\QuorumOPCSetup.wxs(127) : error LGHT0171 : The location of the action related to previous error.
C:\delivery\Dev\wix30_public\src\ext\UIExtension\wixlib\MaintenanceWelcomeDlg.wxs(31) : error LGHT0170 : The InstallUISequence table contains an action 'MaintenanceWelcomeDlg' that is declared in two different locations.  Please remove one of the actions or set the Overridable='yes' attribute on one of their elements.
D:\Sandbox\OPS Wix Install\SetupOPC\SetupOPC\QuorumOPCSetup.wxs(128) : error LGHT0171 : The location of the action related to previous error.

如何在我的 UI 序列中包含额外的自定义对话框?

我刚刚开始使用 WiX,因此欢迎提供任何信息或解决方案。我正在使用最新版本的 WiX 3.6 和 WixEdit 0.7.5.0 来执行此操作。

4

0 回答 0