Plugin additional folders for audiofiles, presets and images

Hi, i am looking for an example of vst plugin made with Juce, that has an additional folder, to store, audiofiles or any kind of files used in the plugin… even presets !

i didnt find any tuto over this topic and anything on this forum… maybe i am wrong but i would think about such plan for my own project… is that possible ?

precision: i am talking about packing the final vst3 plugin WITHIN its additional folders !
Thanks in advance
uriel

The annoying bit is, that this is different on mac and windows.
On Mac the VST3 is a bundle, so you can add resources into the bundle, while on windows a vst3 is a plain file afaik. In this case you have to resort to specify a location on the drive and create an installer, that places your files into the right location.

A tutorial for installers is here:
https://docs.juce.com/master/tutorial_app_plugin_packaging.html

A good place is File::getSpecialLocation (commonApplicationDataDirectory)

1 Like

hi daniel,
can it be just the folders right next to the plugin file ?

You could of course do something like:

system_vst_folder
-- uriels_awesome_plugin
---- uriels_awesome_plugin.vst3
---- data_folder
------ some_audio.wav
------ some_image.png

I may be wrong, but I think the problem comes about from determining where is system_vst_folder on Windows, because although there is a default “standard” one for VST3, your plugin may not necessarily be in that folder.

For a plugin I’m developing with presets and associated wavs I’m using one of the File::getSpecialLocation options and having my installer place the presets etc. there for me.

That is/was true, apparently deprecated since VST 3.6.10 and bundles are possible on all platforms for VST3 now : https://steinbergmedia.github.io/vst3_doc/vstinterfaces/vst3loc.html

God knows how the host support for VST3 bundles is on Windows though :wink:

Hi Richie, thx for the answer :slight_smile:

i did:

File backgroundFile1 = File::getCurrentWorkingDirectory().getChildFile("./ui/bg_1000x300_darktheme.png");

background = ImageCache::getFromFile(backgroundFile1);`

i did create those folders next to the exe file (for the standalone) and next to the .vst3 for the plugin.
the magic for me is that it works well with the standalone, the picture is shown… but not for the plugin !

should i move everything in my vst3 folder ? out of my build folder ? i did test this option, but without success :frowning:

i am compiling with debug option… can it come from this ?..

i dont understand why !

No, that is unrelated. The trouble is, that current working directory could be anything, but most likely NOT the vst directory.

You can get a step closer with File::getSpecialLocation(), but that would be really messy, if every plugin would dump it’s assets into the VST folder. The location you are interested in is currentExecutableFile:

If running as a plug-in or DLL, this will (where possible) be the DLL rather than the
host app.

The best place is really commonApplicationDataDirectory and have a folder of your company name and then your plugin name.

Unless you want to try the VST3 bundle version, but like @richie wrote above, who knows, if that already works for the majority of hosts.

thx Daniel for your reply…
i think i will have some troubles if i want to put thoses vst and their assets folders outside of any “classic” directories (steinberg,vst3…)… in my mind, it was a folder containing the vst and its files(audiofiles and images, presets, etc…), that i can move everywhere and to link it via my host settings… simple… but it doesnt seem to be this way…

at the sametime, the appdata folder is logic, that there is no risk that final users modifiy or delete the ui-files or samples… right ! i just have to deal with Inosetup a bit more and understand how make the installer copying files in the rights directories…

ok, that is the answer, i believe… thanks

IIRC, the folder that’s returned in JUCE by File::getSpecialLocation (File:: commonApplicationDataDirectory), is the one mapped to {commonappdata} by Inno Setup.
Anyway, I recommend you to do a test run to check that’s actually the case, I set this up very long ago.

You can install stuff there like this, for example:

[Files]
Source: "appdata\*"; DestDir: "{commonappdata}\{#MyAppDataSubdirectory}"; Flags: ignoreversion recursesubdirs
1 Like