Cabbage Logo
Back to Cabbage Site

Distributing plugins on Windows

Distributing plugins on Windows is not as clean as MacOS. The best installer for Windows is probably NSIS. A quick tutorial on how to create a Windows plugin installer can be found here.

The tricky part with Windows is decided what to include, and how to include it. You have several options. The handiest things to do is to use a folder called C:/ProgramData/CabbageAudio/PluginName to hold all your resources, .csd files, images, samples, etc. When your Cabbage plugin loads, if it doesn’t find a matching .csd in the same directoy as the dll it will search there.

How to include Csound

  1. Distribute csound64.dll with your plugin. If you are not using any plugin opcodes this is clean. You should place it into the C:/ProgramData/CabbageAudio/ folder. You then need to add this folder to your system path. This NSIS script does this. It can be easily hacked to suit your needs

  2. Optionally distribute all of Csound with your plugin. This is what I do with the Cabbage installer. You can see on this line I add the entire contents my Csound_x64 folder to the installer:
    https://github.com/rorywalsh/cabbage/blob/develop/Builds/VisualStudio2017/CabbageCannonicalInstaller.iss#L65
    I then have to update the system variables so that Csound is properly installed:
    https://github.com/rorywalsh/cabbage/blob/develop/Builds/VisualStudio2017/CabbageCannonicalInstaller.iss#L75-L76

Both of this approaches have their problems. Method one works fine so long as users don’t have Csound installed. If they do you had better hope it’s the same version used by your plugin, Otherwise things will break. Either your plugin will not work, or their Csound install will not work.

Method two is a little safer because you can offer the option of installing Csound alongside the plugin. If users have Csound installed your plugin will work without having to include any Csound dlls and then can opt out of the Csound installation. If not, they go ahead and install Csound. If they update Csound at a later date it won’t break your plugin.

For the more experience programmers, there is another option. Build a custom version of Csound yourself. Then then build Cabbage with this custom version. Then use step 1 above, but include your custom Csound dll. This will prevent any issues with system wide installs of Csound. This is how Cabbage Pro works on Windows.