WiX 中的新对话框,单击“后退”会跳过该对话框

发布于 2024-10-02 18:29:47 字数 1781 浏览 0 评论 0原文

我是 WiX 的新手,正在尝试通过添加新对话框来自定义对话框队列。新对话框的名称为 ServerChoice,流程为:

SetupTypeDlg <->完整或典型<->服务器选择<-> verifyReadyDlg

SetupTypeDlg <->定制<->自定义Dlg <->服务器选择<-> verifyReadyDlg

唯一的问题是在第一种情况下的VerifyReadyDlg。 “返回”将我带到 SetupTypeDlg 并跳过 ServerChoice,尽管在第二个流程中它按要求工作。

来源:

<UI>
        <DialogRef Id="ServerChoice" />
        <Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="NewDialog" Value="ServerChoice">1</Publish>
        <Publish Dialog="SetupTypeDlg" Control="CompleteButton" Event="NewDialog" Value="ServerChoice">1</Publish>
        <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ServerChoice">1</Publish>
        <Publish Dialog="ServerChoice" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
        <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ServerChoice">1</Publish>
        <Publish Dialog="ServerChoice" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="1">WixUI_InstallMode = "InstallCustom"</Publish>
        <Publish Dialog="ServerChoice" Control="Back" Event="NewDialog" Value="SetupTypeDlg" Order="2">WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete"</Publish>
        <Publish Dialog="ServerChoice" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="3">WixUI_InstallMode = "Change"</Publish>
        <Publish Dialog="ServerChoice" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="4">WixUI_InstallMode = "Repair" OR WixUI_InstallMode = "Remove"</Publish>
    </UI>

对新手有帮助吗? :)

I'm newbie in WiX and trying to customize dialog queue by adding the new one. The new dialog's name is ServerChoice and the flow is:

SetupTypeDlg <-> Full or Typical <-> ServerChoice <-> VerifyReadyDlg

or

SetupTypeDlg <-> Custom <-> CustomizeDlg <-> ServerChoice <-> VerifyReadyDlg

The only problem is in the first case at VerifyReadyDlg. 'Back' takes me to SetupTypeDlg and skips ServerChoice although in the second flow it works as required.

Source:

<UI>
        <DialogRef Id="ServerChoice" />
        <Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="NewDialog" Value="ServerChoice">1</Publish>
        <Publish Dialog="SetupTypeDlg" Control="CompleteButton" Event="NewDialog" Value="ServerChoice">1</Publish>
        <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ServerChoice">1</Publish>
        <Publish Dialog="ServerChoice" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
        <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ServerChoice">1</Publish>
        <Publish Dialog="ServerChoice" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="1">WixUI_InstallMode = "InstallCustom"</Publish>
        <Publish Dialog="ServerChoice" Control="Back" Event="NewDialog" Value="SetupTypeDlg" Order="2">WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete"</Publish>
        <Publish Dialog="ServerChoice" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="3">WixUI_InstallMode = "Change"</Publish>
        <Publish Dialog="ServerChoice" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="4">WixUI_InstallMode = "Repair" OR WixUI_InstallMode = "Remove"</Publish>
    </UI>

Some help for a newbie? :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

山有枢 2024-10-09 18:29:47

您引用的 UI 类型是什么(Mondo?)。此信息不存在于您的代码中。我认为爸爸的评论是正确的,您可能有多个后退按钮事件,因为 Mondo 本身在该按钮单击事件上挂钩了自己的“处理程序”。

我最近创建了一个自定义 UI 对话框流程,我的方法根本没有引用 WiXUI_Mondo。相反,我基于 Mondo 源代码创建了自己的新 UI(您必须检查 WiX 源代码)。最后我得到了这段代码(不相关的代码部分已被删除)并且它工作正常。

<代码>

