Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt 5.5 and Qt Installer Framework 2.0.1: Logo is not displayed despite being present in config.xml

I have written an installer for my application using the precompiled Qt Installer Framework binaries, version 2.0.1. However, the Installer window will not display any of my logos in any of the possible ways.

The logo in question is named "installerlogo.png", a 64x64 image with an alpha channel, located at the top of the installer directory structure (same directory as where config/ and packages/ directories are located.)

I made another logo for the purposes of an icon, named "installericon.ico", which is just a 16x16 version of the above, simply renamed to ".ico" (Is this the wrong way to do it?)

I've tried the following in the config.xml file:

<InstallerApplicationIcon>installericon</InstallerApplicationIcon>
<InstallerWindowIcon>installerlogo</InstallerWindowIcon>
<Logo>installerlogo.png</Logo>
<Background>installerlogo.png</Background>

But none yield any visual results.

like image 231
Maxim Blinov Avatar asked Sep 05 '15 14:09

Maxim Blinov


2 Answers

After researching some more on the internet about the framework, I now see that all together I had made several mistakes.

  • First, simply changing the .png to .ico does not work - the whole point of the .ico format, as I have discovered, is to be able to store multiple resolutions of the same image, to prevent it looking blurry when enlarged in file explorer. Solution: http://www.icoconverter.com/ - this website allows one to create a fully-ranged ico file from a single png.

  • Secondly, the ico's do not go in the top-most directory - they should be put in the same directory as the config.xml file

  • Thirdly, one should not specify filename extensions for the icon file in the config.xml tags, e.g. "myicon.ico" - this is done as needed when the file is parsed. EDIT: Note however, that elsewhere you do need to specify extensions, e.g. when using the <Watermark> tag or the like.

  • Fourthly, one needs to define the <WizardStyle> to be either "Modern", "Classic, "Mac", or "Aero" (without the quotes) to enable specific features - I forget which now, but some of the xml flags do nothing if, for example, <WizardStyle> is "Classic". I've set mine to <WizardStyle>Modern</WizardStyle> and so far everything works.

  • And, lastly, some of the tags only make sense to be used in conjunction with an installscrip.qs file. Although this did not hinder me specifically, there's that to watch out for too.

like image 166
Maxim Blinov Avatar answered Sep 28 '22 01:09

Maxim Blinov


Apart from the excellent points Maxim indicated above, here is a very important thing. I have been breaking my head for the past 2 hours because of this issue. Adding it, so that it is of help to someone.

Windows has some sort of caching for the .exe icon images (based on the exe name and folder location)

Let's say the first time you generated the Installer exe without the image (maybe you didn't have the image set or you had an incorrect image setting in the config). Now the second time when you generate the exe, this time with the image correctly set in the config, to the same folder location with the same name for the exe, the exe will still have the old(default) image.

If you copy the exe to a different folder location, the image will magically appear for the exe. Else you should be generating the exe with a different name in your second attempt, for the changed image to reflect.

like image 37
Boney Avatar answered Sep 28 '22 01:09

Boney