Compiling the source

Zoltan P edited this page Aug 18, 2013 · 4 revisions
Clone this wiki locally

Table of Contents

Compiling the source

GIT Development Versions

See the very short instructions at:

SVN development versions - for arhive

The development svn snapshot can be downloaded via

 svn co ktechlab

To build the version from trunk, just check it out and run

 make -f Makefile.cvs

in the projects root directory. This will generate the configure script and after that you can do

 ./configure --prefix=$(kde-config --prefix)
 su -c "make install" 

as usual.

Compiling a KDE4 branch

Since KDE4, all Makefiles in KDE projects are generated using CMake. After checking out the source (see Getting the source) of a KDE4 branch, here is how to compile and install the branch:

Create and enter a build directory (assuming, you are in the top-level source-directory of the branch):

 mkdir build && cd build

Run cmake to generate the Makefiles:

 cmake .. -DCMAKE_BUILD_TYPE=debugfull -DCMAKE_INSTALL_PREFIX=~/usr/

This command enables debug-symbols to be build and installs all files into a usr sub-directory in your home-directory. If cmake complains about any missing libraries, you need to install development versions for those. Make sure cmake finishes with no error until you proceed.

Compiling and installing the source:

 make install

If you installed into a different prefix (like suggested in the cmake-command-line, above), you need to make sure, some environment variables are set:

 export PATH=~/usr/bin:$PATH
 export LD_LIBRARY_PATH=~/usr/lib/kde4:~/usr/lib:$LD_LIBRARY_PATH
 export XDG_DATA_DIRS=~/usr/share:$XDG_DATA_DIRS
 export QT_PLUGIN_PATH=~/usr/lib/kde4:$QT_PLUGIN_PATH
 export KDEDIRS=~/usr:$KDEDIRS

After installing new versions of .desktop files or other files, you need to run:


to update all caches to use these files. This is especially important when creating new plugins. They won't be loadable by (or even visible to) the KDE's plugin-system, until you ran kbuildsycoca4.

On fresh builds, it's necessary to update the mime database. This will be done by the following command:

 update-mime-database /path/to/mime

Where /path/to/mime is the path, where the ktechlab.xml gets installed to. For example:

 update-mime-database ~/usr/share/mime

(there should be ~/usr/share/mime/packages/ktechlab.xml in this case)