Cabbage Logo
Back to Cabbage Site

Little note on compiling Cabbage 2 on windows

Requirements :

  • Microsoft Visual studio 2017 community edition.
  • Git : https://git-for-windows.github.io/
  • ASIO and VST SDKs from STEINBERG
  • JUCE + Projucer
  • Csound
  • and of course Cabbage 2 !

Install :
STEP 1:
-Install Git

STEP 2:

  • Open a bash GIT.
  • Clone the repo of JUCE/ projucer

git clone https://github.com/WeAreROLI/JUCE JUCE

  • Go to the directory …\JUCE\extras\Projucer\Builds\VisualStudio2017
  • Open Projucer.sln (double click should be sufficient to open the file with MSVS
  • If you do not have an account in PROJUCER and want to use the GPL version (read the license terms http://www.juce.com/juce-5-licence), edit the file AppConfig.h and set the following variable to 1.

#define JUCER_ENABLE_GPL_MODE 1

  • Build the Projucer. Menu : Build -> Build Solution

You should get Projucer;exe ready in ./x64/debug/app/

**STEP 3: **

  • With Bash GIT, clone Cabbage.

git clone https://github.com/rorywalsh/cabbage/ Cabbage

  • Start PROJUCER and open the file CabbageIDE.jucer
  • File->Global Search Path, check that the path are compatible with your installation
  • Check that the target is set to Visual Studio 2017

  • Click on the Module drop down menu and check the path of each of the modules.

-Now check the exporter and the path to Csound and VST SDK. Adapt them if necessary, accordingly to your system. Repeat for the release version if youplan to compile the release version of Cabbage.

-Save the project with menu : File->Save.

  • In Cabbage\Builds\VisualStudio2017 directory, open the MSVS project Cabbage.sln

And build it, either for release or for debug.

After a while ( get a coffee or a tea), your brand new Cabbage should be ready.

-Repeat the same steps for the other .jucer files.

Attention, after the compilation of the CabbagePlugin.jucer, you need to rename the dll : CabbagePluginEffect.dll and after compilation of CabbagePluginSynth.jucer, rename the dll: CabbagePluginSynth.dll

Hope this helps the ones who wants to help and test the everyday improved cabbage.

1 Like

Thanks for this. Under "requirement"s you should also list Csound :wink: As you know, Cabbage needs to link to it when it’s building.

Note that once users have checked and exported their Visual Studio files, they should be able to simply run this script from the Visual Studio command line (not command prompt). Note the paths will need to be updated.

This script will build all the tools that ship with Cabbage on Windows, and means you don’t have to open and build any projects directly with Visual Studio 2017. It also takes care of renaming various dlls.

Very useful information!

Has anybody been able to build this with VS2017 ?

All I’m getting is a truckload of errors! :frowning:

I’ve tried with different JUCE versions (5.4.4, 5.3.0, 5.2.1) and configurations.

Any help is much appreciated. Thanks!

There shouldn’t be any problems building for 2017 using the latest version of JUCE master branch. This is the build script that I usually run to create all the binaries. Note that you must have the latest version of Csound installed. Install it to the default directory and the various Cabbage projects will be able to find it.

Is there a reason why you are building from source rather than using the pre-built packages?

Hi Rory, thanks for the quick reply.

It must be something I’ve missed. Maybe a specific ms toolchain version? (I tried both 141 and 140) Some of these errors look fundamentally wrong…

Here are some parts of the build log:

1>            _Ty=juce::XmlElement
1>        ] (compiling source file ..\..\Source\Application\CabbageDocumentWindow.cpp)
1>c:\users\theda\documents\cabbage\source\lookandfeel\../Utilities/CabbageUtilities.h(1089): note: nullptr can only be converted to pointer or handle types (compiling source file ..\..\Source\Application\CabbageDocumentWindow.cpp)
1>c:\users\theda\documents\cabbage\source\lookandfeel\../Utilities/CabbageUtilities.h(1092): warning C4996: 'juce::XmlElement::writeToFile': was declared deprecated (compiling source file ..\..\Source\Application\CabbageDocumentWindow.cpp)
1>c:\users\theda\documents\cabbage\jucelibrarycode\modules\juce_core\xml/juce_XmlElement.h(718): note: see declaration of 'juce::XmlElement::writeToFile' (compiling source file ..\..\Source\Application\CabbageDocumentWindow.cpp)
1>c:\users\theda\documents\cabbage\source\audio\plugins\../../Utilities/CabbageUtilities.h(1005): error C2679: binary '=': no operator found which takes a right-hand operand of type 'std::unique_ptr<juce::XmlElement,std::default_delete<_Ty>>' (or there is no acceptable conversion)
1>        with
1>        [
1>            _Ty=juce::XmlElement
1>        ] (compiling source file ..\..\Source\Audio\Plugins\CabbageInternalPluginFormat.cpp)
1>c:\users\theda\documents\cabbage\jucelibrarycode\modules\juce_core\memory/juce_ScopedPointer.h(82): note: could be 'juce::ScopedPointer<juce::XmlElement> &juce::ScopedPointer<juce::XmlElement>::operator =(juce::ScopedPointer<juce::XmlElement> &&) noexcept' (compiling source file ..\..\Source\Audio\Plugins\CabbageInternalPluginFormat.cpp)
1>c:\users\theda\documents\cabbage\source\lookandfeel\../Utilities/CabbageUtilities.h(675): warning C4389: '!=': signed/unsigned mismatch (compiling source file ..\..\Source\Application\CabbageToolbarFactory.cpp)
1>c:\users\theda\documents\cabbage\jucelibrarycode\modules\juce_core\memory/juce_ScopedPointer.h(71): note: or       'juce::ScopedPointer<juce::XmlElement> &juce::ScopedPointer<juce::XmlElement>::operator =(ObjectType *)'
1>        with
1>        [
1>            ObjectType=juce::XmlElement
1>        ] (compiling source file ..\..\Source\Audio\Plugins\CabbageInternalPluginFormat.cpp)
1>c:\users\theda\documents\cabbage\jucelibrarycode\modules\juce_core\memory/juce_ScopedPointer.h(58): note: or       'juce::ScopedPointer<juce::XmlElement> &juce::ScopedPointer<juce::XmlElement>::operator =(juce::ScopedPointer<juce::XmlElement> &)' (compiling source file ..\..\Source\Audio\Plugins\CabbageInternalPluginFormat.cpp)
1>c:\users\theda\documents\cabbage\source\audio\plugins\../../Utilities/CabbageUtilities.h(1005): note: while trying to match the argument list '(juce::ScopedPointer<juce::XmlElement>, std::unique_ptr<juce::XmlElement,std::default_delete<_Ty>>)'

and

1>c:\users\theda\documents\cabbage\source\LookAndFeel/CabbageLookAndFeel2.h(31): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called (compiling source file ..\..\Source\Audio\Plugins\CabbagePluginProcessor.cpp)
1>c:\users\theda\documents\cabbage\source\audio\plugins\GenericCabbageEditor.h(110): error C2440: 'initializing': cannot convert from 'const juce::Array<juce::AudioProcessorParameter *,juce::DummyCriticalSection,0>' to 'const juce::OwnedArray<juce::AudioProcessorParameter,juce::DummyCriticalSection> &' (compiling source file ..\..\Source\Audio\Plugins\GenericCabbageEditor.cpp)
1>c:\users\theda\documents\cabbage\source\audio\plugins\GenericCabbageEditor.h(110): note: Reason: cannot convert from 'const juce::Array<juce::AudioProcessorParameter *,juce::DummyCriticalSection,0>' to 'const juce::OwnedArray<juce::AudioProcessorParameter,juce::DummyCriticalSection>' (compiling source file ..\..\Source\Audio\Plugins\GenericCabbageEditor.cpp)
1>c:\users\theda\documents\cabbage\source\audio\plugins\GenericCabbageEditor.h(110): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called (compiling source file ..\..\Source\Audio\Plugins\GenericCabbageEditor.cpp)
1>c:\users\theda\documents\cabbage\source\audio\plugins\GenericCabbageEditor.h(116): error C2440: 'initializing': cannot convert from 'const juce::Array<juce::AudioProcessorParameter *,juce::DummyCriticalSection,0>' to 'const juce::OwnedArray<juce::AudioProcessorParameter,juce::DummyCriticalSection> &' (compiling source file ..\..\Source\Audio\Plugins\GenericCabbageEditor.cpp)
1>c:\users\theda\documents\cabbage\source\audio\plugins\GenericCabbageEditor.h(116): note: Reason: cannot convert from 'const juce::Array<juce::AudioProcessorParameter *,juce::DummyCriticalSection,0>' to 'const juce::OwnedArray<juce::AudioProcessorParameter,juce::DummyCriticalSection>' (compiling source file ..\..\Source\Audio\Plugins\GenericCabbageEditor.cpp)
1>c:\users\theda\documents\cabbage\source\audio\plugins\GenericCabbageEditor.h(116): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called (compiling source file ..\..\Source\Audio\Plugins\GenericCabbageEditor.cpp)
1>c:\users\theda\documents\cabbage\source\audio\plugins\../../Widgets/CabbageXYPad.h(150): warning C4458: declaration of 'dragLine' hides class member (compiling source file ..\..\Source\Audio\Plugins\CabbagePluginProcessor.cpp)

and finally

1>c:\users\theda\documents\cabbage\jucelibrarycode\modules\juce_audio_processors\format_types\juce_VST3Common.h(180): error C2039: 'kSpeakerACN0': is not a member of 'Steinberg::Vst' (compiling source file ..\..\JuceLibraryCode\include_juce_audio_processors.cpp)
1>C:\SDKs\VSTSDK\VST3_SDK\public.sdk/source/vst/hosting/hostclasses.cpp(42): note: see declaration of 'Steinberg::Vst' (compiling source file ..\..\JuceLibraryCode\include_juce_audio_processors.cpp)
1>c:\users\theda\documents\cabbage\jucelibrarycode\modules\juce_audio_processors\format_types\juce_VST3Common.h(180): error C2065: 'kSpeakerACN0': undeclared identifier (compiling source file ..\..\JuceLibraryCode\include_juce_audio_processors.cpp)
1>c:\users\theda\documents\cabbage\jucelibrarycode\modules\juce_audio_processors\format_types\juce_VST3Common.h(181): error C2039: 'kSpeakerACN1': is not a member of 'Steinberg::Vst' (compiling source file ..\..\JuceLibraryCode\include_juce_audio_processors.cpp)
1>C:\SDKs\VSTSDK\VST3_SDK\public.sdk/source/vst/hosting/hostclasses.cpp(42): note: see declaration of 'Steinberg::Vst' (compiling source file ..\..\JuceLibraryCode\include_juce_audio_processors.cpp)
1>c:\users\theda\documents\cabbage\jucelibrarycode\modules\juce_audio_processors\format_types\juce_VST3Common.h(181): error C2065: 'kSpeakerACN1': undeclared identifier (compiling source file ..\..\JuceLibraryCode\include_juce_audio_processors.cpp)
1>c:\users\theda\documents\cabbage\jucelibrarycode\modules\juce_audio_processors\format_types\juce_VST3Common.h(182): error C2039: 'kSpeakerACN2': is not a member of 'Steinberg::Vst' (compiling source file ..\..\JuceLibraryCode\include_juce_audio_processors.cpp)
1>C:\SDKs\VSTSDK\VST3_SDK\public.sdk/source/vst/hosting/hostclasses.cpp(42): note: see declaration of 'Steinberg::Vst' (compiling source file ..\..\JuceLibraryCode\include_juce_audio_processors.cpp)
1>c:\users\theda\documents\cabbage\jucelibrarycode\modules\juce_audio_processors\format_types\juce_VST3Common.h(182): error C2065: 'kSpeakerACN2': undeclared identifier (compiling source file ..\..\JuceLibraryCode\include_juce_audio_processors.cpp)
1>c:\users\theda\documents\cabbage\jucelibrarycode\modules\juce_audio_processors\format_types\juce_VST3Common.h(183): error C2039: 'kSpeakerACN3': is not a member of 'Steinberg::Vst' (compiling source file ..\..\JuceLibraryCode\include_juce_audio_processors.cpp)
1>C:\SDKs\VSTSDK\VST3_SDK\public.sdk/source/vst/hosting/hostclasses.cpp(42): note: see declaration of 'Steinberg::Vst' (compiling source file ..\..\JuceLibraryCode\include_juce_audio_processors.cpp)

My configuration is:

ASIO SDK 2.3.3
VST SDK 3.6.7 (and also tried with 3.6.8)
JUCE 5.4.4
CSound 6.13.0

The reason that I’m building from source is that I want to integrate a set of custom widgets which work with image atlases instead of separate frames and svgs.

Sorry for the long extent, and thanks for your time

Just a footnote…

  • I get the same errors when running the build script in the VS2017 command prompt.
  • I also saw that the latest version of projucer has a “VST LEGACY” path which I’ve tried both to leave it blank and fill it out with the VST_SDK2 sub directory from the 3.6.7 VST SDK

Oh hold on a moment, you should be building from the develop branch. That’s probably the problem. Also note that the image widget has crop() identifier that can be used to display just a portion of an SVG or PNG file. Is that any good to you?

I just fixed some issues in the dev branch. The latest tip should build fine.

1 Like

Oh hold on a moment, you should be building from the develop branch.

I’m working with the repo that @Karamel1 provided.

that can be used to display just a portion of an SVG or PNG file. Is that any good to you?

Yes that may work, but the documentation says its for static images only. There must be some business logic for the interaction also - unless I use transparent widgets over the image. It would be nice if I could simplify things.

I just fixed some issues in the dev branch. The latest tip should build fine.

I’ll try starting from scratch with the latest dev branch. However in the meantime I was able to run the older CabbageApp version without the intermediation of Projucer. I had to mess around with the VST SDK files a bit, and comment out a few stuff. But I was able to build and run the solution. I’ll demonstrate my method right bellow if you like.

Let me know in more detailsl what you are trying to do. Maybe it’s easy for me to add. When you say image atlases do you mean spritesheets?

When you say image atlases do you mean spritesheets?

Yes. That’s right Spritesheets.

It seems I have no luck with the devel version either. Sorry! It must be something I’m not doing right.
I’ve also noticed that Projucer does not add any include directories to the VS solution (I’m not familiar with Projucer).

Running this script from the Visual Studio developer console should build everything so long as you have the correct paths. You might also take a look at the Azure pipeline build script which builds Cabbage on a fresh Windows image each time I push a commit to the dev branch. Follow these steps and there shouldn’t be any reason for it to fail.

But please tell me more about what you are trying to do with Sprite sheets. Right now it’s simple to place just a single sprite from a sheet in an Cabbage image. You can then place transparent controls on top of it. Or are you look for animation? I think you may be able to avoid all the hassle of building yourself, but I’d need more details.

1 Like

Thanks for the effort. I appreciate it!

Right now it’s simple to place just a single sprite from a sheet in an Cabbage image. You can then place transparent controls on top of it.

That was my idea at first, but I wanted to streamline the procedure.

I’m not familiar with Azure, but I’ll give the script a try.

May I ask which VST SDK version are you using? I’ve tried several, and none seems to fulfill all the inclusion and object requirements of the JUCE library! One VST SDK version might not have the flock.cpp, other may not use the same objects / constants, etc. Actually this is my main problem.

You should just use the Azure script as an rough guideline of what you need to do. You don’t need, or probably should avoid trying to install a local Azure environment. it might be overkill.

I’m using this VST SDK.

1 Like

The script was a big help … It wouldn’t build localy, but I was able to get the right SDKs and directory structure to do the builds manually.

All looks good! If you’re interested, as soon as I’v got something ready, I’ll let you know!

Thanks once again for your time, Rory! :slight_smile:

Please do!

1 Like