<Fragment>  
    <!-- this is based on the WixUI_Mondo dialog set -->
    <UI Id="WixUI_MyNewUI">
        <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="Mondo" />

        <DialogRef Id="ErrorDlg" />
        <DialogRef Id="FatalError" />
        <DialogRef Id="FilesInUse" />
        <DialogRef Id="MsiRMFilesInUse" />
        <DialogRef Id="PrepareDlg" />
        <DialogRef Id="ProgressDlg" />
        <DialogRef Id="ResumeDlg" />
        <DialogRef Id="UserExit" />

        <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="CustomizeDlg">1</Publish>
        <!-- we do not use the SetupTypeDlg which allows user to choose either Typical, Complete or Custom installation; this ensures InstallCustom schema is run -->
        <Publish Dialog="WelcomeDlg" Control="Next" Property="WixUI_InstallMode" Value="InstallCustom" Order="2">1</Publish>

        <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">WixUI_InstallMode = "InstallCustom"</Publish>
        <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="MyDlg1">1</Publish>

        <Publish Dialog="MyDlg1" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="1">MY_CONDITION_PROPERTY = 0</Publish>
        <Publish Dialog="MyDlg1" Control="Next" Event="NewDialog" Value="MyDlg2" Order="2">MY_CONDITION_PROPERTY = 1</Publish>

        <Publish Dialog="MyDlg2" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="1" />
        <Publish Dialog="MyDlg2" Control="Back" Event="NewDialog" Value="MyDlg1">1</Publish>


        <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MyDlg1" Order="1">WixUI_InstallMode = "InstallCustom" and MY_CONDITION_PROPERTY = 0</Publish>
        <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MyDlg2" Order="2">WixUI_InstallMode = "InstallCustom" and MY_CONDITION_PROPERTY = 1</Publish>      
    </UI>

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

<代码>

What type of UI are you referencing (Mondo?). This information is not present in your piece of code. I think daddyman's comment is right, you probably have multiple events for that Back button, since Mondo itself hooks its own 'handlers' on this button-click event.

I have created a custom UI dialog flow recently and my approach was not referencing WiXUI_Mondo at all. Instead of it, I created my own new UI based on Mondo source code (you have to check WiX sources). At the end I have this code (irrelevant code parts have been removed) and it works fine.

<Fragment>  
    <!-- this is based on the WixUI_Mondo dialog set -->
    <UI Id="WixUI_MyNewUI">
        <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="Mondo" />

        <DialogRef Id="ErrorDlg" />
        <DialogRef Id="FatalError" />
        <DialogRef Id="FilesInUse" />
        <DialogRef Id="MsiRMFilesInUse" />
        <DialogRef Id="PrepareDlg" />
        <DialogRef Id="ProgressDlg" />
        <DialogRef Id="ResumeDlg" />
        <DialogRef Id="UserExit" />

        <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="CustomizeDlg">1</Publish>
        <!-- we do not use the SetupTypeDlg which allows user to choose either Typical, Complete or Custom installation; this ensures InstallCustom schema is run -->
        <Publish Dialog="WelcomeDlg" Control="Next" Property="WixUI_InstallMode" Value="InstallCustom" Order="2">1</Publish>

        <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">WixUI_InstallMode = "InstallCustom"</Publish>
        <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="MyDlg1">1</Publish>

        <Publish Dialog="MyDlg1" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="1">MY_CONDITION_PROPERTY = 0</Publish>
        <Publish Dialog="MyDlg1" Control="Next" Event="NewDialog" Value="MyDlg2" Order="2">MY_CONDITION_PROPERTY = 1</Publish>

        <Publish Dialog="MyDlg2" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="1" />
        <Publish Dialog="MyDlg2" Control="Back" Event="NewDialog" Value="MyDlg1">1</Publish>


        <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MyDlg1" Order="1">WixUI_InstallMode = "InstallCustom" and MY_CONDITION_PROPERTY = 0</Publish>
        <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MyDlg2" Order="2">WixUI_InstallMode = "InstallCustom" and MY_CONDITION_PROPERTY = 1</Publish>      
    </UI>

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

记忆消瘦 2024-10-09 18:29:47

我认为从你的片段来看,你正试图在一个只是 UI 部分中做到这一点,但我认为这是不可能的。看看这里 http://neilsleightholm.blogspot.com/2008 /08/customized-uis-for-wix.html 我认为它应该有帮助。

I think from your fragment that you are trying to do it in a just UI section and I don't believe that is possible. Take a look here http://neilsleightholm.blogspot.com/2008/08/customised-uis-for-wix.html I think it should help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文