From 3cb5de860c5426893845252fa325c03dcc3ba11e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 30 Jun 2016 13:51:59 +1000 Subject: [PATCH] Linux support working on a basic level (builds and runs) Add docs on building with Linux. --- README.md | 1 + doc/how_to_build_linux.md | 147 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+) create mode 100644 doc/how_to_build_linux.md diff --git a/README.md b/README.md index 857848c4..d1261571 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Older versions and unstable nightly build are also available at $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" +TOONZSTUDIOPALETTE="$HOME/.config/OpenToonz/stuff/projects/studiopalette" +EOF +``` +Note the generated file must not actually contain "$HOME", this shell command repaces it with /home/youraccount in the generated file. + +### Building the tiff library from thirdparty + +TODO: make sure we can use the system libtiff instead and remove this section. +Features from the modified libtiff and needed currently, so this isn't a simple switch. + +``` +$ cd opentoonz/thirdparty/tiff-4.0.3 +$ CFLAGS="-fPIC" ./configure && make +$ cd - +``` + +### Compiling the actual application + +``` +$ cd ../../toonz +$ mkdir build +$ cd build +$ cmake ../sources +$ make +``` + +The build takes a lot of time, be patient. + +### Debugging the build + +If something doesn't compile or link, please run `make` this way to help spot the problem: +``` +LANG=C make VERBOSE=1 +``` + +#### Debug build +If you need to debug the application, you should be able to use `cmake -DCMAKE_BUILD_TYPE=Debug`. + + +### Running the application + +You can now run the application: + +``` +$ cd bin +$ LD_LIBRARY_PATH=image:toonzlib:toonzfarm/tfarm:tnzbase:tnztools:stdfx:sound:tnzcore:tnzext:colorfx:toonzqt toonz/OpenToonz_1.0 +``` +