KTp/Getting Set Up: Difference between revisions

From KDE Community Wiki
< KTp
(Clean up the page, and re-order things slightly.)
 
(36 intermediate revisions by 9 users not shown)
Line 2: Line 2:


==Prerequisites==
==Prerequisites==
You will need KDE 4.10 or 4.9. We do not require latest git KDE.


You will need to install several cross-desktop Telepathy components. Packages of the following from your distribution should do fine.
You will need to install several cross-desktop Telepathy components. Packages of the following from your distribution should do fine.
Line 10: Line 12:
** telepathy-rakia for sip
** telepathy-rakia for sip
* telepathy-logger (for the contact list)
* telepathy-logger (for the contact list)
* kdepimlibs (devel packages; for kpeople)


Recently we started using some features of kdelibs 4.7.0, so you need at least '''KDE SC 4.7''' to compile and run KDE-Telepathy.
We're using some dbus service files and it has been proven that these needs to be in /usr/share/dbus-1/, otherwise you won't be able to connect, start a chat or do other stuff. So if you're using your own install prefix, '''please make sure you have copied/linked these files to /usr/share/dbus-1/* first''' before posting a bugreport. Thanks.


You will also need to follow the steps to [[Sysadmin/GitKdeOrgManual#Let_Git_rewrite_URL_prefixes|setup the kde: prefix in Git]], if you have not done so already.
You will also need to follow the steps to [[Sysadmin/GitKdeOrgManual#Let_Git_rewrite_URL_prefixes|setup the kde: prefix in Git]], if you have not done so already.
===Telepathy-Qt===
Building any of the KDE telepathy software requires the [http://telepathy.freedesktop.org/doc/telepathy-qt/ Telepathy-Qt library]. Your distribution may package it, in which case you need version >= 0.9.
{{Warning|There used to be a library called telepathy-qt in kdesupport.  This is '''NOT''' the same library.  Make sure you are using the one from freedesktop.org}}
If you are compiling Telepathy-Qt and get a warning about needing a newer glib, simply ignore it. Glib is only needed for some internal tests.
If you are building your own copy of Telepathy-Qt, clone the [http://cgit.freedesktop.org/telepathy/telepathy-qt/ git repository] and use the usual cmake method to build and install it.


=== QtGstreamer ===
=== QtGstreamer ===
Line 34: Line 24:
</syntaxhighlight>
</syntaxhighlight>


== Scripted setup ==
=== Ubuntu build deps ===
 
You can find a script to clone and build the initial environment over [http://community.kde.org/Real-Time_Communication_and_Collaboration/Getting_Set_Up/Scripted here]
 
== Using kdesrc-build ==
 
To use kdesrc-build to build kde telepathy just add the following to your .kdesrc-buildrc file:
 
<nowiki>
module-set ktp
    use-modules telepathy-logger-qt ktp-common-internals ktp-accounts-kcm ktp-contact-list ktp-text-ui ktp-approver ktp-kded-module ktp-auth-handler ktp-presence-applet ktp-filetransfer-handler ktp-send-file
    repository kde-projects
end module-set
</nowiki>
 
Then do <tt>kdesrc-build ktp</tt> to build all of it, or <tt>kdesrc-build ktp-send-file</tt> to build just ktp-send-file, for example (although bear in mind that you will need to build <tt>ktp-common-internals</tt> before any other ktp projects, and <tt>telepathy-logger-qt</tt> before <tt>ktp-contact-list</tt>).
 
== Compiling manually ==
 
=== KDE Telepathy internals ===
 
Before the other components, you need to build a library carrying internal components.
 
[https://projects.kde.org/projects/extragear/network/telepathy/ktp-common-internals ktp-common-internals project page]
 
<syntaxhighlight lang="bash">
git clone kde:ktp-common-internals
</syntaxhighlight>
 
===Telepathy Accounts KCM===
 
The next thing to get set up is the Telepathy Accounts KCM. This is the UI for account management.
 
[https://projects.kde.org/projects/extragear/network/telepathy/ktp-accounts-kcm ktp-accounts-kcm project page]
 
<syntaxhighlight lang="bash">
git clone kde:ktp-accounts-kcm
</syntaxhighlight>
 
This can be compiled and installed by the usual KDE build procedure.
 
===Telepathy Logger Qt Bindings===
 
Needed to compile the contact list app.
 
[https://projects.kde.org/projects/extragear/network/telepathy/telepathy-logger-qt telepathy-logger-qt project page]
 
<syntaxhighlight lang="bash">
git clone kde:telepathy-logger-qt
</syntaxhighlight>
 
===Contact List App===
 
This application provides a traditional contact-list, similar to the one provided by Kopete.  Note that this requires [[#Telepathy Logger Qt Bindings|telepathy-logger-qt]].


[https://projects.kde.org/projects/extragear/network/telepathy/ktp-contact-list ktp-contact-list project page]
While using some Ubuntu distributions you would like to have these packages installed (they are critical to build Ktp on your machine) from apt:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git clone kde:ktp-contact-list
sudo apt-get install doxygen graphviz libfarstream-0.1-dev libgstreamer-plugins-base0.10-dev libgstreamer0.10-dev libqt4-dev libtelepathy-farstream-0.4-dev libtelepathy-glib-dev pkg-config cmake debhelper kdelibs5-dev libtelepathy-logger-dev libtelepathy-logger-qt4-dev libtelepathy-qt4-dev pkg-kde-tools bison cmake flex libqt4-dev libqtgstreamer-dev libtelepathy-glib-dev libtelepathy-logger-dev libxml2-dev python python-dev libxml-parser-perl librpc-xml-perl libqjson-dev libqca2-dev libqca2-plugin-ossl kdepim-dev libqtwebkit-dev
</syntaxhighlight>
</syntaxhighlight>


===Chat window App===
=== Arch build deps ===
 
This application provides a text chat window.
 
[https://projects.kde.org/projects/extragear/network/telepathy/ktp-text-ui ktp-text-ui project page]


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git clone kde:ktp-text-ui
sudo pacman -S perl-libwww perl-json perl-xml-parser boost
</syntaxhighlight>
</syntaxhighlight>


===The approver===
==Recommended installation==
 
This method is based on a scratch of David Edmundson which is located [http://quickgit.kde.org/?p=scratch%2Fdavidedmundson%2Fktp-bootstrap.git here]. You may pull it on your local machine and run '''install.sh'''. Before going forward, make sure that you have configured your Git configuration file for KDE prefix, if not follow [https://community.kde.org/Sysadmin/GitKdeOrgManual#Let_Git_rewrite_URL_prefixes this]:
This notifies you when an incoming message arrives and hangs in the system tray until you're ready to start a chat.
 
[https://projects.kde.org/projects/extragear/network/telepathy/ktp-approver ktp-approver project page]


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git clone kde:ktp-approver
git clone git://anongit.kde.org/scratch/davidedmundson/ktp-bootstrap.git
cd ktp-bootstrap
sh install.sh
</syntaxhighlight>
</syntaxhighlight>


===Workspace Integration Module===
Sits in KDED and sets your presence automatically to 'Away' after certain amount of time, can set your presence to your current song from an mpris-enabled media player (Amarok and Clementine work great) and also contains an '''error handler''' which is very important if you want to be notified of errors
[https://projects.kde.org/projects/extragear/network/telepathy/ktp-kded-module ktp-kded-module project page]
<syntaxhighlight lang="bash">
git clone kde:ktp-kded-module
</syntaxhighlight>
===Auth handler===
Handles kwallet integration, and prompts/sends passwords to connection managers when requested.


[https://projects.kde.org/projects/extragear/network/telepathy/ktp-auth-handler ktp-auth-handler project page]
As soon as your installation has finished you can start Ktp by choosing '''Instant Messaging Contact List''' from the menu of your system. Alternatively, you may want to discover source yourself, e.g. if you are planning to contribute. Then, you can go path '''~/ktp/src/ktp-contact-list''' (git repository is already set there!)


<syntaxhighlight lang="bash">
===Making Changes===
git clone kde:ktp-auth-handler
</syntaxhighlight>


===Presence Plasmoid and Dataengine===
When you first open kdevelop for the first time select the CMakeLists file in ~/ktp/src/<project>/CMakeLists.txt when asked to specify the build directory select ~/ktp/build/<project>/ NOT the default option.


This shows the online-ness of your accounts and allows to bring accounts online/offline
This will mean kdevelop will use your existing install set up and environment and any installations will be kept local.


[https://projects.kde.org/projects/extragear/network/telepathy/ktp-presence-applet ktp-presence-applet project page]
If you are ever prompted for your root password for installations you are doing something wrong.


<syntaxhighlight lang="bash">
===Updating===
git clone kde:ktp-presence-applet
</syntaxhighlight>


===The File Transfer Handler===
Run ./update-ktp from your ~/ktp directory.


Does the actual transferring of files between two contacts. Displays progress via KJob
For extra functionality and arguments please read http://kdesrc-build.kde.org/documentation/


[https://projects.kde.org/projects/extragear/network/telepathy/ktp-filetransfer-handler ktp-filetransfer-handler project page]
== Using an existing kdesrc-build ==


<syntaxhighlight lang="bash">
To use kdesrc-build to build KDE Telepathy type
git clone kde:ktp-filetransfer-handler
</syntaxhighlight>


=== Dolphin Integration ===
kdesrc-build extragear/telepathy


Allows you to start a file transfer via a handy shortcut in your file manager.
It may be desirable to also build TelepathyQt, which can be done by adding the following module


[https://projects.kde.org/projects/extragear/network/telepathy/ktp-send-file ktp-send-file project page]
module telepathy-qt
    repository git://anongit.freedesktop.org/telepathy/telepathy-qt4
    branch master
end module


<syntaxhighlight lang="bash">
git clone kde:ktp-send-file
</syntaxhighlight>


===Call window App===
Because we rely on dbus activation we need to make sure our files are in the XDG dbus paths /when dbus loads/.


This application provides a voice/video chat window (optional). Note that this requires [[#QtGstreamer|QtGstreamer]].
there are two ways to do this; either copy/link these dbus files to /usr/share/dbus-1/ or make sure XDG paths are set immediately at login, such as adding them in /etc/profile.d.


[https://projects.kde.org/projects/extragear/network/telepathy/ktp-call-ui ktp-call-ui project page].
==Troubleshooting==


<syntaxhighlight lang="bash">
If you have both qt4 and qt5 installed, you may need tell kdesrc-build to use qt4 by including the following in the relevant kdesrc-buildrc (global section):
git clone kde:ktp-call-ui
</syntaxhighlight>
 
==Experimental Components not part of KTp (just yet)==


===Shared desktop ontologies===
<syntaxhighlight lang="cmake">
 
cmake-options -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4
<syntaxhighlight lang="bash">
git clone git://oscaf.git.sourceforge.net/gitroot/oscaf/shared-desktop-ontologies
</syntaxhighlight>
</syntaxhighlight>


===Nepomuk Service===


NOTE: git master probably won't compile.
Similarly, if you have both Python 3 and Python 2 installed, you may need to point to the python2 path:


The Nepomuk service obsoletes the daemon and integrates Telepathy with Nepomuk, which is required by the Contact List application. Code is in git [https://projects.kde.org/projects/playground/network/telepathy/telepathy-nepomuk-service here]
<syntaxhighlight lang="cmake">
 
cmake-options  -DPYTHON_EXECUTABLE=/usr/bin/python2
<syntaxhighlight lang="bash">
git clone kde:telepathy-nepomuk-service
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 17:53, 23 June 2014

These instructions assume that you already know how to build KDE stuff from source. Check the "building KDE applications page" for more help with that. The rest of this page will just tell you what to build and where to get it from.

Prerequisites

You will need KDE 4.10 or 4.9. We do not require latest git KDE.

You will need to install several cross-desktop Telepathy components. Packages of the following from your distribution should do fine.

  • telepathy-mission-control-5
  • telepathy-gabble for Jabber, GTalk and Facebook Chat support
  • other Telepathy connection managers if you want to try out other protocols
    • telepathy-haze for icq, msn, yahoo, aim and all the others that Pidgin/libpurple supports
    • telepathy-rakia for sip
  • telepathy-logger (for the contact list)
  • kdepimlibs (devel packages; for kpeople)


You will also need to follow the steps to setup the kde: prefix in Git, if you have not done so already.

QtGstreamer

In order to build the call window application, you will need the Qt bindings for GStreamer. Your distribution will probably provide packages, or you can build from git:

git clone git://anongit.freedesktop.org/gstreamer/qt-gstreamer

Ubuntu build deps

While using some Ubuntu distributions you would like to have these packages installed (they are critical to build Ktp on your machine) from apt:

sudo apt-get install doxygen graphviz libfarstream-0.1-dev libgstreamer-plugins-base0.10-dev libgstreamer0.10-dev libqt4-dev libtelepathy-farstream-0.4-dev libtelepathy-glib-dev pkg-config cmake debhelper kdelibs5-dev libtelepathy-logger-dev libtelepathy-logger-qt4-dev libtelepathy-qt4-dev pkg-kde-tools bison cmake flex libqt4-dev libqtgstreamer-dev libtelepathy-glib-dev libtelepathy-logger-dev libxml2-dev python python-dev libxml-parser-perl librpc-xml-perl libqjson-dev libqca2-dev libqca2-plugin-ossl kdepim-dev libqtwebkit-dev

Arch build deps

sudo pacman -S perl-libwww perl-json perl-xml-parser boost

Recommended installation

This method is based on a scratch of David Edmundson which is located here. You may pull it on your local machine and run install.sh. Before going forward, make sure that you have configured your Git configuration file for KDE prefix, if not follow this:

git clone git://anongit.kde.org/scratch/davidedmundson/ktp-bootstrap.git
cd ktp-bootstrap
sh install.sh


As soon as your installation has finished you can start Ktp by choosing Instant Messaging Contact List from the menu of your system. Alternatively, you may want to discover source yourself, e.g. if you are planning to contribute. Then, you can go path ~/ktp/src/ktp-contact-list (git repository is already set there!)

Making Changes

When you first open kdevelop for the first time select the CMakeLists file in ~/ktp/src/<project>/CMakeLists.txt when asked to specify the build directory select ~/ktp/build/<project>/ NOT the default option.

This will mean kdevelop will use your existing install set up and environment and any installations will be kept local.

If you are ever prompted for your root password for installations you are doing something wrong.

Updating

Run ./update-ktp from your ~/ktp directory.

For extra functionality and arguments please read http://kdesrc-build.kde.org/documentation/

Using an existing kdesrc-build

To use kdesrc-build to build KDE Telepathy type

kdesrc-build extragear/telepathy

It may be desirable to also build TelepathyQt, which can be done by adding the following module

module telepathy-qt
    repository git://anongit.freedesktop.org/telepathy/telepathy-qt4
    branch master
end module


Because we rely on dbus activation we need to make sure our files are in the XDG dbus paths /when dbus loads/.

there are two ways to do this; either copy/link these dbus files to /usr/share/dbus-1/ or make sure XDG paths are set immediately at login, such as adding them in /etc/profile.d.

Troubleshooting

If you have both qt4 and qt5 installed, you may need tell kdesrc-build to use qt4 by including the following in the relevant kdesrc-buildrc (global section):

cmake-options -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4


Similarly, if you have both Python 3 and Python 2 installed, you may need to point to the python2 path:

cmake-options  -DPYTHON_EXECUTABLE=/usr/bin/python2