LabWindows/CVI User Group Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Updated icon does not appear on the desktop

I am using CVI 7.0 running on Windows XP. Using CVI icon editor I've created an icon for my application. The intention is that at each release the icon will be edited to show the software version number. The project Target Settings point to the file and it appears in this window as proof that it has found it. I have also included it in a file group in the distribution kit settings (maybe not necessary ?). I create a dist kit and install it and all is fine with the icon appearing on the desktop and double clicking it runs the app. The problem is that if I then edit the icon in my project area and rebuild everything the old icon still appears on the desktop. I've not changed the GUID between builds so running the dist kit first removes the desktop icon and program installation, as it should. Running the dist kit again installs the new program version but the old icon. What is happening ?. Is it a CVI or a Windows problem ?.

If I view my work area using Windows Explorer I can see that the app .exe uses the old icon although the icon file itself shows the new version. My current workaround is to rename the icon file at each issue and change the Target Settings to point to the new file. This works fine but I'd rather not have to change the icon file name. What do I need to do to get the desktop to pick up the modified icon ?

TIA

0 Kudos
Message 1 of 5
(7,277 Views)

Hey Omega119 -

I just tried this on a couple of my machines, and had no problem with the icons updating.  I didn't have immediate access to a version of CVI older than 8.5 though - so there may be an issue with CVI 7.0 (major changes were made to the distribution building in CVI 8.0).  One thing you should try after altering your icon is going to the build menu, and selecting "Mark Project For Compilation".  This will force a rebuild of the CVI binary, updating the icon resource.  If the project has been recently built, and the only thing you change is the icon, this change will not be picked up, and the old icon resource will be used.

Let me know if that does not do it for you.

NickB

National Instruments

0 Kudos
Message 2 of 5
(3,553 Views)

NickB,

          I've tried that but it made no difference. I have previously received a reply from macaba (MarkB) at NI and he exactly reproduced the problem with CVI 9.0. He has reported it to R&D (# 187892) for further investigation. I'm confused if 7.0 and 9.0 show the problem and 8.5 doesn't. My solution for now will be to explicitly add the icon to the dist kit. When the app. is installed, the desktop icon properties will have to be changed manually to point to the one in the application directory. I'm still open to other ideas though.

Thank you for the interest.

Tom

0 Kudos
Message 3 of 5
(3,553 Views)

Hey Tom -

Sorry for the confusion, I actually ran my test with CVI 9.0.  I was just stating that the oldest I could have gone was 8.5, and because this was after the major change we did to the distribution editor, it was likely my results may not match yours.  I'll follow up with MarkB, but I have the feeling he did not do a full rebuild of his application like I mentioned in my previous post.

Today I got a clean machine adn installed CVI 7.0 on it, so that we could be on the same machine.  You are correct that marking the project for compilation is not good enough.  However, I found that if - prior to building the new dist kit - I deleted the cvibuild.<projectname> directory, the icon would be updated correctly following a fresh installation.  If you must continue to use CVI 7.0, this should be a clean workaround for you.  Please let me know if this is not the case.

NickB

National Instruments

0 Kudos
Message 4 of 5
(3,553 Views)

Nick,

        Thank you for that. Your suggestion does work for me. Based on your information, I further found that the minimum required action is to delete just "resources.res" from the cvibuild.<projectname> directory. Then select "Create Release Executable" (no need to mark project for compilation) then the icon can be seen to change in the Windows Explorer view of the <projectname>.exe file.

It is just as easy of course to delete the whole directory as you suggest but I just thought I would dig deeper.

Maybe a future release of CVI could automatically delete the directory to ensure a clean build ?

Thank you again.

Tom.

0 Kudos
Message 5 of 5
(3,553 Views)