Cabbage Logo
Back to Cabbage Site

Where to place preset-folders for presetbutton?

In terms of distribution, where do I place the user and factory preset-folders so that the plugin will recognize them? (Both Windows and macOS)

You can decide where to place them when you set the factoryFolder() idntifier. For example:

factoryFolder("#USER_APPLICATION_DATA_DIRECTORY/DeveloperName/PluginName/PresetsFolder", “* .snaps”)

The #USER_APPLICATION_DATA_DIRECTORY macro expands to User/AppData/Roaming. On MacOS it’s the Application Support folder. These are standard locations for application data.

Thank you. Won’t this be a nightmare in terms of version control?

Just thinking out loud here, but it would be nice if you could set a factoryFolder and userFolder for Cabbage, and a second factoryFolder & userFolder for exported plugins. Otherwise I would need to copy the presets back and forth all the time for version control? Or am I misunderstanding something perhaps?

If I was developing presets for a plugin called Whatever, I would place the presets into:

factoryFolder("#USER_APPLICATION_DATA_DIRECTORY/Rory/Whatever/PresetsFolder", “* .snaps”)

Then I’d point my installer script to that folder when it prepares my installer. The path will be the same on all machines because Cabbage auto expands the diretory path. But maybe I’m missing something here?

Yeah it’s a good solution for distribution. I was thinking more in terms of version control during development, where you would need to copy the presets back and forth between #USER_APPLICATION_DATA_DIRECTORY and the repository-folder before you push a commit.

But maybe I’m overthinking it, since it’s not really much work to handle this.