KDE PIM/Development: Difference between revisions

From KDE Community Wiki
(SVN -> git)
(Update the path to build-include file)
 
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
= Developer Information =
'''KDE PIM''' is an application suite that helps you to organize your mail, addresses, todo's, appointments -- and keep this information in sync with your mobile phone.


'''KDE PIM''' is an application suite for [http://www.kde.org KDE SC] that helps you to organize your mail, addresses, todo's, appointments, and so on. Beyond this, it keeps your mobile phone and PDA in-sync with your desktop data.
Development of KDE PIM applications takes place in [https://invent.kde.org/ KDE's git repositories]. Together, the applications are about 74MB of source. This page gives you a place to start and explains how development within KDE PIM works.


Development of KDE PIM applications takes place mostly in [http://gitweb.kde.org/ KDE git repositories]. Together, the applications are about 74MB of source -- a daunting amount. These developers webpages are meant to give you a place to start, to collect documentation and explain how development within KDE PIM works.


== Getting Started ==
= Prerequisites =
* You might want to make a backup of your valuable data. Most of it lives in <nowiki>~/.kde</nowiki>. You may also backup your Akonadi server config files in <nowiki>~/.config/akonadi</nowiki> and your kdepim applications data in <nowiki>~/.local/share/akonadi</nowiki>. It may be easier to just create an additional user and give it a copy of your data, and run PIM master there.


To get started, all you really need are a few git clones. After that, you can compile and run the latest-and-greatest (and probably 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 [[KDE_PIM/Development/Start|much more]] information available to begin with, though.
* You need all non-KDE dependencies for PIM as <code>kdesrc-build</code> only builds the KDE modules. Follow [https://community.kde.org/Get_Involved/development#Download_non-KDE_dependencies this link] to install those. <br/>This include the Qt dependencies needed, but if your OS doesn't provide sufficiently new versions of these packages, or in case you want to build them yourself, you can do that too by modifying your <code>~/.kdesrc-buildrc</code> file appropriately.


== 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. The following mailing lists might be of interest for you:
= Compiling KDE PIM =
KDE PIM is currently split across 40 modules. To build them all in the correct order, you should use [https://kdesrc-build.kde.org/ kdesrc-build]. Setting it up is detailed at [[Get Involved/development]].


The kdepim list [mailto:[email protected] [email protected]] is for ''discussion about development'' of the KDE personal information management suite, KDE PIM. Read more about how to subscribe to the [[KDE_PIM/Development/Start#Mailing Lists|kde-pim mailinglist]]. For ''questions about using KDE PIM'', please refer to the mailinglist [[KDE_PIM/Contact#The_users_mailing_list|kdepim-users]].
{{Note|You really need to build and submit patches against Git 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.}}


The mailinglist kde-devel at [mailto:kde-devel@kde.org kde-[email protected]] is for discussions about general KDE application development. Finally, the [mailto:[email protected] [email protected]] mailing list is for Qt developers. As KDE is based on Qt, you may find this list valuable.
In addition to the lines in [[Get Involved/development]] suggested to be removed from <code>~/.kdesrc-build</code>, you also have to remove the following line from it:


== Developer meetings ==
<pre>
include ~/kde/src/kdesrc-build/data/build-include/kf5-qt5.ksb
</pre>


One of the fun ways to improve the KDE PIM codebase is to get together for a [[KDE_PIM/Meetings|hackfest]]. Since most -- but by no means all -- of the KDE PIM developers are in Western Europe, getting together isn't all that hard to do. Over the years we've had seven meetings in Osnabrück, and several elsewhere.
Add the following to your <nowiki>~/.kdesrc-buildrc</nowiki> file:


The last meeting / hackfest was in january 2009 in Osnabrück.
<pre>
include ~/kde/src/kdesrc-build/data/build-include/kf5-frameworks.ksb
include ~/kde/src/kdesrc-build/data/build-include/kf5-kdepim.ksb
include ~/kde/src/kdesrc-build/data/build-include/kf5-applications.ksb
include ~/kde/src/kdesrc-build/data/build-include/kf5-workspace.ksb
</pre>
 
In addition, you cannot use the standard <nowiki>prefix.sh</nowiki> file mentioned on the [[Get Involved/development]] page; you must use a custom script:
 
<pre>
# This must match the path in kdedir option in kdesrc-buildrc
export KDE_PREFIX=~/kde/usr
export PATH="${KDE_PREFIX}/bin:${PATH:-/usr/local/bin:/usr/bin:/bin}"
export LD_LIBRARY_PATH="${KDE_PREFIX}/lib64:${KDE_PREFIX}/lib:$LD_LIBRARY_PATH"
export QT_PLUGIN_PATH="${KDE_PREFIX}/lib64/plugins:${KDE_PREFIX}/lib/plugins:${QT_PLUGIN_PATH:-/usr/lib64/qt5/plugins:/usr/lib/qt5/plugins}"
export QML2_IMPORT_PATH="${KDE_PREFIX}/lib64/qml:${KDE_PREFIX}/lib/qml:${QML2_IMPORT_PATH:-/usr/lib64/qt5/qml:/usr/lib/qt5/qml}"
export PKG_CONFIG_PATH="${KDE_PREFIX}/lib64/pkgconfig:${KDE_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH:-/usr/lib64/pkgconfig:/usr/lib/pkgconfig}"
export XDG_DATA_DIRS="${KDE_PREFIX}/share:${XDG_DATA_DIRS:-/usr/share}"
export SASL_PATH="${KDE_PREFIX}/lib64/sasl2:${KDE_PREFIX}/lib/sasl2:${SASL_PATH:-/usr/lib64/sasl2:/usr/lib/sasl2}"
export XDG_CONFIG_DIRS="${KDE_PREFIX}/etc/xdg:${XDG_CONFIG_DIRS:-/etc/xdg}"
# Un-comment this if you want to have the devel version in parallel with the stable version installed by your distro
#export AKONADI_INSTANCE=devel
</pre>
 
You may need to update some of the variables to fit your environment. For example, on a 64-bit system running Ubuntu, the paths <code>*/lib64/*</code> should be changed to <code>*/lib/x86_64-linux-gnu/*</code>
 
Now, compile everything!
{{Input|1=<nowiki>
kdesrc-build kde-pim
</nowiki>}}
 
If the build fails, you can check the log file to see why it failed. It will likely be because of a missing dependency.
To search for the dependency, you may use install the package <code>apt-file</code> and use <code>apt-file search <name></code>, though there are other ways too.
 
 
= Running KDE PIM =
 
Now that KDE PIM is built, you need to have ```runtime dependencies``` for it. To do that, run <code>apt-get install -y --no-install-recommends mariadb-server postgresql</code> (needed for Akonadi).
 
There are two methods to run KDE PIM:
* <code>source</code> the custom script you created earlier and then run <code>akonadictl --instance devel start</code>. This will start a new instance of Akonadi which will run in parallel with the system one.
* Put the contents of the custom script you created earlier into your <nowiki>~/.bashrc</nowiki> file, then log out and then log back in. Thereafter, whenever you run KDE PIM, it will be from your compiled version
 
 
= Additional information =
* Now that you can compile KDE PIM from source, when you find a bug you can fix it, create a patch, and send it to us!
* Subscribe to the [http://mail.kde.org/mailman/listinfo/kde-pim kde-pim mailing list]. It is for '''discussion about development'''. Please don't wildly post all your compilation problems there. Ask on [[#IRC (Chat)|IRC]] for such issues.
* Most of the developers hang around in one development IRC channel or another. On [https://libera.chat/ Libera Chat] you can find <nowiki>#akonadi</nowiki> for development discussion on Akonadi, and <nowiki>#kontact</nowiki> for development discussion on Kontact and its components. Please don't post user-questions there.
* [https://doc.qt.io/qt-5/ Qt documentation]
* [http://api.kde.org/ KDE API documentation]
* Visit the [http://techbase.kde.org 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 information you may read before starting contributing to KDE PIM.
* http://userbase.kde.org/Kontact is the central place for user tips and tricks.
* One of the fun ways to improve the KDE PIM codebase is to get together for a [[KDE_PIM/Meetings|hackfest]]. Since many of the KDE PIM developers live in Western Europe, getting together isn't all that hard to do. Over the years we've had seven meetings in Osnabrück, and several elsewhere.

Latest revision as of 17:48, 10 December 2023

KDE PIM is an application suite that helps you to organize your mail, addresses, todo's, appointments -- and keep this information in sync with your mobile phone.

Development of KDE PIM applications takes place in KDE's git repositories. Together, the applications are about 74MB of source. This page gives you a place to start and explains how development within KDE PIM works.


Prerequisites

  • You might want to make a backup of your valuable data. Most of it lives in ~/.kde. You may also backup your Akonadi server config files in ~/.config/akonadi and your kdepim applications data in ~/.local/share/akonadi. It may be easier to just create an additional user and give it a copy of your data, and run PIM master there.
  • You need all non-KDE dependencies for PIM as kdesrc-build only builds the KDE modules. Follow this link to install those.
    This include the Qt dependencies needed, but if your OS doesn't provide sufficiently new versions of these packages, or in case you want to build them yourself, you can do that too by modifying your ~/.kdesrc-buildrc file appropriately.


Compiling KDE PIM

KDE PIM is currently split across 40 modules. To build them all in the correct order, you should use kdesrc-build. Setting it up is detailed at Get Involved/development.

Note

You really need to build and submit patches against Git 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.


In addition to the lines in Get Involved/development suggested to be removed from ~/.kdesrc-build, you also have to remove the following line from it:

include ~/kde/src/kdesrc-build/data/build-include/kf5-qt5.ksb

Add the following to your ~/.kdesrc-buildrc file:

include ~/kde/src/kdesrc-build/data/build-include/kf5-frameworks.ksb
include ~/kde/src/kdesrc-build/data/build-include/kf5-kdepim.ksb
include ~/kde/src/kdesrc-build/data/build-include/kf5-applications.ksb
include ~/kde/src/kdesrc-build/data/build-include/kf5-workspace.ksb

In addition, you cannot use the standard prefix.sh file mentioned on the Get Involved/development page; you must use a custom script:

 # This must match the path in kdedir option in kdesrc-buildrc
 export KDE_PREFIX=~/kde/usr
 
 export PATH="${KDE_PREFIX}/bin:${PATH:-/usr/local/bin:/usr/bin:/bin}"
 export LD_LIBRARY_PATH="${KDE_PREFIX}/lib64:${KDE_PREFIX}/lib:$LD_LIBRARY_PATH"
 export QT_PLUGIN_PATH="${KDE_PREFIX}/lib64/plugins:${KDE_PREFIX}/lib/plugins:${QT_PLUGIN_PATH:-/usr/lib64/qt5/plugins:/usr/lib/qt5/plugins}"
 export QML2_IMPORT_PATH="${KDE_PREFIX}/lib64/qml:${KDE_PREFIX}/lib/qml:${QML2_IMPORT_PATH:-/usr/lib64/qt5/qml:/usr/lib/qt5/qml}"
 export PKG_CONFIG_PATH="${KDE_PREFIX}/lib64/pkgconfig:${KDE_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH:-/usr/lib64/pkgconfig:/usr/lib/pkgconfig}"
 export XDG_DATA_DIRS="${KDE_PREFIX}/share:${XDG_DATA_DIRS:-/usr/share}"
 export SASL_PATH="${KDE_PREFIX}/lib64/sasl2:${KDE_PREFIX}/lib/sasl2:${SASL_PATH:-/usr/lib64/sasl2:/usr/lib/sasl2}"
 export XDG_CONFIG_DIRS="${KDE_PREFIX}/etc/xdg:${XDG_CONFIG_DIRS:-/etc/xdg}"
 
 # Un-comment this if you want to have the devel version in parallel with the stable version installed by your distro
 #export AKONADI_INSTANCE=devel

You may need to update some of the variables to fit your environment. For example, on a 64-bit system running Ubuntu, the paths */lib64/* should be changed to */lib/x86_64-linux-gnu/*

Now, compile everything!

kdesrc-build kde-pim

If the build fails, you can check the log file to see why it failed. It will likely be because of a missing dependency. To search for the dependency, you may use install the package apt-file and use apt-file search <name>, though there are other ways too.


Running KDE PIM

Now that KDE PIM is built, you need to have ```runtime dependencies``` for it. To do that, run apt-get install -y --no-install-recommends mariadb-server postgresql (needed for Akonadi).

There are two methods to run KDE PIM:

  • source the custom script you created earlier and then run akonadictl --instance devel start. This will start a new instance of Akonadi which will run in parallel with the system one.
  • Put the contents of the custom script you created earlier into your ~/.bashrc file, then log out and then log back in. Thereafter, whenever you run KDE PIM, it will be from your compiled version


Additional information

  • Now that you can compile KDE PIM from source, when you find a bug you can fix it, create a patch, and send it to us!
  • 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.
  • Most of the developers hang around in one development IRC channel or another. On Libera Chat you can find #akonadi for development discussion on Akonadi, and #kontact for development discussion on Kontact and its components. Please don't post user-questions there.
  • Qt documentation
  • KDE API documentation
  • 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 information you may read before starting contributing to KDE PIM.
  • http://userbase.kde.org/Kontact is the central place for user tips and tricks.
  • One of the fun ways to improve the KDE PIM codebase is to get together for a hackfest. Since many of the KDE PIM developers live in Western Europe, getting together isn't all that hard to do. Over the years we've had seven meetings in Osnabrück, and several elsewhere.