如何自定义 Wix 进度对话框?

发布于 2024-09-12 19:04:47 字数 617 浏览 1 评论 0原文

我正在尝试自定义标准 WiX 进度对话框(我想让它显示 ActionData)。我遵循了 Neil 的自定义对话框指南,但是问题是,原始的 ProgressDlg 仍然显示而不是我的。

我想我知道为什么:如果你看看 ProgressDlg 的源代码 您可以看到以下代码块:

   <InstallUISequence>
    <Show Dialog="ProgressDlg" Before="ExecuteAction" />
  </InstallUISequence>

因此,它不是像大多数对话框那样由另一个对话框发布,而是作为 InstallUISequence 的一部分直接触发。那么我该如何覆盖这个呢?

I'm trying to customise the standard WiX Progress Dialog (I want to make it show the ActionData). I've followed Neil's guide to customising dialogs but the trouble is, the original ProgressDlg is still being shown instead of mine.

I think I know why: if you look at the source to ProgressDlg you can see this block of code:

   <InstallUISequence>
    <Show Dialog="ProgressDlg" Before="ExecuteAction" />
  </InstallUISequence>

So rather than being published by another dialog, as most dialogs are, it is being triggered directly as part of the InstallUISequence. So how do I override this?

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

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

发布评论

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

评论(4

伪装你 2024-09-19 19:04:47

看来进度对话框必须是 InstallUISequence 中 ExecuteAction 之前的最后一件事 - 否则,因为进度对话框是无模式的,所以它会立即显示然后隐藏。

因此,我的解决方案只是确保我的自定义进度对话框显示在现有进度对话框之后:

  <InstallUISequence>
    <Show Dialog="CustomProgressDlg" After="ProgressDlg" />
  </InstallUISequence>

It seems that the progress dialog must be the last thing in the InstallUISequence before ExecuteAction - otherwise, because Progress Dialogs are modeless, it is shown then hidden straight away.

My solution therefore is just to make sure that my custom progress dialog is shown after the existing one:

  <InstallUISequence>
    <Show Dialog="CustomProgressDlg" After="ProgressDlg" />
  </InstallUISequence>
生生不灭 2024-09-19 19:04:47

@Samuel,它就像 Bob 所说的那样工作:“只要你不引用 ProgressDlg”,但这个声明并不准确。您需要找到对 ProgressDlg 的所有引用,但可以在 WiX 源代码中找到它们。然后,您需要创建您自己的任何对话框版本,该版本引用 ProgressDlg 并包含在您的设置中(直接或间接使用它!),以便使其也引用您的自定义对话框。

我已经尝试过这个来解决同样的问题。用于使用例如。在FeatureTree UI 序列中,除了ProgressDlg 之外,您还必须创建您自己的以下对话框版本:

  • MaintenanceWelcomeDlg
  • ResumeDlg
  • WelcomeDlg

这是因为它们定义了引用ProgressDlg 的Show 元素。

@Samuel, it is working as Bob said: "As long as you don't reference ProgressDlg" but this statement is not precise. You need to find all references to ProgressDlg, but find them in the WiX sources. Then you need to create your own version of any dialog which references the ProgressDlg and is included by your setup (direct or indirect use of it!), in order to make it also reference your customized dialog.

I have tried this to solve the same issue. For using eg. the FeatureTree UI Sequence you would have to create your own versions of the following dialogs in addition to the ProgressDlg:

  • MaintenanceWelcomeDlg
  • ResumeDlg
  • WelcomeDlg

This is because they define a Show element which is referencing ProgressDlg.

攀登最高峰 2024-09-19 19:04:47

ProgressDlg仅在您引用时才被调度。如果您想替换它,请自定义对话框序列以不引用 ProgressDlg。

ProgressDlg is scheduled only when you refer to it. If you want to replace it, customize your dialog sequence to not refer to ProgressDlg.

三岁铭 2024-09-19 19:04:47

@Klaus,幸运的是,您不必必须使用 v3.11.1 重新创建您自己的对话框版本。在 InstallUISequence 中,您可以覆盖对话框序列,例如

NOT Installed OR PATCH

确保您省略了 Show/@override - 这是来自 WelcomeDlg 的确切条件。

@Klaus, fortunately you don't have to re-create your own versions of the dialog with v3.11.1. In the InstallUISequence, you can override the dialog sequence e.g.

<Show Dialog="WelcomeDlg" Before="ProgressDlgCustom">NOT Installed OR PATCH</Show>

Make sure you omit the Show/@override - this was the exact condition from the WelcomeDlg.

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