[SOLVED] Standard Way of Storing Necessary Files for Plug-in?


#1

Hey all,

I’ll soon be developing a synth-sampler that will require access to a directory of wav files that can be selected by the end-user. My question is, what is the standard for installing support files for a plug-in in a way that’s cross-platform compatible?

Or I guess, more specifically to my JUCE coding- how can I set a directory variable dependent on what platform I’m on? Install location of support files is likely to be different on Windows than Mac, per example.


#2

Have a look at File::SpecialLocationType, you can use e.g. File::getSpecialLocation()
File myData = File::getSpecialLocation (File::commonApplicationDataDirectory).getChildFile ("MyCompany");
or similar.


#3

…and, to deploy those files to the correct location when the user installs your application, I personally recommend building your installer with InnoSetup on Windows and Packages on Mac


#4

Thank you both!