Skip to content

Commit

Permalink
update build instructions for 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed May 4, 2016
1 parent b15150a commit 83a1a60
Show file tree
Hide file tree
Showing 4 changed files with 171 additions and 35 deletions.
6 changes: 3 additions & 3 deletions INSTALL_FREEBSD.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Developer installation for FreeBSD
==================================
Instructions for installing Natron from sources on FreeBSD
==========================================================

This file is supposed to guide you step by step to have working (compiling) version of
Natron on FreeBSD.
Expand Down Expand Up @@ -63,7 +63,7 @@ shiboken {
###Download OpenColorIO-Configs

In the past, OCIO configs were a submodule, though due to the size of the repository, we have chosen instead
to make a tarball release and let you download it [here](https://github.com/MrKepzie/OpenColorIO-Configs/archive/Natron-v2.0.tar.gz).
to make a tarball release and let you download it [here](https://github.com/MrKepzie/OpenColorIO-Configs/archive/Natron-v2.1.tar.gz).
Place it at the root of Natron repository.

### Build
Expand Down
11 changes: 4 additions & 7 deletions INSTALL_LINUX.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Developer installation for GNU/Linux
====================================
Instructions for installing Natron from sources on GNU/Linux
============================================================

This file is supposed to guide you step by step to have working (compiling) version of
Natron on GNU/Linux.
Expand Down Expand Up @@ -35,7 +35,7 @@ and build Natron and the standard set of plugins on Ubuntu

In order to have Natron compiling, first you need to install the required libraries.

### Qt 4.8.6
### Qt 4.8.7

You'll need to install Qt4 libraries, usually you can get them from your package manager (depends on your distribution).

Expand All @@ -55,8 +55,6 @@ Alternatively you can install boost from [boost download](http://www.boost.org/u
You can download it with your package manager.
The package depends on your distribution.



### GLEW

You can download it with your package manager.
Expand Down Expand Up @@ -84,7 +82,6 @@ Natron uses pyside for python 2
Natron uses shiboken for python 2



# Configuration

### OpenFX
Expand All @@ -100,7 +97,7 @@ git submodule update -i --recursive
### Download OpenColorIO-Configs

In the past, OCIO configs were a submodule, though due to the size of the repository, we have chosen instead
to make a tarball release and let you download it [here](https://github.com/MrKepzie/OpenColorIO-Configs/archive/Natron-v2.0.tar.gz).
to make a tarball release and let you download it [here](https://github.com/MrKepzie/OpenColorIO-Configs/archive/Natron-v2.1.tar.gz).
Place it at the root of Natron repository.

***note:*** *If it is name something like: `OpenColorIO-Configs-Natron-v2.0` rename it to `OpenColorIO-Configs`*
Expand Down
4 changes: 2 additions & 2 deletions INSTALL_OSX.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Developer installation on OS X
=================================
Instructions for installing Natron from sources on OS X
=======================================================

These are step-by-step instructions to compile Natron on OS X.

Expand Down
185 changes: 162 additions & 23 deletions INSTALL_WINDOWS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,147 @@
developer installation for windows
==================================
Instructions for installing Natron from sources on Microsoft Windows
====================================================================

# Installing with MSYS2

[MSYS2](https://sourceforge.net/projects/msys2/) is a unix-like
toolchain that can be used to build Windows applications. It provides
most dependencies required by Natron.


## Packaged dependencies

Clone the [MINGW-packages](https://github.com/MrKepzie/MINGW-packages) repository:

cd tools/Windows
git clone https://github.com/MrKepzie/MINGW-packages

Set the environment variable `MINGW_PACKAGES_PATH` to the location of
the `MINGW-packages`directory.

Using `pacman`, the MSYS2 package manager, install the following
packages:

toolchain yasm gsm gdbm db python2 boost libjpeg-turbo libpng
libtiff giflib lcms2 openjpeg LibRaw glew pixman cairo
openssl freetype fontconfig eigen3 pango librsvg libzip cmake

wget tar diffutils file gawk gettext grep make patch patchutils
pkg-config sed unzip git bison flex rsync zip

## Dependencies to build manually

### *FFmpeg 3.0.2*

### *ImageMagick 6.3.9*

### *OpenColorIO 1.0.9*

### *OpenEXR 2.2*

### *OpenImageIO 1.6.13*

### *Qt 4.8.7*


## Configuration

### OpenFX

Natron uses the OpenFX API, before building you should make sure it is up to date.

For that, go under Natron and type

```
git submodule update -i --recursive
```

### Download OpenColorIO-Configs

In the past, OCIO configs were a submodule, though due to the size of the repository, we have chosen instead
to make a tarball release and let you download it [here](https://github.com/MrKepzie/OpenColorIO-Configs/archive/Natron-v2.1.tar.gz).
Place it at the root of Natron repository.

***note:*** *If it is name something like: `OpenColorIO-Configs-Natron-v2.0` rename it to `OpenColorIO-Configs`*

### config.pri

The `config.pri` is used to define the locations of the dependencies. It is probably the most
confusing part of the build process.

Create a `config.pri` file next to the `Project.pro` that will tell the .pro file
where to find those libraries.

You can fill it with the following proposed code to point to the libraries.
Of course you need to provide valid paths that are valid on your system.

You can find more examples specific to distributions below.

INCLUDEPATH is the path to the include files

LIBS is the path to the libs

----- copy and paste the following in a terminal -----
cat > config.pri << EOF
boost: LIBS += -lboost_serialization
expat: LIBS += -lexpat
expat: PKGCONFIG -= expat
cairo: PKGCONFIG -= cairo
EOF
----- end -----

***note:*** *the last line for cairo is only necessary if the package for cairo in your distribution
is lower than version 1.12 (as it is on Ubuntu 12.04 LTS for example).*

### Nodes

Natron's nodes are contained in separate repositories. To use the default nodes, you must also build the following repositories:

https://github.com/devernay/openfx-misc
https://github.com/MrKepzie/openfx-io


You'll find installation instructions in the README of both these repositories. Both openfx-misc and openfx-io have submodules as well.

Plugins must be installed in /usr/OFX/Plugins on Linux
Or in a directory named "Plugins" located in the parent directory where the binary lies, e.g:


bin/
Natron
Plugins/
IO.ofx.bundle


## Build

To build, go into the Natron directory and type:

qmake -r
make

If everything has been installed and configured correctly, it should build without errors.

If you want to build in DEBUG mode change the qmake call to this line:

qmake -r CONFIG+=debug

Some debug options are available for developers of Natron and you can see them in the
global.pri file. To enable an option just add `CONFIG+=<option>` in the qmake call.

# Installing with Visual Studio

These instructions are outdated, and the preferred way to compile
Natron on Windows is using MSYS2. Feel free to contribute updated
Visual Studio instructions.

Required: Install git, best is the github app.

##Install libraries
## Install libraries

In order to have Natron compiling, first you need to install the required libraries.
An alternative is to download the pre-compiled binaries provided by MrKepzie from
https://sourceforge.net/projects/natron/files/Natron_Windows_3rdParty.zip/download
An alternative is to download the
[pre-compiled binaries provided by MrKepzie](https://sourceforge.net/projects/natron/files/Natron_Windows_3rdParty.zip/download)

They contain:
* Qt 4.8.5 compiled for 64 bits as dlls. 32 bits version can be downloaded from the Qt website (see below)
* Qt 5.3.0 compiled for 64 bits as dlls. 32 bits version can be downloaded from the Qt website (see below)
Expand All @@ -22,14 +156,14 @@ They contain:
* pixman 0.32.4 static MT release (64 bits only, it's easy to compile the 32 bits version yourself and it shouldn't be needed if
you use the provided pre-built binary of cairo.).

###*Qt 5.3*
### *Qt 5.3*

You'll need to install Qt libraries from [Qt download](http://qt-project.org/downloads).
You probably want Qt 5.3.0 for Windows 32-bit (VS 2010, OpenGL, 593 MB)
Note that by default the binaries provided by Qt are 32 bits, which means you have to compile the 64 bits version yourself... or download
the pre-compiled binaries we provide (see above).

###*boost*
### *boost*

You can download boost from
(boost download)[http://www.boost.org/users/download/]
Expand All @@ -38,22 +172,22 @@ boost. You'll need to build a shared | multi-threaded version of the librairies.
Pre-compiled binaries for boost are available here:
http://boost.teeks99.com/

###*glew*
### *glew*
On windows,OpenGL API is not up to date to the features we need.
You'll need to download glew, that provides a recent version of the OpenGL API:

(Glew download)[http://glew.sourceforge.net/]


###*OpenFX*
### *OpenFX*

At the source tree's root, type the following command in the command prompt:

git submodule update -i --recursive

(If you cloned the repository with the github app you probably don't need this command.)

###*Expat*
### *Expat*

You need to build expat in order to make OpenFX work.
The expat sources are located under the HostSupport folder within OpenFX.
Expand All @@ -63,21 +197,21 @@ Open it with visual studio and build a static MT release version of expat.

We're done here for libraries.

###*Cairo 1.12*
### *Cairo 1.14.2*

You can get the release from http://www.cairographics.org/releases/
Then this page has a complete answer on how to compile the dependencies:
http://stackoverflow.com/questions/85622/how-to-compile-cairo-for-visual-c-2008-express-edition
This will work successfully.

###Download OpenColorIO-Configs
### Download OpenColorIO-Configs

In the past, OCIO configs were a submodule, though due to the size of the repository, we have chosen instead
to make a tarball release and let you download it [here](https://github.com/MrKepzie/OpenColorIO-Configs/archive/Natron-v2.0.tar.gz).
to make a tarball release and let you download it [here](https://github.com/MrKepzie/OpenColorIO-Configs/archive/Natron-v2.1.tar.gz).
Place it at the root of Natron repository.


###Add the config.pri file
### Add the config.pri file

You have to define the locations of the required libraries.
This is done by creating a .pri file that will tell the .pro where to find those libraries.
Expand All @@ -87,11 +221,13 @@ This is done by creating a .pri file that will tell the .pro where to find those
You can fill it with the following proposed code to point to the libraries.
Of course you need to provide valid paths that are valid on your system.

*INCLUDEPATH* is the path to the include files
*LIBS* is the path to the libs
`INCLUDEPATH` is the path to the include files

`LIBS` is the path to the libs

Here's an example of a config.pri file that supports both 32bit and 64bit builds:
---------------------------------------

```
64bit {
boost {
Expand Down Expand Up @@ -179,17 +315,16 @@ shiboken {
LIBS += -L$$quote(C:\\Python34_win32\\Lib\\site-packages\\PySide) -lshiboken-python3.4
}
}
```


---------------------------------------------

###*Copy the dll's over*
### *Copy the dll's over*

Copy all the required dll's to the executable directory. (Next to Natron.exe)
If Natron launches that means you got it all right;) Otherwise windows will prompt you
for the missing dll's when launching Natron.

###*Build*
### *Build*


qmake -r -tp vc -spec win32-msvc2010 CONFIG+=64bit Project.pro -o Project64.sln
Expand Down Expand Up @@ -217,8 +352,11 @@ Right click on the project, Configuration Properties,Librarian,General, Target M
This is not required as generated files are already in the repository. You would need to run it if you were to extend or modify the Python bindings via the
typesystem.xml file. See the documentation of shiboken for an explanation of the command line arguments.

```
shiboken --avoid-protected-hack --enable-pyside-extensions --include-paths=..\Engine;..\Global;C:\Qt\4.8.6_win32\include;C:\Python34\Lib\site-packages\PySide\include\PySide --typesystem-paths=C:\Python34\Lib\site-packages\PySide\typesystems --output-directory=Engine Engine\Pyside_Engine_Python.h Engine\typesystem_engine.xml
shiboken --avoid-protected-hack --enable-pyside-extensions --include-paths=..\Engine;..\Gui;..\Global;C:\Qt\4.8.6_win32\includeC;\Python34\Lib\site-packages\PySide\include\PySide --typesystem-paths=C:\Python34\Lib\site-packages\PySide\typesystems;Engine --output-directory=Gui Gui\Pyside_Gui_Python.h Gui\typesystem_natronGui.xml
```

### 32 bits vs 64 bits builds

Depending on the target architecture the dependencies are not the same. This can be achieved with the switch CONFIG+=64bit or CONFIG+=32bit
Expand All @@ -229,12 +367,13 @@ probably this is 32 bits (you can check it with dumpbin /HEADERS C:\PATH\TO\qmak

So if you want to generate the 64 bits solution file with good dependencies make sure to make the qmake call with the 64 bits qmake binary
provided in the pre-built binaries.
In other words if I wanted to build both 32bits and 64bits version I would call:

In other words, if one wants to build both 32bits and 64bits version, one would call:

C:\PATH\TO\32BITS\QT\qmake -r -tp vc -spec win32-msvc2010 CONFIG+=32bit Project.pro -o Project32.sln
C:\PATH\TO\64BITS\QT\qmake -r -tp vc -spec win32-msvc2010 CONFIG+=64bit Project.pro -o Project64.sln

###Build from the command line with MSBuild
### Build from the command line with MSBuild

MSBuild Project32.sln /p:Configuration=Release;Platform=win32 /t:Natron /m
MSBuild Project64.sln /p:Configuration=Release;Platform=x64 /t:Natron /m
Expand Down

0 comments on commit 83a1a60

Please sign in to comment.