代码之家  ›  专栏  ›  技术社区  ›  Susumu Arai

Wix3:Show元素的可重写属性被忽略?

  •  0
  • Susumu Arai  · 技术社区  · 8 年前

    我正在使用Wix3.11并尝试自定义ExitDialog。对话框的源代码(wix3-wix31rtm.zip中的ExitDialog.wxs)使用以下语句调度此对话框:

    <Show Dialog="ExitDialog" OnExit="success" Overridable="yes" />
    

    因此,我将这个文件作为MyExitDialog复制到本地目录。wxs,将对话框Id从ExitDialog重命名为MyExitDialog,并计划此对话框:

    <Show Dialog="MyExitDialog" OnExit="success" />
    

    但是,当我运行light时,我得到了以下错误:

    MyExitDialog.wxs(37): error LGHT1050: The AdminUISequence table contains actions 'MyExitDialog' and 'ExitDialog' which both have the same sequence number -1.  Please change the sequence number for one of these actions to avoid an ICE warning.
    C:\build\work\eca3d12b\wix3\src\ext\UIExtension\wixlib\ExitDialog.wxs(29): error LGHT1051: The location of the action related to previous warning.
    

    我原以为MyExitDialog的show元素会覆盖原始ExitDialog的show元素,但它不是这样工作的。

    我是否误解了可重写属性的工作原理?或者,我看到的是错误的ExitDialog吗。wxs文件?

    1 回复  |  直到 8 年前
        1
  •  1
  •   Brian Sutherland    8 年前

    <UIRef Id="WixUI_Minimal"/>
    

    在您的安装中。您需要找到相关的UI文件( here <UI Id="..."> 标记从“WixUI_Minimal”到其他内容(例如)。

    <Show Dialog="ExitDialog" OnExit="success" Overridable="yes" />
    

    <Show Dialog="MyExitDialog" OnExit="success" />
    

    现在在你的 <Product> 更新 <UIRef>

    可重写标记包含以下文本

    如果“是”,此对话框的顺序可能会被其他位置的顺序覆盖。

    <Show Dialog="ExitDialog" Sequence="55" Overridable="yes"/> 
    (or Before="..." or After="..." or OnExit="...")
    

    并且不会得到任何重新定义错误,因为它被标记为可重写。

    <Show> 标签均带有 OnExit="success"

    推荐文章