Skip to content

Latest commit

 

History

History
130 lines (97 loc) · 4.88 KB

BUILDING.md

File metadata and controls

130 lines (97 loc) · 4.88 KB

Building MrsWatson from Source

To build MrsWatson on any platform, you will need to acquire a copy of the VST SDK source code. Due to licensing restrictions of the VST SDK, this code is not distributed with MrsWatson itself. It can be downloaded from Steinberg's Developer Page, and then extracted to the vendor/vstsdk2.4 subdirectory of the project before compiling.

The MrsWatson source code also contains some submodules for third-party libraries, so before building you should run the following commands:

git submodule sync
git submodule update --init --recursive

If you download the MrsWatson sources from the automatically-generated zipfile/tarball that GitHub produces for each release, then the third-party code will not be included. Currently it is not recommended to use the GitHub source releases, but rather to clone the sources and build from the release tag.

Mac OSX

To build MrsWatson on Mac OS X, you will need to have Apple's Developer Tools installed. You can download Xcode either from Apple's developer website or from the Mac App Store. You also need to install the command line tools provided by Xcode, which are not installed by default. To do this, go to Xcode's preferences, then to the downloads tab, and in "Components" you find a button to install the command line tools.

Homebrew is also recommended for building MrsWatson on Mac OS X. from homebrew, you will need the CMake package, but possibly automake and autoconf as well. See the homebrew webpage for details on installation of packages.

If you want to use Xcode to develop MrsWatson you will need to generate a project file like so:

cmake -G Xcode .

This command will generate an Xcode project in the current directory which you can use to compile the software as you would any other project. For other IDE's, such as CLion, QT Creator, NetBeans, emacs, or vim, you can generate a regular makefile to build the software like any other Unix package. To do that you must generate the makefiles like so:

cmake -G "Unix Makefiles" .
make

Ninja and CCache are also supported, both tools should work "out of the box".

Windows

On Windows, Visual Studio is used to compile the software. You will need at least Visual Studio 2013 (aka Visual Studio 12) to build MrsWatson, since earlier versions do not support C99.

The MrsWatson source code does not include a Visual Studio project, instead CMake is used to generate Visual Studio project which can then be used to build the software. After you've installed CMake for Windows, you must generate the build directory where the Visual Studio product will be placed. Unlike on Unix, you cannot build the software from the same directory as the source code. So generating the Visual Studio project will look something like this:

cd c:\wherever
mkdir build
cd build
cmake -G "Visual Studio 12" C:\path\to\MrsWatson

Likewise, you can use the CMake GUI tool to accomplish the same task. This command will generate a Visual Studio project in C:\wherever\build which can use to build the software. Unlike on Unix, the generated Visual Studio project cannot generate both 32- and 64-bit binaries in the same build. Instead you must create another build directory for the 64-bit project. That is done like so:

cd c:\wherever
mkdir build64
cd build64
cmake -G "Visual Studio 12 Win64" C:\path\to\MrsWatson

Linux

Building MrsWatson on Linux may require a few additional packages on your computer, including those necessary to make a 32-bit build on 64-bit machines. By default, the software is built with your native architecture, so if you would like to make a 32-bit build on a 64-bit machine, you will also need the following packages:

  • libstdc++
  • g++-multilib
  • ia32-libs

This is in addition to the standard build tools (gcc, g++, etc). Otherwise, building on Linux should be a simple matter of:

cmake .
make
make install

General Unix Tips

There are several other generators supported by CMake, you can see the list of supported ones by running cmake -h on the command line. By default, cmake will generate a release build configuration, which will place binaries in the "bin" directory. If you want debuggable binaries, then you must run the following command when you generate your build environment:

cmake -DCMAKE_BUILD_TYPE=Debug -G "Your generator of choice" .
make clean && make

On Unix (including both Mac OS X and Linux), the project generated by CMake will produce both 32 and 64-bit binaries. These binaries will have the number "64" appended to the end. Even though Mac OS X has the Universal Binary format that could contain both architectures, two separate binaries are shipped on this platform to avoid confusion when loading plugins.