Page 1 of 1

Using custom icons

Posted: Wed Jan 19, 2011 8:04 am
by NickDay
My installer is capable of installing several different versions of our product, tailored to different OEMs.
A previous (InstallAware 9) version of my installer had multiple blocks of code for creating desktop and taskbar shortcuts. In the Create Shortcut dialog, Icon File Path, I provided the path to each OEM's icon file to be used; this path is local to the machine where I build the installer. The installer, run on another PC, created the shortcut with the correct icon, indicating that the icon file had been _built_into_ my installer.

InstallAware 10 introduced the native engine, allowing variables to be used in the icon file path field. So I have used that, allowing me to delete my near-duplicate blocks of code for each OEM. Excellent.

The installer creates shortcuts with the correct icon when run on my PC, which I used to make the installer.
However when I run it on another PC, the shortcuts have white icons.
The shortcut's properties indicate that the path for the icon is the local path on my PC.
So now, with the native engine and using a variable in the icon path, it appears that my icons are not being built into my installer.

Is this the expected behaviour, and if so can someone suggest a workaround, please? Or is this a bug in IA 10, native engine? I expect it's to do with exactly when the string is 'cooked' and the variables are interpreted. In order for it to work as I need, that would have to be done at the time my installer is being built.

Thanks for any advice.

Re: Using custom icons

Posted: Wed Jan 19, 2011 11:01 am
by giaviv
Dear NickDay,

When you say:
allowing variables to be used in the icon file path field. So I have used that
What do you mean? Which variables did you use and which path did you specify?
For example, the Icon File Path field in the Create Shortcut command should point to a path on the target system - therefore, your local path will not work. What you should do is copy your icons by, e.g, adding them to your support files or installing them to your TARGETDIR. Then, the path you will specify will be something like $TARGETDIR$\1.ico.

Am I understanding the problem correctly?

Re: Using custom icons

Posted: Mon Jan 24, 2011 7:41 am
by NickDay
Thanks for the quick reply, Aviv. I am part-time, hence the delay in my reply.

In more detail, to answer your question.
My original installer used the Windows installer engine. It called Create Shortcut, providing Icon File Path
Q:\Installs.Coho\Custom Stuff\XiFlow\ForIAinstaller\Client.ico
this 'Q' path is local to my machine, where I am building the installer. But I believe the icon was installed correctly when the installer was run on another PC.

I then swapped over to the Native Engine in InstallAware 10. At the same time I swapped to calling Create Shortcut, providing Icon File Path
Q:\Installs.Coho\Custom Stuff\$XitronCustomStuffName$\ForIAinstaller\Client.ico
where $XitronCustomStuffName$ contains 'XiFlow' (without the quotes).
Now the shortcut is created with a blank icon, when I run the installer on a machine other than my own.

So it appears to me that in the first case, InstallAware is building the icon into the installer, but in the second case (new Native Engine) it is not.

I hope that is clearer and answers your question.

I hope to have an opportunity to experiment with this tomorrow, and to be able to determine whether the cause is a) using the Native Engine or b) using a variable. My guess is that when I use a variable in the path, the path is only processed at runtime, not when building the installer. Anyway you have given me an idea for overcoming the problem (install the icon on the target) -- thank you.

Regards,

Nick

Re: Using custom icons

Posted: Mon Jan 24, 2011 1:16 pm
by giaviv
Dear Nick,

Sure! Good luck with it.

Re: Using custom icons

Posted: Tue Jan 25, 2011 6:44 am
by NickDay
That's working fine, copying the files to the target first.
Thanks,
Nick

Re: Using custom icons

Posted: Tue Jan 25, 2011 5:38 pm
by giaviv
Great! Good luck