-
Notifications
You must be signed in to change notification settings - Fork 163
Build Resynthesizer from source
The build system is an "automake" build system, using the GNU build tools automake, make, gcc, and so forth.
The "deprecations" branch (the "nightly" or development branch for version 3) also uses the "meson" build system, which is much simpler.
There are also a few scattered cmake files for building the independent resynthesizer library.
To build and install a clean distribution, just ...
./autogen.sh
make
make install
That installs to the shared Gimp directories. Except on Ubuntu, it installs to /usr/local/lib/gimp/2.0/plug-ins and you may need to set the GIMP Edit>Preferences>Folders>Plugins> to include that path.
There are no instructions here, nor build scripts in the repository, to build for Windows or Mac OSX.
(The meson build system in the "deprecations" branch may be more amenable to building on other platforms.)
When you run autogen.sh, it may complain of missing packages.
To build resynthesizer (or any GIMP v2 plugin in the C language) you need these developer packages:
- build-essential
- automake
- intltool
- libglib2.0-dev
- libgimp2.0-dev
The first one is all the tools to build a Debian package ( gcc and make.)
The next two are more tools.
The last two are libraries that the Resynthesizer engine links to.
Note that one plugin, the control panel plugin, is written in C and also links to the Gtk-2 library. In the future Resynthesizer version 3, that plugin is written in Python and Gtk-2 will no longer be a compile-time dependency.
Many of the plugins are written in Python. So a run-time dependency is a Python interpreter.
As of this writing, the Resynthesizer plugins are written in Python 2. Python 2 has been obsolete since January 2020 and many distributions (e.g. Ubuntu since 19.10) no longer package it. The GIMP organization itself still supports building a Python 2 expressly to support the GIMP app. However, some distributors (e.g. Ubuntu) do not package that Python 2, which was formerly packaged with the name "gimp-python." When your distribution does not have the package "gimp-python", the standard advice is "build GIMP yourself", but that is difficult.
The future version 3 of the GIMP app, and the Resynthesizer, will be Python 3 compatible.
The default gcc flags seem to be: "-g -O2 -Wall". To optimize more, pass the CFLAGS (a choice by the builder to alter compilation): "make CFLAGS=-O3"
A file "lib/buildSwitches.h" lets you configure certain features of the Resynthesizer engine. Briefly, without details:
One feature of the engine is "threads." Threading is the default. Threading does NOT help the performance as much as you might expect. Threading makes the engine non-deterministic, i.e. the results are not reproducible from run to run. By default threading uses GLib threads but other people have been able to compile Resynthesizer with POSIX threads.
Another feature is "GLib dependence". Using Glib is the default. GLib is intended to help provide platform independence. There is some conditionally compiled support to NOT using GLib.
Contributors have localized (internationalized, i18n) the plugins.
To build for another spoken language, you may also need to create a symbolic link to your preferred language file, for example:
sudo ln -s /usr/local/share/locale/fr/LC_MESSAGES/resynthesizer.mo /usr/share/locale/fr/LC_MESSAGES/resynthesizer.mo
Most build files (Makefile.am, configure.ac, etc.) were copied from the gimp-plugin-template 2.2.0, and slightly modified.