Kontact development

From Kolab Wiki

Jump to: navigation, search
The content of this page is outdated. e35 will not be further developed. Please refer to the upstream kde documentation on how to build kontact.
If you have checked or updated this page and found the content to be suitable, please remove this notice. Alternatively, check docs.kolab.org for more recent information.

How to start hacking the KDE Kontact client for Kolab.

Overview

As detailed in the KDE Kontact overview for users there are different branches available for the Kontact client.

We will select the enterprise35 branch here since it is the currently active Kolab development branch. The Kolab specific KDE4 branch has not been opened yet and the proko2 branch only gets backported patches.

It will be necessary to create a complete KDE development environment including QT, the KDE libraries and all that is needed to create a running KDE system. The easiest way to create that will be kdesvn-build.

Creating an enterprise35 development environment

Create a directory for your development environment somewhere on your system and download kdesvn-build there:

mkdir kdesvn
cd kdesvn
wget http://kdesvn-build.kde.org/releases/kdesvn-build-1.4.1.tar.bz2
tar xvfj kdesvn-build-1.4.1.tar.bz2

Once you have that you'll need to create the enterprise35 sub environment and create a configuration file there:

mkdir enterprise35
cd enterprise 35
vi .kdesvn-buildrc

This is the content for .kdesvn-buildrc:

# Configuration file for Kontact enterprise 35

global
	use-stable-kde true
	binpath /bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
	binpath /usr/lib/ccache/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
	source-dir /home/wrobel/usr/tmp/source/kde-svn/enterprise/source
	build-dir /home/wrobel/usr/tmp/source/kde-svn/enterprise/build
	kdedir /home/wrobel/usr/tmp/source/kde-svn/enterprise/install
	qtdir ${build-dir}/qt-copy # Use built Qt (Qt 3).
	configure-flags --enable-debug
	cxxflags -pipe
	make-options -j2
end global

module qt-copy
	configure-flags -system-zlib -qt-gif -system-libjpeg -system-libpng \
			-no-exceptions -fast -thread -debug 
	apply-qt-patches true          # Works with Qt 3 and 4, recommended as well.
end module

module arts
end module

module kdelibs
	configure-flags --enable-sendfile --enable-mitshm
end module

module kdebase
	configure-flags --with-pam --with-shadow
end module

module kdepim
      override-url svn://anonsvn.kde.org/home/kde/branches/kdepim/enterprise/kdepim
end module

And now, still within enterprise35 you can call kdesvn-build to create the environment:

../kdesvn-build-1.4.1/kdesvn-build --rc-file .kdesvn-buildrc

Hopefully there'll be no errors and you can subsequently start your Kontact (you might wish to call kolabwizard in the same fashion as detailed below before you actually run kontact'):

KDEHOME="~/.kde-enterprise35" \
KDEDIR="/MY/PATH/TO/THE/DEV/ENVIRONMENT/kdesvn/enterprise35/install" \
LDPATH="${KDEDIR}/lib:${LDPATH}" \
PATH="${KDEDIR}/bin:${PATH}" \
KDEDIRS="${KDEDIR}"  \
install/bin/kontact

Help?! ... it fails

The build logs will be in source/log and in most cases the configure run will probably fail because you do not have all necessary build requirements installed on your system. Either it is directly clear from the configure output what you'd need to install or you read the config.log files ('build/MODULE/config.log):

Personal tools