summaryrefslogtreecommitdiff
path: root/BUILDING.md
blob: eeddf74995f0d8031039cd0c60181645a7793a25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
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][1], and then extracted to the
`vendor/vstsdk2.4` subdirectory of the project before compiling.

The MrsWatson source code also contains a few submodules, it is recommended
//do you know what this means? syn c th git  has submodules to include other repositories into current repository ahh so is there a command to sync them
from the current repo or do I have to find them? we can try without it
that you sync the submodules before building the code.

//I should have the cmake package
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][2] 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".


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.


Windows
-------

On Windows, Visual Studio is used to compile the software. 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 cmkae 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 MrsWatson-build
    cd MrsWatson-build
    cmake -G "Visual Studio 11" C:\path\to\MrsWatson

This command will generate a Visual Studio project in
`C:\wherever\MrsWatson-build` which can use to build the software. Just like
on Unix, CMake supports several different generators which can be listed by
running CMake -h. Namely, several different versions of Visual Studio are
supported, and you should pick the one which matches your installation.

Unlike on Unix, the generated Visual Studio project will not generate both
32- and 64-bit builds of the software. Instead you must create another build
directory for the 64-bit project. That is done like so:

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


[1]: http://www.steinberg.net/en/company/developer.html
[2]: http://mxcl.github.io/homebrew/