Cabbage Logo
Back to Cabbage Site

Cross platform compiling?

Hi,
it’s possible to somehow “cross compile” my plugins? Eg. compile it for mac from windows.

I think this should be doable, because (as far as I understand) Cabbage plugin is made from several files:

  • plugin CSD file (which is cross platform by default)
  • CSound DLL/SO which is just copied
  • Cabbage DLL/SO which only need to rewrite some ID in it, otherwise is same for all plugins

I am not sure about mac/linux file formats.

You need to do this so that the plugin ID is unique and can be opened correctly with hosts. If you don’t change the ID hosts like live will only open the first plugin it finds of a particular ID and ignore any more with the same ID. For this reason cross compiling is not possible, actually, I can’t say for sure, but it’s certainly not going to be easy. But you have some options.

  1. Install a VM and run OSX within Windows. I do this with my work machine and it’s fine for many things. I also run Windows from inside my Mac. If you can get a simple VM running then you can create the mac bundle there and upload somewhere from with the VM. The same can be said of Linux.

  2. Add an automated builds script to your github page and use a service like Azure to build a package each time you push a commit. This is how I create beta build for Cabbage. Each time I push something to the dev branch it triggers a build. In your case you will need to install Csound and Cabbage. Then run Cabbage with command line parameters to open and export a plugin. You can then access that plugin via Azure’s build artefacts. This approach is a little more work, but you can then use the same script for all future plugins. In the long run it make sense. You’ve already published quite a few at this stage.

  3. Just ask me to prepare packages for you. I’m on Windows and Linux most days, so it’s no big deal :wink:

I’m just wondering if I shouldn’t set up a github page for for this purpose. Whenever someone makes a PR with a new csd file, it will run a build and generate plugins for each platform. On top of that it can produce an installer for the various platforms. This would be a nice way of sharing all of Iain’s Cabbage examples with people who don’t know anything about Csound.

1 Like