Cabbage Logo
Back to Cabbage Site

VST plugin distribution to the end user

Hello Cabbagers!

I’m trying to figure out the best way to share my plugins with a few friends, but I’ve encountered some troubles.

First of - I made installer (modified a script for NSIS someone posted here on the forum) that installed my plugin (*.dll and .csd) in a location specified by user and csound bin, include and lib elements. It was prepared for 64 bit windows. The installer worked okey and installed all the things as expected.

Than some troubles began - first of, it couldn’t find csound64.dll, so plugins didn’t work. After restart and installing full version of csound with python2.7 and restarting computer, finally it worked.

So my questions are -

  1. does anyone had simmilar errors, is it possible to eliminate them?
  2. should I include python installation as well, is it necessary?
  3. does anyone could suggest me a process that would possibly make it all as smooth as possible?

Thanks for help!

The path to csound64.dll MUST be added to the system path. That’s why your install failed until you installed Csound. You will need your installer to write the location of Csound to the system path when it’s installing the packages. In fact, csound64.dll is the only thing you need to include if you are not using any plugin opcodes.

No need, but make sure you DON’T include py.dll in your installed libraries, otherwise Csound will look for Python.

Note that there is a pretty bad bug in NSIS that overwrites users systems paths if they are too long. It’s an absolutely horrible bug and can cause serious issues with Windows if it happens. That’s why I switched to Inno. You can use a modified version of this script. Just modify lines 47 - 55 and include your own stuff.

Once your installer script is working it’s very simple to modify it for other plugins. The bottom line is that if users have Cabbage installed you can just send them the .dll and.csd file. Otherwise you will need to a) distribute csound64.dll with your plugins, and b) write the location of csound64.dll to your system PATH variable. This should be done by your installer. Note on OSX things are a little simpler because you can simply bundle Csound into your plugin.

Thanks @rorywalsh, great tips and explanation, I’ll try it out.

Another questions… :slight_smile:

  1. So… how would you tackle bundling the csound into plugin on osx? I have no idea how to do it.
  2. I’ve seen your old post @rorywalsh on kvr forum, where you suggest a solution to put plugin .dll and csound dlls/dependencies into one folder, and it should work… is it still legit? Will that solution work without need of setting the environmental variables? Just wondering, becasue it just seems way easier on the end user side. Also -

I’ve managed to modify your script and it seems to work well - thanks for that!

@rorywalsh About a clear explanation on the subject… If in the plugin we use opcode, we must deliver the whole CSound language and not only some CSound library. Is it correct?

You need to relink the Csound binaries so that the Cabbage plugin knows to look in the bundle itself for Csound. THis can be achieved using a simple bash script.

I’m assuming that’s quite an old post. The situation is a little better now as you don’t need to include so many dlls. However, you will need to add the path to Csound to the system variable. Otherwise the plugin will not load.

@ossian1961 You only need to include the dll for the particular plugin you are using.

Good, thanks :slight_smile:

Hi there,

What is the best way to make installer to the end user.

Can someone explain a little bit.

I am not sure how to compile the script


Cabbage uses Packages for OSX and Inno Setup on Windows. That’s what you need to compile the script you mentioned. I just came across a JUCE tutorial that might be of some use. It also uses the same package manager. To be honest, you’ll get pretty far just hacking the Cabbage installer.

Now i am trying to figure it out with Inno Setup. (and trying to hack your example)

  1. As i understand i need to add just one file csound64.dll (Into C:\Program Files\Csound6_x64\bin directory).

For Example i use midion opcode. Do i need somthing extra?

  1. Do the script will make all work for system PATH variable? If am not installing full csound package…


I think you’ll need to include lbsndfile too.

I’m not sure what you mean here? The plugin will need to be able to find csound64.dll in the system path, so you will need to add its location to PATH.

Well I was thinking of trying out Zero Install. I haven’t had a chance to play with creating exported self-installing bundles.

Cool. Let us know how it works out. :wink:

hey guys!

Need to ask one more thing, finally got packages to work for me on mac,

so regarding this:

You need to relink the Csound binaries so that the Cabbage plugin knows to look in the bundle itself for Csound. THis can be achieved using a simple bash script.

Is it for setting enviromental variable for Mac by this bash script, do I understand it correctly?
Just like google suggests here??


No, this is something different. You need to relink the Csound binaries to work with your Cabbage based plugin. In order to do this you will need tools that are part of the CLI Developer Tools package in the XCode download. I think you will need to download all of Xcode in order to access them, but I’m not certain. Once you have these tools installed you can try following the steps outlined below.

  • Step 1: Export the plugin

  • Step 2: Run otool on the plugin binary to see where it is looking for Csound. The plugin binary is located in the plugin .vst/.component bundle, i.e, myPlugin.component/Contents/MacOS/CabbagePlugin. If you cd to the plugin binary directory, the otool command might look like this:
    otool -L PluginName
    The output from the above command looks something like this:
    @rpath/CsoundLib64.framework/Versions/6.0/CsoundLib64 (compatibility version 6.0.0, current version 0.0.0)

  • Step 3: Note the @rpath (see above) path to the Csound library from the newly exported plugin

  • Step 4: Add the Csound framework to the Resources folder of the bundle. Optionally one can delete all the dylibs in the libs folder, apart from libsndfile and libsamplerate. The entire Opcodes64 directory can be removed if no plugin opcodes are needed. The JAVA, Manual, Python and Examples folder can also be removed.

  • Step 5: Run install_name_tool using the same rpath output from the otool command from earlier, i.e, install_name_tool -change @rpath/CsoundLib64.framework/Versions/6.0/CsoundLib64 @loader_path/../Resources/CsoundLib64.framework/Versions/6.0/CsoundLib64 /Users/walshr/Library/Audio/Plug-Ins/Components/myPlugin.component/Contents/MacOS/CabbagePlugin

This is all a little long winded, but unfortunately its necessary. Otherwise the Cabbage plugin will always look in the default Csound installation directory. If the user doesn’t have Csound installed the plugin will fail to load. I do have a script that I use that simplifies this, but I don’t have access to it right now. I can dig it out towards the end of this week if you can’t make this work.


Thank you Rory for this awesome step by step tutorial!