KDE PIM/Development/Start: Difference between revisions

From KDE Community Wiki
(Update how-to-build section, recommend kdesrc-build over ancient shell scripts)
Line 46: Line 46:


== Prerequisites ==
== Prerequisites ==
the whole KDE PIM suite is composed of four modules. You're highly encouraged to checkout and build all of them:
* [http://www.akonadi-project.org/ Akonadi], The PIM Storage Service
* KDEPIMLIBS, the base libraries for all the PIM applications
* KDEPIM-RUNTIME, the Akonadi resources which are required at runtime to let the kdepim applications communicate with the Akonadi server
* KDEPIM, All the PIM applications
In order to build and use the KDEPIM modules, you may use the last released KDE version.


You might want to make a backup of your valuable data, though. Most of it lives in <small>.kde</small>, in your home directory; You may also backup your Akonadi server config files in <small>$HOME/.config/akonadi</small> and your kdepim applications data in <small>$HOME/.local/share</small>.
You might want to make a backup of your valuable data, though. Most of it lives in <small>.kde</small>, in your home directory; You may also backup your Akonadi server config files in <small>$HOME/.config/akonadi</small> and your kdepim applications data in <small>$HOME/.local/share</small>.
Line 60: Line 52:
== Git - a Source Code Control System ==
== Git - a Source Code Control System ==


The KDE PIM repositories can be visited via WWW at http://projects.kde.org or http://gitweb.kde.org.
The KDE PIM repositories can be visited via WWW at http://quickgit.kde.org
 
== The really short guide ==
 
This short guide will explain how to build Akonadi, kdepim and kdepim-runtime checked out from Git.
 
You may use the following commands to check out the different repositories:
 
* Akonadi:
<syntaxhighlight lang="bash">
git clone http://anongit.kde.org/akonadi
</syntaxhighlight>
 
* kdepimlibs:
<syntaxhighlight lang="bash">
git clone http://anongit.kde.org/kdepimlibs
</syntaxhighlight>
 
* kdepim-runtime:
<syntaxhighlight lang="bash">
git clone http://anongit.kde.org/kdepim-runtime
</syntaxhighlight>
 
* kdepim:
<syntaxhighlight lang="bash">
git clone http://anongit.kde.org/kdepim
</syntaxhighlight>
 
You can now build the modules in the following order:
<pre>
Akonadi > kdepimlibs > kdepim > kdepim-runtime
</pre>
 
Complete guides to build KDE modules can be found on http://techbase.kde.org.
 
== The little longer guide ==
If you are in the position to have a distribution (debian,ubuntu,...) , that doesn't ship the newest kde stable version you have to build more packages.
First you should get the two really fancy scripts build-config, findup, kde-bashrc from [http://techbase.kde.org/Getting_Started/Build/Environment Getting Started/Build/Environment]. For the next part I assume that you have following layout and would suggest to create a dececated user:
<pre>
~/bin/findup
~/build-config
~/kde/src
~/kde/build
~/kde/inst
~/kde/kde-bashrc
~/kde/get-all.sh
~/kde/build-all.sh
</pre>
 
Now make sure that build-config is refernced in your .profile as fall back you should add /usr:
<syntaxhighlight lang="bash">
...
 
source ./build-config
export KDEDIRS=$KDEDIRS:/usr
</syntaxhighlight>
 
Now also install the two scripts get-all.sh and /build-all.sh from below.
 
And now run them:
<syntaxhighlight lang="bash">
cd ~/kde
get-all.sh
build-all.sh
</syntaxhighlight>
 
 
Afterwars you can just login with your new created user and have the possibility to start developing :)
 
You may need much packages to install on your system for compiling (see [http://techbase.kde.org/Getting_Started/Build/Distributions Getting Started/Build/Distributions]).
 
 
 
===get-all.sh===
<syntaxhighlight lang="bash">
#!/bin/bash
 
DIR=`pwd`
PROGS=( kdelibs soprano strigi nepomuk-core nepomuk-widgets kactivities kde-runtime akonadi kdepimlibs kdepim-runtime kdepim )
 
mkdir -p $DIR/src
 
for D in "${PROGS[@]}"
do
        echo
        echo "Getting $D"
        echo
 
        cd $DIR/src
        git clone kde:$D.git
done
</syntaxhighlight>
 
 
===build-all.sh===
<syntaxhighlight lang="bash">
#!/bin/bash
 
DIR=`pwd`
PROGS=( soprano strigi kdelibs nepomuk-core nepomuk-widgets kactivities kde-runtime akonadi kdepimlibs kdepim-runtime kdepim )


source kde-bashrc
== Compiling ==


for D in "${PROGS[@]}"
KDE PIM is currently split to over 40 modules. To build them all in the correct order, one should use [https://kdesrc-build.kde.org/ kdesrc-build]:
do
        echo
        echo "Compiling $D"
        echo


        cs $D
kdesrc-build kde-pimlibs kde-pim
        git pull --rebase
        cmakekde || break
done
</syntaxhighlight>


Idea taken from [http://blogs.fsfe.org/torsten.grote/2012/10/03/compiling-kde-kontact-from-source/ Torsten Grote:compiling-kde-kontact-from-source]
KDE PIM depends on KDE Frameworks 5, Qt 5 and some additional libraries (like libical). If you distribution provides new-enough versions of all these libraries, you can compile KDE PIM against them, just make sure you have all the development packages for those libraries installed.

Revision as of 08:01, 20 July 2016

Getting Started

To get started, all you really need is a git clone. After that, you can compile and run the latest-and-greatest (and maybe buggy) versions of the KDE PIM applications. When you find a bug, you can fix it, create a patch, and send it to us! That's the way KDE PIM applications are continually improving. There is much more information available to begin with, though.

Here is a checklist of things to launch yourself into the world of KDE PIM development. For lots of them, it is most important that you know they exist:

  • Subscribe to the right mailing lists. Read them regularly.
  • Browse the information about the development tools, to choose one. Most KDE PIM hackers use kate, vi, or emacs as editor and just compile in a konsole window, though.
  • Take a brief look at the Qt documentation. It is excellent, and you should know about QWidgets and QObjects a little before continuing.
  • Take a brief look at the KDE documentation. It is a bit overwhelming.
  • Spend some time over at the KDE Community website.
  • Get the prerequisites for building KDE PIM master. Note that you really want to follow master to make a positive contribution to KDE PIM.

If you work on or with the last released version, you're usually a month or four behind the times, and that makes a huge difference in KDE PIM. You can work with a stable system -- the latest released KDE libs and base -- and put (relatively) unstable PIM HEAD on it.

  • Clone the relevant Git repositories.
  • Compile it and install.
  • Report bugs, wishes, fix bugs, get involved!

Mailing Lists

Mailing lists are probably the ultimate source of development information. Follow discussions of KDE core and application developers and ask your questions. Unless you don't think about what you are saying, you will surely get an answer. Subscribe to the kde-pim mailing list. It is for discussion about development. Please don't wildly post all your compilation problems there. Ask on IRC for such issues.

IRC (Chat)

Most of the developers hang around in one development IRC channel or another. On freenode (irc.kde.org), you can find:

  • #KDE for the user questions.
  • #akonadi for development discussion on Akonadi.
  • #kontact for development discussion on Kontact and its components. Please don't post user-questions there.

There are a variety of IRC (Chat) programs available. KDE ships with Konversation. XChat is available in many installations as well.

Common KDE Developer information

Visit the KDE techbase site for very detailed information about KDE development. You'll find lots of stuff, e.g. documentation, tutorials, reference guides, etc.

http://techbase.kde.org/Projects/PIM has lots of informations you may read before starting contributing to KDE PIM.

http://userbase.kde.org/Kontact is the central place for user tips and tricks.

KDevelop is an Integrated Development Environment for KDE.

For recent news about KDE development you may not miss the KDE news site at dot.kde.org.

Prerequisites

You might want to make a backup of your valuable data, though. Most of it lives in .kde, in your home directory; You may also backup your Akonadi server config files in $HOME/.config/akonadi and your kdepim applications data in $HOME/.local/share. It may be easier to just create an additional user and give it a copy of your data, and run PIM HEAD there.

Git - a Source Code Control System

The KDE PIM repositories can be visited via WWW at http://quickgit.kde.org

Compiling

KDE PIM is currently split to over 40 modules. To build them all in the correct order, one should use kdesrc-build:

kdesrc-build kde-pimlibs kde-pim

KDE PIM depends on KDE Frameworks 5, Qt 5 and some additional libraries (like libical). If you distribution provides new-enough versions of all these libraries, you can compile KDE PIM against them, just make sure you have all the development packages for those libraries installed.