Using custom icons

Got a problem you cannot solve? Try here.
Post Reply
NickDay
Posts: 145
Joined: Tue Oct 05, 2010 9:13 am

Using custom icons

Post 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.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Using custom icons

Post 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?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
NickDay
Posts: 145
Joined: Tue Oct 05, 2010 9:13 am

Re: Using custom icons

Post 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
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Using custom icons

Post by giaviv »

Dear Nick,

Sure! Good luck with it.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
NickDay
Posts: 145
Joined: Tue Oct 05, 2010 9:13 am

Re: Using custom icons

Post by NickDay »

That's working fine, copying the files to the target first.
Thanks,
Nick
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Using custom icons

Post by giaviv »

Great! Good luck
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply