Building From Master Branch

From Kile
Jump to: navigation, search

Below you can find instructions for compiling Kile from the master branch of Kile's git repository on a recent Linux system.

The master branch depends on Qt 5, KDE Frameworks 5, and on a recent version of Okular.

Compiling and Installing Okular & Kile

Just as usual, for compiling Okular and Kile a recent C++ compiler, the CMake tool and the development packages of certain libraries are required.

In particular, development packages of Qt 5.5 (or newer), of the KDE Frameworks 5.19 (or newer) and of Poppler(-Qt5) (for PDF support in Okular) have to be installed. Also, see [1] and [2] for more information.

For Fedora 25, for example, the following development packages should be (at least) installed:

$ su
$ dnf install "kf5*devel" poppler-qt5-devel
$ exit

First of all, we create new directories. Then, we download the source code by cloning Kile's and Okular's Git repositories, and by checking out the appropriate branches:

$ cd
$ mkdir -p kile-master/src
$ cd kile-master/src
$ git clone git://anongit.kde.org/okular
$ git clone git://anongit.kde.org/kile -b master

We then create build directories, configure the build system, and compile & install Okular first:

$ cd ..
$ mkdir build-okular
$ cd build-okular
$ cmake ../src/okular -DCMAKE_INSTALL_PREFIX=$HOME/kile-master/install -DCMAKE_BUILD_TYPE="Debug"
$ make install -j 2

and subsequently Kile:

$ cd ..
$ mkdir build-kile
$ cd build-kile
$ cmake ../src/kile -DCMAKE_INCLUDE_PATH=$HOME/kile-master/install/include/ -DCMAKE_INSTALL_PREFIX=$HOME/kile-master/install -DCMAKE_BUILD_TYPE="Debug"
$ make install -j 2

Then, the following lines have to be copied to a file "$HOME/kile-master/run.sh":

#!/bin/sh
export XDG_DATA_DIRS=$HOME/kile-master/install/share/:$XDG_DATA_DIRS
export XDG_CONFIG_DIRS=$HOME/kile-master/install/etc/:$XDG_CONFIG_DIRS
export PATH=$HOME/kile-master/install/bin:$PATH
export QT_PLUGIN_PATH=$HOME/kile-master/install/lib/plugins:$HOME/kile-master/install/lib64/plugins:$QTDIR/plugins:$QT_PLUGIN_PATH

kile $*

and we have to set the correct permissions for the script "run.sh":

$ chmod +x $HOME/kile-master/run.sh

Finally, Kile can be started with:

$ $HOME/kile-master/run.sh

Updating the Source Code

From time to time it is recommended to update the source code of Okular and Kile in order to try out the most recent changes. This can be done as follows.


First, the source code of Okular and Kile is updated:

$ cd $HOME/kile-master
$ cd src/okular
$ git pull
$ cd ../kile
$ git pull

Next, Okular and Kile are compiled and installed:

$ cd $HOME/kile-master/build-okular
$ make install
$ cd ../build-kile
$ make install