Difference between revisions of "Guidelines and HOWTOs/Build from source/Details"
|Line 47:||Line 47:|
= Build KDE frameworks =
= Build KDE frameworks =
Current state of KDE framework exist in frameworks branch of kdelibs.
Current state of KDE framework exist in frameworks branch of kdelibs .
Revision as of 17:25, 15 September 2013
CMake from Git
You need a unreleased version of CMake for KDE Frameworks 5. Kitware hosts a nightly binary snapshot if you want to skip building it (scroll to the bottom to get the latest). Alternatively you can build it straight from their git:
- Choose an install prefix, for instance
$ export KF5=$HOME/kf5
To avoid repetition of command you can append ~/.bashrc file with above line and execute,
$ source ~/.bashrc
- Checkout and install Latest version of CMake using Git.
$ git clone git://cmake.org/cmake.git $ cd cmake $ ./configure --prefix=$KF5 $ make $ make install
Extra CMake Modules
- Checkout and build extra-cmake-modules
$ git clone git://anongit.kde.org/extra-cmake-modules $ cd extra-cmake-modules $ cmake -DCMAKE_INSTALL_PREFIX=$KF5 . $ make $ make install
To build phonon by hand execute:
$ git clone kde:phonon --branch master $ mkdir phonon/build $ cd phonon/build $ cmake -DCMAKE_INSTALL_PREFIX=$KF5 -DCMAKE_PREFIX_PATH=$KF5 -DPHONON_BUILD_PHONON4QT5=ON .. $ make $ make install
Then build attica (branch master), and strigi (branch master, with submodules) and install them into the same prefix.
To check out and build libdbusmenu-qt execute:
$ bzr branch lp:libdbusmenu-qt $ cd libdbusmenu-qt $ mkdir build $ cd build $ cmake -DCMAKE_INSTALL_PREFIX=$KF5 -DCMAKE_PREFIX_PATH=$KF5 -DWITH_DOC:bool=OFF .. $ make $ make install
Build KDE frameworks
Current state of KDE framework exist in frameworks branch of kdelibs and kdelibs needs an updated Qt5 and extra-cmake-modules .
$ git clone kde:kdelibs --branch frameworks $ mkdir kdelibs/build $ cd kdelibs/build $ source <source-filename> $ cmake -DCMAKE_INSTALL_PREFIX=$KF5 -DCMAKE_PREFIX_PATH=$KF5 .. $ make $ make install
Debugging options: The default debug setting is RelWithDebInfo which is suitable for most developers. If you are debugging frameworks and cannot trace the code, you can set CMAKE_BUILD_TYPE to "DebugFull" to get a slower build but with even more verbose debugging (backtrace) information. For this replace -DCMAKE_BUILD_TYPE=RelWithDebInfo in the above cmake command with -DCMAKE_BUILD_TYPE=DebugFull.
Updating the already built framework: If the source code has been checked from a branch, it is possible to update the source code with newly added changes and build again. Usually only changing parts will be built, so this operation would be faster than building the source code from scratch.
Go to your source directory and execute following commands.
$ git pull --rebase $ cd build $ source <source-filename> $ make $ make install
The Plasma libraries and runtime components have moved into a new repository: plasma-framework. To get libplasma and the QML support for Plasma, after building kdelibs as shown above, execute the following commands:
$ git clone kde:plasma-framework $ mkdir plasma-framework/build $ cd plasma-framework/build $ source <source-filename> $ cmake -DCMAKE_INSTALL_PREFIX=$KF5 -DCMAKE_PREFIX_PATH=$KF5 .. $ make $ make install
kde-workspace & Friends
Plasma-based components such as the code in the kde-workspace repo is being ported inside those repositories in the frameworks-scratch branch. This works for the kde-workspace, kdeplasma-addons, plasmate and kdeexamples repositories. You can install whatever is already ported and enabled using the following commands:
$ git clone kde:kde-workspace $ mkdir kde-workspace/build $ cd kde-workspace/build $ git checkout frameworks-scratch $ source <source-filename> $ cmake -DCMAKE_INSTALL_PREFIX=$KF5 -DCMAKE_PREFIX_PATH=$KF5 .. $ make $ make install
If you want to build one of the other repositories, just replace kde-workspace with e.g. kdeplasma-addons.