For information how to build Kate 4.x (KDE 4.x based), please refer to the Get It – KDE 4.x page.
This page will handle the case of the current KF5 based Kate.

Building Kate from Sources on Linux
This quick howto explains how to build Kate without touching your stable KDE installation. Right now, Kate’s source code is located on git.kde.org. To build Kate from git, you need a recent KF5 frameworks installed. Further,
- make sure you have the following packages installed: git and the KF5 development package (and CMake).to install on openSUSE (13.2, with Qt5/KF5 repos activated):
sudo zypper in libgit2-devel gettext-tools extra-cmake-modules libQt5Widgets-devel libQt5Xml-devel libQt5Test-devel \ libQt5Gui-devel libQt5DBus-devel libQt5Concurrent-devel libqt5-qtscript-devel libQt5Sql-devel ktexteditor-devel \ kactivities5-devel kiconthemes-devel kguiaddons-devel kcrash-devel kdoctools-devel kinit-devel kwindowsystem-devel \ kdbusaddons-devel kwallet-devel plasma-framework-devel kitemmodels-devel knotifications-devel threadweaver-devel knewstuff-devel
to install on Ubuntu and derivates: List of required packages:
qtbase5-dev qtscript5-dev extra-cmake-modules plasma-framework-dev libkf5crash-dev libkf5config-dev libkf5activities-dev kinit-dev kdoctools-dev libkf5i18n-dev libkf5parts-dev libkf5guiaddons-dev libkf5iconthemes-dev libkf5jobwidgets-dev kio-dev libkf5texteditor-dev libkf5windowsystem-dev libkf5xmlgui-dev libgit2-dev
Optional:
libkf5wallet-dev libkf5service-dev libkf5itemmodels-dev libkf5notifications-dev libkf5threadweaver-dev libkf5newstuff-dev
to install on Fedora/RHEL/CentOs: List of required packages:
git cmake gcc-g++ extra-cmake-modules qt5-qtbase-devel qt5-qtscript-devel kf5-kiconthemes-devel kf5-kxmlgui-devel kf5-kwindowsystem-devel kf5-ktexteditor-devel kf5-kparts-devel kf5-kguiaddons-devel kf5-kinit-devel kf5-kdoctools-devel kf5-kcrash-devel kf5-kactivities-devel kf5-kdbusaddons-devel
Optional:
kf5-kwallet-devel kf5-knewstuff-devel kf5-threadweaver-devel kf5-kitemmodels-devel kf5-plasma-devel kf5-knotifications-devel libgit2-devel
- create and change into a KDE development directory:
mkdir -p ~/kde/usr; cd ~/kde - get a copy of the Kate code:
git clone git://anongit.kde.org/kate
cd kate
NOTE: If you want to build KTextEditor (the editor component), you need to follow exactly the same steps, but replace ‘kate’ with ‘ktexteditor’ everywhere. - create and change into a build directory inside the kate directory for compilation:
mkdir build; cd build - run the configure process with cmake:
For just using Kate, build it optimized but with debugging symbols to get useful backtraces for bugreports: -
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=~/kde/usr
For developing Kate, build it with debug support (if you have problems using gdb because of optimizations, swap Debug with DebugFull):
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/kde/usr
- compile Kate:
make - finally install Kate:
make install
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/env.shwith the following content:
# export some vars we need export KF5=~/kde/usr export XDG_DATA_DIRS=$KF5/share:$XDG_DATA_DIRS:/usr/share export XDG_CONFIG_DIRS=$KF5/etc/xdg:$XDG_CONFIG_DIRS:/etc/xdg export PATH=$KF5/bin:$PATH export QT_PLUGIN_PATH=$KF5/lib/plugins:$KF5/lib64/plugins:$KF5/lib/x86_64-linux-gnu/plugins:$QT_PLUGIN_PATH export QML2_IMPORT_PATH=$KF5/lib/qml:$KF5/lib64/qml:$KF5/lib/x86_64-linux-gnu/qml export QML_IMPORT_PATH=$QML2_IMPORT_PATH export KDE_SESSION_VERSION=5 export KDE_FULL_SESSION=true export CMAKE_PREFIX_PATH=$KF5:$CMAKE_PREFIX_PATH # nicer debug messages c=`echo -e "\033"` export QT_MESSAGE_PATTERN="%{appname}(%{pid})/(%{category}) $c[31m%{if-debug}$c[34m%{endif}%{function}$c[0m: %{message}" unset cNow you can run the compiled Kate version from you shell via
kateafter sourcing this script via. ~/kde/env.sh.
Your copy of Kate contains all of the Kate code, i.e.: Kate, KWrite and all bundled plugins. You can keep your copy up-to-date by typing `git pull --rebase` in ~/kde/kate. Feel free to send patches to our mailing list [email protected]. And join #kate on irc.kde.org :–)
Building Kate from Sources on Windows
To build the KF5 based Kate/KWrite you can follow the guide on KDE on Windows.
Building Kate from Sources on Mac OS
To build the KF5 based Kate/KWrite you can follow the guide on KDE on Mac.