Projects/K3b: Difference between revisions

From KDE TechBase
m (→‎Getting Source Code: Fix Extragear web link)
(Replaced content with "{{ Moved To Community | K3b }}")
 
Line 1: Line 1:
==Getting Started in K3b Development==
{{ Moved To Community | K3b }}
 
===Setting Up Environment===
Create target install directory. For the sake of example we will assume your home directory is <tt>/home/joe</tt> and you will install your compiled K3b to <tt>/home/joe/k3b/install</tt>. Add following lines to your <tt>~/.bashrc</tt> file:
<syntaxhighlight lang="text">
export K3B_INSTALL_PREFIX=/home/joe/k3b/install
export KDEDIRS=${K3B_INSTALL_PREFIX}:${KDEDIRS}
export PATH=${K3B_INSTALL_PREFIX}/bin:${PATH}
export XDG_DATA_DIRS=${K3B_INSTALL_PREFIX}/share:${XDG_DATA_DIRS}
</syntaxhighlight>
Relogin to let changes take effect.
 
===Getting Source Code===
K3b sources code is hosted in [https://quickgit.kde.org/?p=k3b.git KDE git repository]. It is a part of [https://extragear.kde.org/ KDE Extragear module]
 
If you don't have a KDE development access you can get the source code using anonymous access repository:
<syntaxhighlight lang="text">
git clone git://anongit.kde.org/k3b
</syntaxhighlight>
If you have development access you should go the other way:
<syntaxhighlight lang="text">
git clone ssh://[email protected]:k3b
</syntaxhighlight>
This will give you right to push back your changes to the origin repository.
 
===Compilation===
K3b, as most KDE applications, uses [[Development/Tutorials/CMake|CMake]] for configuration and compilation of source code.
 
First the build directory should be created.
<syntaxhighlight lang="text">
cd k3b
mkdir build
cd build
</syntaxhighlight>
It is guaranteed all files created during build will be placed in this directory. That means that if you want to clean up source tree after build the only thing you need to do is to remove <tt>build</tt> directory.
 
Now we need to configure the source tree. This have to be done only once, later this step will be invoked automatically when necessary. If you are familiar with [http://en.wikipedia.org/wiki/Autotools Autotools] this step corresponds to <tt>./configure</tt> command.
<syntaxhighlight lang="text">
cmake .. \
      -DCMAKE_INSTALL_PREFIX=/home/joe/k3b/install \
      -DKDE4_AUTH_POLICY_FILES_INSTALL_DIR=/home/joe/k3b/install/share/polkit-1/actions \
      -DK3B_DEBUG=ON \
      -DCMAKE_BUILD_TYPE=Debug
</syntaxhighlight>
CMake will search for all required and optional libraries.
 
Finally to compile the source code and install it you should call:
<syntaxhighlight lang="text">
make && make install
</syntaxhighlight>
 
After that compiled K3b will be placed in <tt>/home/joe/k3b/install</tt> directory. Now you can run K3b by simply typing in the console:
<syntaxhighlight lang="text">
k3b
</syntaxhighlight>
 
==See Also==
* [http://community.kde.org/K3b K3b community wiki] &ndash; for roadmap and other organizational information

Latest revision as of 17:59, 18 March 2016

This page is now on the community wiki.