Can WixUiBannerBmp be set in a wixlib?
Currently I'm trying to move the WixUIBannerBmp, WixUIDialogBmp and WixUILicenseRtf WixVariables and t开发者_JAVA百科heir 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
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>
精彩评论