How should I update a project resource?

I have modified an image but the previous one remains in the application, I have tried to rebuild the code but I cannot get it to update the modification. The only way I have found is to delete the resource from Projucer and add it back.

ProJucer exports the image data to the BinaryData… so if you change a resource you need to re-export from ProJucer.

If the resource is in the same location you don’t have to remove and re-add it to the ProJucer project.

Rail

1 Like

Yes, I realized that I shouldn’t save the project, but the image file. or “save all”.

I can do it semi-automatically through a bat file with:
c:\juce\projucer.exe --resave MyProject.jucer

Now I’m trying to make it fully automatic when exporting the image from Inkscape by calling the bat file, but it doesn’t seem to be possible. Perhaps it could be done from Visual Studio, but I see that it does not detect the change in the image if it is not open in a tab.

Since Projucer is running the BinaryBuilder (which reads the files and writes out the BinaryData.cpp files), VisualStudio cannot do it by itself.

In case of cmake I am a bit annyed, that there is no dependency added from the BinaryData.cpp to depend on the image files. Instead I have to delete the whole cmake folder…
If that was done properly, VisualStudio would even create a correct build with no roundtrip when a binary resource is changed.