Quantcast
Channel: wixsharp Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1354

New Post: Problems with BackgroundImage and BannerImage

$
0
0
Hi,

i have some problems with the path of BackgroundImage and BannerImage (WixSharp.1.0.29.0).

I created a new C# console project with VS 2013. Some code lines:
// ...

project.ManagedUI.InstallDialogs.Add(Dialogs.Welcome)
                                .Add(Dialogs.Licence)
                                .Add(Dialogs.InstallDir)
                                .Add(Dialogs.Progress)
                                .Add(Dialogs.Exit);

project.SourceBaseDir = @"C:\Users\Master\Desktop\input"; //Test.exe, readme.txt,...
project.OutDir = @"C:\Users\Master\Desktop\output"; //Test.msi

project.ControlPanelInfo.ProductIcon = @"Resources\icon.ico";
// ...
project.LicenceFile = @"Resources\Licence.rtf"; 
project.BackgroundImage =  @"Resources\SetupDialog.bmp";
project.BannerImage = @"Resources\SetupBanner.bmp";
// ...
project.PreserveTempFiles = true;
The files in the "Resources" folder are included in the VS project (not in SourceBaseDir, OutDir).
My images for the background and banner are not shown in the setup dialog. The license is shown correctly.

I selected the option "Copy to Output Directory: Copy Always" in VS for all files but that does not solve the problem with the BackgroundImage/BannerImage.
After that i copied the "Resources" folder to the input and output directory and built the Test.msi again. But it did not help.

I also tried to set a absolute path:
String pathOfProgram = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(typeof(Program)).Location);
project.BannerImage = System.IO.Path.Combine(pathOfProgram, @"Resources\SetupBanner.bmp");
I checked the path in generated *.wxs:
<WixVariable Id="WixUIBannerBmp" Value="C:\Users\Master\Desktop\Test\Test.Setup\bin\Debug\Resources\SetupBanner.bmp" />
...
<Binary Id="WixUI_Bmp_Banner" SourceFile="..\output\Test.dialog_banner.png" />
The path "C:\Users\Master\Desktop\Test\Test.Setup\bin\Debug\Resources\SetupBanner.bmp" is correct. A Test.dialog_banner.png is created in the output folder but it is not my image, it is the default one. hmmm... :-(

Can someone help me?

Viewing all articles
Browse latest Browse all 1354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>