# Quick Compiling Kate in a stable KDE Environment

Since all of the Kate code is now co-hosted on gitorious, it became very easy to build Kate in your stable KDE >= 4.4 environment. This means you can run the newest version of Kate with very few effort. Just give it a try and do the following steps:

1. make sure you have the following packages installed: git, cmake and kdelibs development package (on openSUSE this is git, cmake and libkde4-devel)
2. create and change into a KDE development directory:
mkdir ~/kde; cd ~/kde
3. get a copy of the Kate code:
git clone git://gitorious.org/kate/kate.git
4. create and change into a build directory for compilation:
mkdir build; cd build
5. run the configure process with cmake:
cmake ../kate -DCMAKE_BUILD_TYPE=debugfull <br /> -DCMAKE_INSTALL_PREFIX=~/kde/usr
6. compile Kate:
make
7. finally install Kate:
make install

That’s all! This installs Kate locally into the separate directory ~/kde/usr, so that your global KDE installation will not be touched at all.

Now on to starting the newly compiled Kate. Create a file ~/kde/run.sh with the following content:

#!/bin/bashexport KATE_DIR=~/kde/usr
export PATH=$KATE_DIR/bin:$PATH
export LD_LIBRARY_PATH=$KATE_DIR/lib:$LD_LIBRARY_PATH
export KDEDIR=$KATE_DIR export KDEDIRS=$KDEDIRexport XDG_DATA_DIRS=$XDG_DATA_DIRS:$KATE_DIR/share
# update KDE's system configuration cache
kbuildsycoca4
# start app
\$@

Now you can run the compiled Kate version with ~/kde/run.sh kate. Just calling kate directly will start the system version of Kate.

Your copy of Kate contains all of the Kate code, i.e.: the KTextEditor interfaces, Kate Part, KWrite and the Kate Application. Feel free to send patches to our mailing list kwrite-devel@kde.org. And join #kate on irc.kde.org :-)

Note for KDE developers: All the changes in git are merged back to KDE’s subversion repository in a timely manner. So don’t worry about Kate moving away from KDE; this is not the case.

(Updated on 2010-04-17: Allow installation into local directory.)