Cabbage Logo
Back to Cabbage Site

Distributing plugins on MacOS

This is something that come sup quite a lot. It’s not so straight forward, but I will try to give an overview of how to do this. I will focus on how to embed Csound into the plugin. Packing on OSX can be done with the Packages software. Details on packaging plugins can be found here. You will need to install the xcode command line tools in order to perform the relinking of Csound. You will also need to have some familiarity with the MacOS terminal.

These steps are relevant for Csound 6.15.

Steps to take to bundle Csound into your plugins (don’t forget to replace pluginName and exntension with yours!):

1: export your plugin as usual

2: copy the latest version of the Csound framework into your resources folder (you can remove what you don’t need from it later). It can be reduced in size quite a lot for final distribution. It typically lives in /Library/Frameworks/CsoundLib64.framework

3: Run the following command on the CsoundLib64 binary that is now in your plugin Resources folder. It’s easiest if you cd to pluginName.vst/Contents/Resources/CsoundLib64.framework first.

sudo install_name_tool -id "@rpath/CsoundLib64.framework/CsoundLib64" CsoundLib64

4: Then from your plugin binary location, pluginName.vst/Contents/MacOS run:

sudo install_name_tool -change /Library/Frameworks/CsoundLib64.framework/CsoundLib64 @loader_path/…/Resources/CsoundLib64.framework/CsoundLib64 pluginName

When these steps are complete, you should be able to run your plugins without an install of Csound. I usually test by renaming the CsoundLib64 framework and testing the plugin with a host.

Finally, I’d recommend PluginVal to test your plugins. And Apple’s own auval tool is great for AUs. To test your AUs with auval you can run the following command:

auval -a

This is more or less the same as running the plugin manager from inside Logic Pro.