LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

My edited icon does not supersede the previous version on the desktop

Solved!
Go to solution

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 ?

0 Kudos
Message 1 of 7
(6,161 Views)

Hello,

 

I have given this a go myself, here are the steps I did:

 

Steps:

  1. Create a simple project
  2. Create icon 1.
  3. Set Target settings to use Icon 1.
  4. Build Executable (Notice that executable has Icon 1 as the icon).
  5. Build Distribution with shortcut on desktop
  6. Run Installer on second machine
  7. Notice that the desktop has a shortcut with Icon 1 as the icon
  8. Modify Icon 1 as Icon 2, but keep the filename the same.
  9. Rebuild the executable
  10. Notice that the executable still has Icon 1 as the icon
  11. Build a Distribution
  12. Run the installer on the second machine.
  13. Notice that the shortcut on the desktop has Icon 2 (the new icon) as the icon.
I used LabWindows/CVI 9.0.

 

This was reported to R&D (# 187892) for further investigation.

0 Kudos
Message 2 of 7
(6,095 Views)

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.

0 Kudos
Message 3 of 7
(6,086 Views)
My apologies- step 13 IS wrong. I meant to say that the icon was still the same as the old one Smiley Happy
0 Kudos
Message 4 of 7
(6,084 Views)
Solution
Accepted by topic author Omega119

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.

0 Kudos
Message 5 of 7
(6,042 Views)
Thanks for letting me know! I will be updating my notes to R&D.
Message 6 of 7
(6,039 Views)

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  

0 Kudos
Message 7 of 7
(6,014 Views)