09-10-2009 04:05 AM
I am using CVI 7.0 on Windows XP. I have used the CVI icon editor to create a 32x32 icon for my app. The Target Settings build window points to the icon file and displays it correctly. I have also created a file group in the Create Distribution Kit window and the group only contains the .exe with the Create Shortcuts option set to Desktop. I build the dist kit and install it and all is well. The icon appears on the desktop and it launches the app.
The problem arises when I edit the icon file. The edited version appears in the Target Settings window (okay so far) but when I rebuild the dist kit and install it, the old desktop icon is not superseded by the new one although the old icon still launches the latest version of the app. I haven't changed the GUID between builds so running dist kit setup.exe first removes the previous version of the app and its desktop icon. The second run of setup.exe installs the new app. version but the old icon.
If I change the icon file name each time then the correct icon does appear on the desktop. However I would rather use a generic icon file name for each release. It's as if CVI or Windows associates the first version of an icon with the app. and remembers it until the association is updated by using a different icon file name.
So the question is, how do I ensure the latest version of the icon appears on the desktop by not having to change the file name each time ?
Solved! Go to Solution.
09-21-2009 08:34 AM
Hello,
I have given this a go myself, here are the steps I did:
Steps:
This was reported to R&D (# 187892) for further investigation.
09-21-2009 11:06 AM
Thank you for the only reply to date. I agree with all steps except the last. I still get icon 1 on the desktop. Were you using XP ?.
Maybe CVI 7.0 is part of the problem since you seemed to get a better result with 9.0.
The only solution may be to explicitly add the icon file to the distribution kit. Once the installer has run, the shortcut properties can be changed to point to the new icon. It's not the ideal solution but it's a solution. I'll wait and see if anyone else has an idea but it's not looking likely.
Thank you Mark.
09-21-2009 11:09 AM
09-25-2009 04:03 AM
Mark,
I have received a solution from nickb. This can be found at http://decibel.ni.com/content/message/8480#8480. I'm new to these forums so I don't know why it seems to be in a different area to your response, unless I somehow posted the original question in two areas. Anyway, in case there is something wrong with the link, the solution is to delete the cvibuild.<project> directory then recompile the project. I further found that deleteing the resources.res file was sufficient. As I said to nickb, it would be good if CVI deleted this directory automatically to ensure a clean build every time.
Thank you for your time.
Tom.
09-25-2009 04:40 AM
09-25-2009 09:06 AM
Hey Tom -
Just FYI - the reason we do not delete this folder every time is because a full rebuild would then be required every time. This would be a major development headache for anyone with a medium to large sized project. In current versions of CVI, we do rebuild the resource file if any other parts of the project need to be rebuilt though (ie if a source file has changed). This way, the only way you would need to perform these manual steps is if the only thing that had changed in your project since your last build was the icon you were using.
NickB
National Instruments