WixUiBannerBmp 可以在 wixlib 中设置吗?

发布于 2024-11-15 14:32:57 字数 511 浏览 7 评论 0原文

目前,我正在尝试将 WixUIBannerBmp、WixUIDialogBmp 和 WixUILicenseRtf WixVariables 及其相应的二进制文件移动到 wixlib。不幸的是,在构建时它会忽略这些并使用默认值。

我的Library.wxs:

<Fragment>
    <WixVariable Id="WixUILicenseRtf" Value="licence.rtf" />
    <WixVariable Id="WixUIBannerBmp" Value="binaries/bannrbmp.bmp" />
    <WixVariable Id="WixUIDialogBmp" Value="binaries/dlgbmp.bmp" />
</Fragment>

其中rtf和bmp文件包含在wixlib项目中,并且路径相对于Library.wxs文件。

任何人都知道为什么这不起作用?

谢谢

Currently I'm trying to move the WixUIBannerBmp, WixUIDialogBmp and WixUILicenseRtf WixVariables and their corresponding binary files to a wixlib. Unfortunately when building it ignores these and uses the defaults.

My Library.wxs:

<Fragment>
    <WixVariable Id="WixUILicenseRtf" Value="licence.rtf" />
    <WixVariable Id="WixUIBannerBmp" Value="binaries/bannrbmp.bmp" />
    <WixVariable Id="WixUIDialogBmp" Value="binaries/dlgbmp.bmp" />
</Fragment>

where the rtf and bmp files are included in the wixlib project and the paths are relative to the Library.wxs file.

Anyone have any ideas why this isn't working?

Thanks

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

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

发布评论

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

评论(1

七度光 2024-11-22 14:32:57

我自己设法解决了这个问题! :)

首先,除非明确引用某些内容,否则该片段不会自动包含到主 Product.wxs 中。在本例中,我使用 ARPProductICON 属性。如果您没有任何可以使用的东西,您可以添加一个永远不会使用的虚拟属性。

此外,二进制文件的路径将不正确,因为该路径将相对于 Product.wxs 文件。因此,您需要使用 Preprocessor 变量到当前项目路径。

产品.wxs

<Wix>
    <PropertyRef Id="ARPPRODUCTICON" />
</Wix>

库.wxs

<Fragment>

    <WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)\adastra-licence.rtf" />
    <WixVariable Id="WixUIBannerBmp" Value="$(var.ProjectDir)\Bitmaps\bannrbmp.bmp" />
    <WixVariable Id="WixUIDialogBmp" Value="$(var.ProjectDir)\Bitmaps\dlgbmp.bmp" />

    <Property Id="ARPPRODUCTICON" Value="icon.ico" />
    <Icon Id="icon.ico" SourceFile="$(var.ProjectDir)/App.ico"/>

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

Managed to work this out myself! :)

Firstly the fragment is not automatically included into the main Product.wxs unless something is explicitly referenced. In this case I'm using the ARPPRODUCTICON property. If you don't have anything that you can use you can just add a dummy property that will never be used.

Also the paths to the binaries will then be incorrect as the path will be relative to the Product.wxs file. Therefore you need to use the Preprocessor variable to the current project path.

Product.wxs

<Wix>
    <PropertyRef Id="ARPPRODUCTICON" />
</Wix>

Library.wxs

<Fragment>

    <WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)\adastra-licence.rtf" />
    <WixVariable Id="WixUIBannerBmp" Value="$(var.ProjectDir)\Bitmaps\bannrbmp.bmp" />
    <WixVariable Id="WixUIDialogBmp" Value="$(var.ProjectDir)\Bitmaps\dlgbmp.bmp" />

    <Property Id="ARPPRODUCTICON" Value="icon.ico" />
    <Icon Id="icon.ico" SourceFile="$(var.ProjectDir)/App.ico"/>

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