KPhotoAlbum

KPhotoAlbum logo

Compiling KPhotoAlbum sources

Compiling the sources for KPhotoAlbum is the same nevertheless how you got your hand on KPhotoAlbum, let that be via anonymous git, write enabled git, or from a source packages.

KPhotoAlbum has a number of dependencies that add extra value to KPhotoAlbum, namely KIPI plugins, extracting EXIF information, and generating video thumbnails. If you don't care about all this, you may go direction to the compile instructions for KPhotoAlbum itself or check out detailed instructions from Building KPhotoAlbum in KDE UserBase Wiki

KIPI Plugins (optional)

KPhotoAlbum comes with a plugin mechanism shared between a number of imaging applications. Compiling this plugin mechanism is optional and requires a bit of extra work, but in the end it adds quite a bit of functionality to KPhotoAlbum, see the KIPI page for a full list of plugins.

Your distribution may already come with KIPI and its plugins, in that case you might not need to do anything here. If not, you must compile the packages KEXIF, KIPI, and kipi-plugins in that order before compiling KPhotoAlbum itself.

EXIF support (optional)

KPhotoAlbum has support for showing EXIF information, plus searching in the exif information. This is optional, and KPhotoAlbum can be compiled without this support.

Your distribution will likely have a package for this already, otherwise Download EXIV2 and compile using a simple configure; make; make install.

To enable KPhotoAlbum to search your images using EXIF information, you also need to have a Qt installed with SQLite support (this might be a separate package). Check the output of cmake (when compiling KPhotoAlbum itself) and/or the Help->KPhotoAlbum Feature Status to see if things got compiled correctly.

Video Thumbnails Support (optional)

KDE 4 does currently not support generating a thumbnail for video files. If you want to use KPhotoAlbum for your videos, then it is highly recommendable to install mplayer2. (mplayer works also to some extent.)

Instructions for compiling the KDE 4 version of KPhotoAlbum

  • mkdir build ; cd build
    Create a build directory where the source is compiled

  • cmake ..
    First of all notice the double dot in the above command!
    You may add a few extra options to CMake, these includes:

    • -DCMAKE_INSTALL_PREFIX=path-to-install-to - with this you can tell cmake to install KPhotoAlbum in a non default directory.
    • -DCMAKE_INSTALL_PREFIX=`kde4-config --localprefix` - Install to KDE's "local location". Add also ~/.kde/bin to path. This should get everything working properly, e.g. showing the KPhotoAlbum HandBook in KHelpCenter.
    • -DCMAKE_BUILD_TYPE=RelWithDebInfo - adding this will give you a debug build.

    An example may look like:
    cmake -DCMAKE_INSTALL_PREFIX=~/kphotoalbum -DCMAKE_BUILD_TYPE=RelWithDebInfo ..

    If the cmake fails e.g. in recent Ubuntu, try something like:
    cmake -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4 -DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix) ..

  • make
    This step will compile kphotoalbum
  • sudo make install
    Finally, install KPhotoAlbum. This step is required for it to function correctly!
  • kphotoalbum
    If you installed KPhotoAlbum in a non default directory, then you need to set the environment variable KDEDIRS to point to the directory you installed it into. This may look like this in your ~/.bashrc file:
    export KDEDIRS=~/kphotoalbum

Caveats

If the compile of KPhotoAlbum 4.2 fails during compilation of Dutch or French HandBook, your KDE version is most likely too old to include all translator entities. Easiest "fix" is to apply the following patch to "reformat" the translator names.

Of course another option is to update to KDE 4.8 (at least 4.8.1 has the required entities) on the compile machine. Even though the newer KDE is required for compiling the HandBook there is no dependency to newer version while running KPhotoAlbum.

KHelpCenter seems to be looking for documentation from only one location. If you install KPhotoAlbum to somewhere else, it might be a good idea to create appropriate symbolic links to get the help working.

  • ln -s /.../doc/HTML/en/kphotoalbum /usr/share/doc/kde/HTML/en/kphotoalbum
    Create a symbolic link to point to KPhotoAlbum installation for KHelpCenter. Of course the first parameter must reflect your installation location. This sample creates the link only for english, you might have to link to the other supported languages as well. Also the target might vary between distributions.

The same documentation is also available on-line or as a PDF


Design & Code: Jaroslav Holaň | Content: Jesper Kjær Pedersen | XHTML 1.1 | CSS