Return to gThumb main page
Development
This is the development page for gthumb
1. Hacking gThumb
Patches incorporating new features and new strings should be based on the git master branch.
gthumb uses the Meson build system. You can compile the most recent development code on your system if you have the latest release of a bleeding-edge distro like Fedora or Ubuntu. The basic procedure is this:
git clone https://gitlab.gnome.org/GNOME/gthumb.git cd gthumb CFLAGS="-ggdb" meson --prefix=/usr build ninja -C build sudo ninja -C install
See Git/Developers and GitLab for more information.
If you want to run gThumb without having to install it (not to overwrite your stable version of gThumb for example), you can use the --enable-run-in-place, like this:
CFLAGS="-ggdb",--enable-run-in-place meson --prefix=/usr
A segmentation fault may result if gthumb is run after moving the source directory. To solve this run "make clean", followed by the above command, and finally "make" once more.
If you make major changes to the code, it is generally helpful to run cppcheck to check your code, like this:
cppcheck -q --enable=unusedFunctions .
or, adding additional style checks,
cppcheck -q --enable=all .
This may give some false warnings, however (especially with --enable=all).
2. Dependencies
To compile gThumb, you will need some packages that are not normally installed on a desktop system.
2.1. Ubuntu
In 2018, the minimum ones were:
sudo apt-get install libtiff-dev libtiff5-dev libclutter-gtk-1.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsoup-gnome2.4-dev libsecret-1-dev libbrasero-media3-dev libdbus-glib-1-dev bison flex
Option |
Packages |
TIFF tools |
libtiff5-dev |
Clutter support (used for slideshow) |
libclutter-gtk-1.0-dev |
GStreamer support (to display videos) |
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev |
Web services support |
libsoup-gnome2.4-dev |
To use GNOME Keyring |
libsecret-1-dev |
Burn disc support |
libbrasero-media3-dev libdbus-glib-1-dev |
Web albums |
bison flex |
2.2. On Fedora
Build dependencies can be installed via the command :
dnf builddep gthumb
These are the build dependencies of the fedora-packaged rpm version of gthumb. Additional packages might be necessary for extensions. If the autogen process fails, and says "missing somefile.so", you can use "dnf provides */somefile.so" to figure out the needed package.
3. Using git
To get code:
git clone https://gitlab.gnome.org/GNOME/gthumb.git
To generate a merge request (patch), see Git/Developers and GitLab.
You can also quickly browse the code through the git web viewer here
More information about git is available here:
4. Extensions / Plug-Ins
gThumb supports plug-ins. Many of the existing tools are implemented as plug-ins. If you want to add a feature (like geolocation, etc) consider writing an extension!