How to know what images are used in an app?

and you have a line that says

// my picture is somePictureIDraggedIntoTheProject
dim s as string="bevelbutton1.bacground = somePictureIDraggedIntoTheProject"

then it will find it 4 places, and two of them are false… one of us is totally missing something here

Yes, if you search for a value it may occur in places that are not uses but at least the search function does put an icon near them that indicates if they are in comments etc.

Maybe the best way is to rename and then build for all relevant targets.

None of these are perfect but they are the best ideas that I know of…

Just white-boarding, but how about this (depends on saving as text):

Open the .xojo_project file and create a list of all Picture= entries getting just the filename (I use the cut and basename commands)
Do the same for all of the .xojo_image files
Then, for each image name in that list, grep the project files for that exact name match
Names not found are not used

[quote=405131:@Tim Jones]Just white-boarding, but how about this (depends on saving as text):

Open the .xojo_project file and create a list of all Picture= entries getting just the filename (I use the cut and basename commands)
Then, for each image name in that list, grep the project files for that exact name match
Names not found are not used[/quote]
I am working on an app right now that does exactly that… it looks up all the identifiers and block ID #'s then scans the XML for references to either one for each resource detected…

except I hope to find ALL Resources (text files, images etc)… but it seems that a DATABASE is stored strangely… but otherwise I seem to be finding all the bits required.

Ok… check this out… it may not be perfect (I threw it together in the past few hours)… .and it may not find EVERYTHING (if it doesn’t let me know)…

but here is the source code for what I created… compile it, drag an XML Xojo project to it, and it will write a HTML page on the desktop with the results … All discovered resources and # of times it thinks they were used. (including as Canvas Backdrops)

www.rdS.com/xojo_resources.xojo_xml_project.zip

donations accepted :slight_smile:

guess this topic went from hot to cold :slight_smile:

Nice.

I cannot believe I have some entries at 0, but nice.