Can WixUiBannerBmp be set in a wixlib?

三世轮回 提交于 2019-12-24 10:29:43

问题


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


回答1:


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>


来源:https://stackoverflow.com/questions/6342442/can-wixuibannerbmp-be-set-in-a-wixlib

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!