I currently have for ~70MB source code in BinaryData.cpp (images, impulse responses, texts), which makes this file highly undigestible for the compiler (huge memory load, RAM full, system unresponsive, hangs, some system services even crash!).
In another project I have (removed some unused resources and) split the remaining ones by-hand into multiple files, and it compiles just fine (far from reaching the RAM limit) however I can’t do that and maintain the resources while still using the Introjucer for managing the project.
Could it be possible, in the Introjucer, to split the resources into multiple .cpp? I think either:
of a general BinaryData.h and multiple .cpp like BinaryData0.cpp, BinaryData1.cpp, BinaryData2.cpp, … (one for each resource, or a pool and round robinning between them) or
of specifying on the ressource raw, beside the “Add to Binary Resources” checkbox, a combobox for choosing the file index we would like…
maybe other options…
Do you have alternative ideas? Or a better implementations of this idea?
(And ideas are not all, we need implementations )
PS: or BinaryData_<IntroJucer_FILE_id>.cpp where “IntroJucer_FILE_id” is the id of the file we can find in the .jucer xml file.
The Introjucer has done exactly that for a while now, it splits the BinaryData.cpp file into around 10MB files with a common header. Try grabbing the tip, building the latest version and re-saving your project.
Well, as I need to share the hack of the max BinaryData file size, attached is a working patch in order to serialize this value at the project level. This is only implemented for plug-in projects, but I think Jules knows better than me how to factorize what needs to be factorized.
Maybe one last feature: “one binarydata cpp per resource”. I think it can easily be implemented by setting the max file size to 0 byte. But I don’t know if it’s so useful, though.