|
|
(40 intermediate revisions by 12 users not shown) |
Line 1: |
Line 1: |
− | <!--Categories--> | + | <!-- Page info --> |
− | {{l|Category:Building}} | + | {{Title|Build Instructions}} |
| + | {{Category|Manual}} |
| + | <!-- Page info end --> |
| | | |
− | == Notes ==
| + | See https://synfig-docs-dev.readthedocs.io/en/latest/common/building.html |
− | | + | |
− | * If you are using the released versions instead of GIT, none of the libtoolize or autoreconf steps are necessary. For released versions, "./configure && make && sudo make install" should be enough.
| + | |
− | | + | |
− | * If you are using packages for synfig's dependencies, you want the '''development packages''' not the main packages. Check below for your distribution's packages.
| + | |
− | | + | |
− | * Please read the {{l|Source code|source code}} page to check out the latest code. Please also check the {{l|Download|download page}} and the {{l|FAQ}} to find out about any issues that you may run into along the way.
| + | |
− | | + | |
− | * Some Linux/BSD distros (Like Gentoo Linux) have a pkg-config that doesn't look in /usr/local/lib/pkgconfig by default. So if you are installing in anywhere other than the system pkg-config path, please run "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig" or similar before building or installing anything.
| + | |
− | | + | |
− | * Don't use automake 1.4, there are problems with it.
| + | |
− | | + | |
− | * Using automake 1.9, 'make install' seems to re-link and re-install all the synfig core modules every time whether they have changed or not. If you intend to build code repetitively you can export export CXX="/usr/bin/ccache /usr/bin/g++". This allows to not rebuild the already build modules so they taken from the cache.
| + | |
− | | + | |
− | * After you obtain the source code using the git repository, you obtain a single 'synfig' folder where the three main modules (etl, synfig-core and synfig-studio) are up to date. '''The trunk folder has been removed in the git tree'''. Please modify the build instructions for other platforms.
| + | |
− | | + | |
− | * If you want to test a particular branch of the repository do the following:
| + | |
− | <pre>
| + | |
− | ~/synfig$ git branch -r
| + | |
− | </pre>
| + | |
− | You'll obtain a list of the remote branches that exists in the repo. For example:
| + | |
− | <pre>
| + | |
− | origin/HEAD
| + | |
− | origin/genete_bones
| + | |
− | origin/genete_canvasview
| + | |
− | origin/genete_master
| + | |
− | origin/genete_onionskin
| + | |
− | origin/genete_scale_reverse
| + | |
− | origin/genete_setup_dialog
| + | |
− | origin/genete_svg
| + | |
− | origin/gerco_opengl
| + | |
− | origin/master
| + | |
− | origin/uiomae_opengl
| + | |
− | origin/zelgadis_cia
| + | |
− | origin/zelgadis_master
| + | |
− | </pre>
| + | |
− | | + | |
− | Then to checkout properly a remote branch you have to create a local branch to track a particular remote branch and checkout it. For example:
| + | |
− | <pre>
| + | |
− | ~/synfig$ git branch --track test_canvas origin/genete_canvasview
| + | |
− | ~/synfig$ git checkout test_canvas
| + | |
− | </pre>
| + | |
− | | + | |
− | Your code is ready to be built on that branch.
| + | |
− | | + | |
− | * The CVS requirement is only because the autopoint program run by autoreconf needs CVS. You can avoid the need for CVS by disabling the translation/gettext stuff in configure.ac.
| + | |
− | | + | |
− | * If you don't want to install to a system-wide directory using sudo, run something like these commands before starting:
| + | |
− | | + | |
− | <pre>
| + | |
− | prefix=$(pwd)/install
| + | |
− | export PKG_CONFIG_PATH="$prefix/lib/pkgconfig"
| + | |
− | export PATH=$(pwd)/synfig-core/src/tool/.libs:$PATH
| + | |
− | export CXX="/usr/bin/ccache /usr/bin/g++"
| + | |
− | </pre>
| + | |
− | | + | |
− | ** export PKG_CONFIG_PATH="$prefix/lib/pkgconfig" allows to find the linking libraries.
| + | |
− | ** export PATH=$(pwd)/synfig-core/src/tool/.libs:$PATH allows synfigstudio find the correct * libraries to render the icons for the toolbox etc.
| + | |
− | ** export CXX="/usr/bin/ccache /usr/bin/g++" allows to use the cache to avoid rebuilding.
| + | |
− | | + | |
− | And when you run ./configure, run it with --prefix="$PREFIX" and don't use sudo when you do make install.
| + | |
− | | + | |
− | * See the automatic building script attached.
| + | |
− | | + | |
− | == System-specific instructions ==
| + | |
− | Please update them including the new GIT repo.
| + | |
− | | + | |
− | * Gentoo: {{l|Gentoo Ebuilds|ebuilds}} are available for both release versions and GIT
| + | |
− | * MacOS X: {{l|Building_On_Mac_OS_X|instructions for building}} with the GTK+ Aqua port are available.
| + | |
− | * PCLinuxOS: {{l|PCLinuxOS build instructions|build instructions}}
| + | |
− | * Windows: {{l|Windows build instructions|instructions for building}} in {{l|Mingw_installation|mingw}} are available.
| + | |
− | | + | |
− | ==System wide build Instructions==
| + | |
− | | + | |
− | === ETL ===
| + | |
− | | + | |
− | ETL is a template library, there is nothing to build really, it just needed to be installed.
| + | |
− | | + | |
− | '''Requires''': autoconf automake<br>
| + | |
− | * Debian: build-essential autoconf automake libtool
| + | |
− | * OS X: make sure you have updated autoconf and automake with MacPorts
| + | |
− | | + | |
− | ''Type the following commands at the directory where you cloned the git repo''
| + | |
− | <pre>
| + | |
− | $ cd synfig/ETL
| + | |
− | $ autoreconf --install --force
| + | |
− | $ ./configure
| + | |
− | $ sudo make install
| + | |
− | </pre>
| + | |
− | | + | |
− | === synfig-core ===
| + | |
− | | + | |
− | '''Requires''': ETL (etl-dev, already installed if you successfully built etl), libxml++, libsigc++, libltdl, libtool, gettext, cvs<br>
| + | |
− | * Debian: etl-dev libxml++2.6-dev libsigc++-2.0-dev libltdl3-dev libtool gettext cvs
| + | |
− | * Gentoo: virtual/ETL dev-cpp/libxmlpp dev-libs/libsigc++ dev-util/cvs
| + | |
− | ** If you are using ./configure --prefix="$PREFIX" to configure synfig, do not install virtual/ETL.
| + | |
− | *OS X use glibtoolize instead of libtoolize, as Apple renamed it.
| + | |
− | | + | |
− | '''Note''': libpng isn't required to build synfig, but if you build synfig without PNG support and go on to build synfigstudio, that step will fail (because the build process for synfigstudio uses synfig to create .png icon files). The package is libpng12-dev on Debian or media-libs/libpng on Gentoo.
| + | |
− | | + | |
− | '''Note''': the 'configure.ac' file in the synfig-core directory doesn't work with libtool version 2, as shipped with ubuntu 8.10. To work around the problem until a proper fix is found, comment out line 622 or thereabouts (it says "AC_CONFIG_SUBDIRS(libltdl)") by putting a "#" at the front of the line. The line is required for older versions of libtool, as shipped with other distributions. DO it straight with this command:
| + | |
− | <pre> sed -i 's/^AC_CONFIG_SUBDIRS/# AC_CONFIG_SUBDIRS/' synfig-core/configure.ac </pre>
| + | |
− | | + | |
− | '''Optional''': libpng, libmng, libjpeg, libfreetype, libfontconfig, libopenexr, libavcodec, libmagick++, vimage (MacOS only, proprietary)<br>
| + | |
− | * Debian: libpng12-dev libmng-dev libjpeg62-dev libfreetype6-dev libfontconfig1-dev libopenexr-dev libavcodec-dev libavformat-dev libswscale-dev libmagick++9-dev
| + | |
− | * Gentoo: sys-devel/libtool media-libs/libpng media-libs/libmng media-libs/jpeg media-libs/freetype media-libs/fontconfig media-libs/openexr media-libs/tiff
| + | |
− | *Ubuntu (since Jaunty): Same libraries as Debian but do not use libmagick++9-dev, use graphicsmagick-libmagick-dev-compat instead.
| + | |
− | | + | |
− | '''Runtime''': encodedv (from libdv), ffmpeg, convert (from imagemagick)
| + | |
− | * Debian: libdv-bin ffmpeg imagemagick
| + | |
− | * Gentoo: media-libs/libdv media-video/ffmpeg media-gfx/imagemagick
| + | |
− | | + | |
− | ''Type the following commands at the directory where you cloned the git repo''
| + | |
− | <pre>
| + | |
− | $ cd synfig/synfig-core
| + | |
− | $ libtoolize --ltdl --copy --force
| + | |
− | $ autoreconf --install --force
| + | |
− | $ ./configure
| + | |
− | $ make
| + | |
− | $ sudo make install
| + | |
− | </pre>
| + | |
− | | + | |
− | ''Note'':
| + | |
− | | + | |
− | * Don't use --enable-half, it is slow.
| + | |
− | | + | |
− | === synfig-studio ===
| + | |
− | | + | |
− | ''Requires'': ETL (etl-dev, already installed if you successfully built etl), synfig (libsynfig-dev, already installed if you successfully built synfig-core), gtkmm >= 2.4, gtk >= 2.0, glibmm, libsigc++, libltdl, libtool, gettext, cvs<br>
| + | |
− | * Debian: etl-dev libsynfig-dev libgtkmm-2.4-dev libgtk2.0-dev libglibmm-2.4-dev libsigc++-2.0-dev libltdl3-dev libtool gettext cvs
| + | |
− | * Gentoo: virtual/ETL virtual/synfig dev-cpp/gtkmm-2.4 dev-libs/libsigc++ sys-devel/libtool
| + | |
− | ** If you are using ./configure --prefix="$PREFIX" to configure synfigstudio, do not install virtual/ETL or virtual/synfig.
| + | |
− | ''Optional'': fonts (for the images), [http://www.fmod.org FMOD] (version 3.x, proprietary)
| + | |
− | * Debian: ttf-freefont ttf-dejavu ttf-dustin
| + | |
− | * Gentoo: freefonts dejavu
| + | |
− | | + | |
− | ''Type the following commands at the directory where you cloned the git repo''
| + | |
− | <pre>
| + | |
− | $ cd synfig/synfig-studio
| + | |
− | $ autoreconf --install --force
| + | |
− | $ ./configure
| + | |
− | $ make
| + | |
− | $ sudo make install
| + | |
− | </pre>
| + | |
− | | + | |
− | <!--
| + | |
− | | + | |
− | == synfig-docs ==
| + | |
− | | + | |
− | (This step isn't required to run synfig or synfigstudio, and the documents it gets you are really quite out of date)
| + | |
− | | + | |
− | This is basically a copy of what is on this wiki.
| + | |
− | | + | |
− | Requires: sgml processor, ldp docbook stylesheets, db2ps, db2pdf
| + | |
− | * Debian: openjade ldp-docbook-dsssl docbook-utils
| + | |
− | | + | |
− | <pre>
| + | |
− | make multiple-html
| + | |
− | make ps
| + | |
− | make pdf
| + | |
− | </pre>
| + | |
− | | + | |
− | -->
| + | |
− | | + | |
− | == finalizing ==
| + | |
− | | + | |
− | Depending on where you installed synfig to, you might have to tell your system where the libraries can be found. That can be done via the following command:
| + | |
− | | + | |
− | <pre>
| + | |
− | $ sudo ldconfig
| + | |
− | </pre>
| + | |
− | | + | |
− | | + | |
− | == Automatic build script ==
| + | |
− | | + | |
− | If you want to build a binary for testing or debugging proposes you can run this script:
| + | |
− | | + | |
− | <pre>
| + | |
− | #!/bin/sh
| + | |
− | CPUS=4
| + | |
− | prefix=$(pwd)/install
| + | |
− | export PKG_CONFIG_PATH="$prefix/lib/pkgconfig"
| + | |
− | export PATH=$(pwd)/synfig-core/src/tool/.libs:$PATH
| + | |
− | export CXX="/usr/bin/ccache /usr/bin/g++"
| + | |
− | # export CXX="/usr/bin/ccache g++-snapshot"
| + | |
− | # This command comments out the line in configure.ac if it isn't already
| + | |
− | # commented. Needed for Ubuntu 8.10 or higher
| + | |
− | # Uncomment it if needed.
| + | |
− | # sed -i 's/^AC_CONFIG_SUBDIRS/# AC_CONFIG_SUBDIRS/' synfig-core/configure.ac
| + | |
− | | + | |
− | cd ETL &&
| + | |
− | autoreconf --install --force &&
| + | |
− | ./configure --prefix $prefix &&
| + | |
− | make --debug=b install &&
| + | |
− | \
| + | |
− | cd ../synfig-core &&
| + | |
− | libtoolize --ltdl --copy --force &&
| + | |
− | autoreconf --install --force &&
| + | |
− | ./configure --prefix $prefix --enable-optimization=0 --enable-debug &&
| + | |
− | make --debug=b -j $CPUS install &&
| + | |
− | \
| + | |
− | cd ../synfig-studio &&
| + | |
− | autoreconf --install --force &&
| + | |
− | ./configure --prefix $prefix --enable-optimization=0 --enable-debug &&
| + | |
− | make --debug=b -j $CPUS install
| + | |
− | </pre>
| + | |
− | | + | |
− | The binaries are installed at $(pwd)/install/bin. Alter the script according to your preferences.
| + | |
− | | + | |
− | Your system must satisfy synfig's build requiments, the sript won't do it for you. Also be sure what git branch are you building each time. In some cases you'll need to make clean on each folder first.
| + | |
− | | + | |
− | Be sure that '''you have ccache installed''' on your system because you will get errors otherwise.
| + | |