可以在 wixlib 中设置 WixUiBannerBmp 吗? [英] Can WixUiBannerBmp be set in a wixlib?

查看:22
本文介绍了可以在 wixlib 中设置 WixUiBannerBmp 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

我的图书馆.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 文件的.

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?

谢谢

推荐答案

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

Managed to work this out myself! :)

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

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.

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

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.

<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>

这篇关于可以在 wixlib 中设置 WixUiBannerBmp 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