I’m trying to figure out a reasonable strategy for storing & editing some data structures. My data structure has a couple of float arrays and a few other float variables. My plugin will end up with a few dozen of these.
While I’m developing this plugin, it makes sense for me to store/load/edit these as XML files so I can use other tools to edit them, but at some point I want them to be internal to the plugin without loading them from disk.
I do something similar for my graphics artist… I have a Layout class which reads from comma delimited files… You should put the external files in your Resources folder – on macOS that’s inside the plug-in’s bundle… and on Windows it’s in the AppData Roaming path for the plug-in… next to the settings. (On Windows your installer will have to put the Resources in the correct location).
If you no longer wish to use the external files you can embed them in the code as Binary Data.
but to be honest, I haven’t used it myself in a while, since the layouts I had recently were too simple.
The editor is kind of unfinished, but the layout works stable… it predates Grid and FlexBox in JUCE…
I am building a .vst plugin on MAC. If I am adding the data bin files in projucer as resource file,
Do I need to manually copy these files to resource folder?
Assuming that I am reading from data.bin file, and if the file is present in resource folder, what path to file should I give in my CPP file which reads from data.bin file?
Thanks Daniel this will definitely help, a follow-up question,
In my application, I am generating this code from software like MATLAB, and then I am using JUCE to build it and I am not allowed to write my own code, I am allowed to just edit Projucer fields and options.
This generated code takes the path from a c++ macro PATH_TO_BIN_FILES, I was puzzled what value of this MACRO should be set in order to read these files successfully. I wanted to know the relative path to resource folder.