2016-11-02 23:44:24 +13:00
|
|
|
# Setting up the development environment for GNU/Linux
|
2016-06-30 15:51:59 +12:00
|
|
|
|
|
|
|
## Required software
|
|
|
|
|
2016-11-05 11:55:23 +13:00
|
|
|
Building OpenToonz from source requires the following dependencies:
|
2016-06-30 15:54:19 +12:00
|
|
|
- Git
|
2016-11-02 23:41:40 +13:00
|
|
|
- GCC or Clang
|
2016-11-05 11:55:23 +13:00
|
|
|
- CMake (3.4.1 or newer).
|
2017-10-13 01:43:12 +13:00
|
|
|
- Qt5 (5.9 or newer)
|
2016-11-05 11:55:23 +13:00
|
|
|
- Boost (1.55 or newer)
|
2016-06-30 15:54:19 +12:00
|
|
|
- SDL2
|
2016-11-05 11:55:23 +13:00
|
|
|
- LibPNG
|
|
|
|
- SuperLU
|
|
|
|
- Lzo2
|
|
|
|
- FreeType
|
2017-11-30 14:08:58 +13:00
|
|
|
- LibMyPaint (1.3 or newer)
|
2016-06-30 15:51:59 +12:00
|
|
|
|
2016-11-05 11:55:23 +13:00
|
|
|
### Installing Dependencies on Debian / Ubuntu
|
2016-06-30 15:51:59 +12:00
|
|
|
|
|
|
|
```
|
2016-10-30 21:20:39 +13:00
|
|
|
$ sudo apt-get install build-essential git cmake pkg-config libboost-all-dev qt5-default qtbase5-dev libqt5svg5-dev qtscript5-dev qttools5-dev qttools5-dev-tools libqt5opengl5-dev qtmultimedia5-dev libsuperlu-dev liblz4-dev libusb-1.0-0-dev liblzo2-dev libpng-dev libjpeg-dev libglew-dev freeglut3-dev libsdl2-dev libfreetype6-dev
|
2016-06-30 15:51:59 +12:00
|
|
|
```
|
|
|
|
|
|
|
|
Notes:
|
2016-11-05 11:55:23 +13:00
|
|
|
* It's possible we also need `libgsl2` (or maybe `libopenblas-dev`)
|
2016-06-30 15:51:59 +12:00
|
|
|
|
2017-11-30 14:08:58 +13:00
|
|
|
TODO:
|
2016-06-30 15:51:59 +12:00
|
|
|
|
2017-11-30 14:08:58 +13:00
|
|
|
- `libmypaint` package
|
2016-06-30 15:51:59 +12:00
|
|
|
|
2016-11-05 11:55:23 +13:00
|
|
|
### Installing Dependencies on Fedora
|
2016-06-30 15:51:59 +12:00
|
|
|
(it may include some useless packages)
|
|
|
|
|
|
|
|
```
|
2016-11-02 23:44:24 +13:00
|
|
|
$ dnf install gcc gcc-c++ automake git cmake boost boost-devel SuperLU SuperLU-devel lz4-devel lzma libusb-devel lzo-devel libjpeg-turbo-devel libGLEW glew-devel freeglut-devel freeglut SDL2 SDL2-devel freetype-devel libpng-devel qt5-qtbase-devel qt5-qtsvg qt5-qtsvg-devel qt5-qtscript qt5-qtscript-devel qt5-qttools qt5-qttools-devel qt5-qtmultimedia-devel blas blas-devel
|
2016-06-30 15:51:59 +12:00
|
|
|
```
|
|
|
|
|
2017-11-30 14:08:58 +13:00
|
|
|
TODO:
|
|
|
|
|
|
|
|
- `libmypaint` package
|
|
|
|
|
2016-11-05 11:55:23 +13:00
|
|
|
### Installing Dependencies on ArchLinux
|
2016-06-30 15:51:59 +12:00
|
|
|
|
|
|
|
```
|
2016-07-14 20:51:02 +12:00
|
|
|
$ sudo pacman -S base-devel git cmake boost boost-libs qt5-base qt5-svg qt5-script qt5-tools qt5-multimedia lz4 libusb lzo libjpeg-turbo glew freeglut sdl2 freetype2
|
2016-06-30 15:51:59 +12:00
|
|
|
$ sudo pacman -S blas cblas
|
|
|
|
```
|
|
|
|
From AUR, using eg. yaourt:
|
|
|
|
```
|
2017-11-30 14:08:58 +13:00
|
|
|
$ yaourt -S superlu libmypaint
|
2016-06-30 15:51:59 +12:00
|
|
|
```
|
|
|
|
|
|
|
|
Notes:
|
2016-11-05 11:55:23 +13:00
|
|
|
* ArchLinux has `blas` split into `blas` and `cblas`.
|
2016-06-30 15:51:59 +12:00
|
|
|
|
2016-11-05 11:55:23 +13:00
|
|
|
### Installing Dependencies on openSUSE
|
2016-06-30 15:51:59 +12:00
|
|
|
|
|
|
|
```
|
2016-11-02 23:41:40 +13:00
|
|
|
$ zypper in boost-devel cmake freeglut-devel freetype2-devel gcc-c++ glew-devel libQt5OpenGL-devel libSDL2-devel libjpeg-devel liblz4-devel libpng16-compat-devel libqt5-linguist-devel libqt5-qtbase-devel libqt5-qtmultimedia-devel libqt5-qtscript-devel libqt5-qtsvg-devel libtiff-devel libusb-devel lzo-devel openblas-devel pkgconfig sed superlu-devel zlib-devel
|
2016-06-30 15:51:59 +12:00
|
|
|
```
|
|
|
|
|
2017-11-30 14:08:58 +13:00
|
|
|
TODO:
|
|
|
|
|
|
|
|
- `libmypaint` package
|
|
|
|
|
2016-06-30 15:51:59 +12:00
|
|
|
## Build instructions
|
|
|
|
|
2016-11-05 11:55:23 +13:00
|
|
|
### Cloning the GIT Tree
|
2016-06-30 15:51:59 +12:00
|
|
|
|
|
|
|
```
|
|
|
|
$ git clone https://github.com/opentoonz/opentoonz
|
|
|
|
```
|
|
|
|
|
2016-11-05 11:55:23 +13:00
|
|
|
### Copying the 'stuff' Directory
|
2016-06-30 15:51:59 +12:00
|
|
|
|
|
|
|
TODO: some parts should really be installed in $prefix/ instead... and some other in various cache or user-local places.
|
|
|
|
cf. https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
|
|
|
Until then we just follow the Win32/OSX layout.
|
|
|
|
|
2016-11-05 11:55:23 +13:00
|
|
|
The `~/.config/OpenToonz/` directory contains your settings, work and other files.
|
2016-06-30 15:51:59 +12:00
|
|
|
|
2016-11-05 11:55:23 +13:00
|
|
|
Initialize this path with the folling commands:
|
2016-06-30 15:51:59 +12:00
|
|
|
|
|
|
|
```
|
|
|
|
$ mkdir -p $HOME/.config/OpenToonz
|
|
|
|
$ cp -r opentoonz/stuff $HOME/.config/OpenToonz/
|
|
|
|
```
|
|
|
|
|
2016-11-05 11:55:23 +13:00
|
|
|
*Currently this is required to run OpenToonz.*
|
|
|
|
|
|
|
|
### Creating SystemVar.ini
|
2016-06-30 15:51:59 +12:00
|
|
|
|
|
|
|
TODO: fix the code to discover it automatically
|
|
|
|
|
|
|
|
```
|
|
|
|
$ cat << EOF > $HOME/.config/OpenToonz/SystemVar.ini
|
|
|
|
[General]
|
|
|
|
OPENTOONZROOT="$HOME/.config/OpenToonz/stuff"
|
|
|
|
OpenToonzPROFILES="$HOME/.config/OpenToonz/stuff/profiles"
|
|
|
|
TOONZCACHEROOT="$HOME/.config/OpenToonz/stuff/cache"
|
|
|
|
TOONZCONFIG="$HOME/.config/OpenToonz/stuff/config"
|
|
|
|
TOONZFXPRESETS="$HOME/.config/OpenToonz/stuff/projects/fxs"
|
|
|
|
TOONZLIBRARY="$HOME/.config/OpenToonz/stuff/projects/library"
|
|
|
|
TOONZPROFILES="$HOME/.config/OpenToonz/stuff/profiles"
|
|
|
|
TOONZPROJECTS="$HOME/.config/OpenToonz/stuff/projects"
|
|
|
|
TOONZROOT="$HOME/.config/OpenToonz/stuff"
|
2017-07-25 22:01:17 +12:00
|
|
|
TOONZSTUDIOPALETTE="$HOME/.config/OpenToonz/stuff/studiopalette"
|
2016-06-30 15:51:59 +12:00
|
|
|
EOF
|
|
|
|
```
|
2016-11-05 11:55:23 +13:00
|
|
|
Note the generated file must not actually contain `$HOME`, this expands to an absolute path in the generated file.
|
2016-06-30 15:51:59 +12:00
|
|
|
|
2016-11-05 11:55:23 +13:00
|
|
|
### Building LibTIFF
|
2016-06-30 15:51:59 +12:00
|
|
|
|
|
|
|
TODO: make sure we can use the system libtiff instead and remove this section.
|
2017-07-11 02:22:32 +12:00
|
|
|
Features from the modified libtiff are needed currently, so this isn't a simple switch.
|
2016-06-30 15:51:59 +12:00
|
|
|
|
|
|
|
```
|
|
|
|
$ cd opentoonz/thirdparty/tiff-4.0.3
|
2016-11-05 17:39:52 +13:00
|
|
|
$ ./configure --with-pic --disable-jbig
|
2017-06-10 17:17:08 +12:00
|
|
|
$ make -j$(nproc)
|
|
|
|
$ cd ../../
|
2016-06-30 15:51:59 +12:00
|
|
|
```
|
|
|
|
|
2016-11-05 11:55:23 +13:00
|
|
|
### Building OpenToonz
|
2016-06-30 15:51:59 +12:00
|
|
|
|
|
|
|
```
|
2017-06-10 17:17:08 +12:00
|
|
|
$ cd toonz
|
2016-06-30 15:51:59 +12:00
|
|
|
$ mkdir build
|
|
|
|
$ cd build
|
|
|
|
$ cmake ../sources
|
2017-06-10 17:17:08 +12:00
|
|
|
$ make -j$(nproc)
|
2016-06-30 15:51:59 +12:00
|
|
|
```
|
|
|
|
|
|
|
|
The build takes a lot of time, be patient.
|
|
|
|
|
2016-11-05 11:55:23 +13:00
|
|
|
### Troubleshooting Build Errors
|
2016-06-30 15:51:59 +12:00
|
|
|
|
|
|
|
If something doesn't compile or link, please run `make` this way to help spot the problem:
|
|
|
|
```
|
2016-11-02 23:41:40 +13:00
|
|
|
$ LANG=C make VERBOSE=1
|
2016-06-30 15:51:59 +12:00
|
|
|
```
|
|
|
|
|
2016-11-05 11:55:23 +13:00
|
|
|
#### Debug Build
|
2016-06-30 15:51:59 +12:00
|
|
|
If you need to debug the application, you should be able to use `cmake -DCMAKE_BUILD_TYPE=Debug`.
|
|
|
|
|
|
|
|
|
2016-11-05 11:55:23 +13:00
|
|
|
### Running OpenToonz
|
2016-06-30 15:51:59 +12:00
|
|
|
|
|
|
|
You can now run the application:
|
|
|
|
|
|
|
|
```
|
2017-04-12 22:53:33 +12:00
|
|
|
$ LD_LIBRARY_PATH=./lib/opentoonz:$LD_LIBRARY_PATH ./bin/OpenToonz_1.1
|
2016-06-30 15:51:59 +12:00
|
|
|
```
|
|
|
|
|
2016-11-05 11:55:23 +13:00
|
|
|
### Performing a System Installation
|
2016-07-03 20:34:50 +12:00
|
|
|
|
|
|
|
The steps above show how to run OpenToonz from the build directory,
|
|
|
|
however you may wish to install OpenToonz onto your system.
|
|
|
|
|
|
|
|
OpenToonz will install to `/opt/opentoonz` by default, to do this run:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ sudo make install
|
|
|
|
```
|
|
|
|
|
|
|
|
Then you can launch OpenToonz by running `/opt/opentoonz/bin/opentoonz`.
|
|
|
|
|
|
|
|
You can change the installation path by modifying the `CMAKE_INSTALL_PREFIX` CMake variable.
|
|
|
|
|
2016-10-02 02:03:24 +13:00
|
|
|
----
|
|
|
|
|
|
|
|
# Linux Package Definitions
|
|
|
|
|
|
|
|
It may be helpful to use existing packages as a reference when creating a package for your own distribution.
|
|
|
|
|
|
|
|
- ArchLinux (AUR):
|
|
|
|
https://aur.archlinux.org/packages/opentoonz-git/
|
|
|
|
|
|
|
|
- App-Image (Portable):
|
|
|
|
https://github.com/morevnaproject/morevna-builds
|
|
|
|
|