Commit 245aba24 authored by Christoph Cullmann's avatar Christoph Cullmann

stream-line the build it guide

parent 678fae32
......@@ -4,87 +4,132 @@ author: Christoph Cullmann
date: 2016-06-13T15:15:02+00:00
---
### Building Kate from Sources on Linux {#linux}
This quick howto explains how to build Kate without touching your stable KDE installation. Right now, Kate&#8217;s source code is located on <a title="Kate on git.kde.org" href="https://projects.kde.org/projects/kde/applications/kate/repository" target="_blank" rel="noopener noreferrer">git.kde.org</a>. To build Kate from git, you need a recent KF5 frameworks installed. Further,
<li style="list-style-type: none;">
<ol>
<li style="list-style-type: none;">
<ol>
<li>
make sure you have the following packages installed: <strong>git</strong> and the <strong>KF5 development package</strong> (and CMake).<strong>to install on openSUSE (13.2, with <a href="https://en.opensuse.org/SDB:KDE_repositories#KDE_Frameworks_5_.26_Plasma_5">Qt5/KF5 repos activated</a>):</strong> <pre>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</pre>
<p>
<strong>to install on Ubuntu and derivates: </strong>List of required packages:
</p>
<pre>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</pre>
<p>
Optional:
</p>
<pre>libkf5wallet-dev libkf5service-dev libkf5itemmodels-dev libkf5notifications-dev libkf5threadweaver-dev libkf5newstuff-dev</pre>
<p>
<strong>to install on Fedora/RHEL/CentOs:</strong> List of required packages:
</p>
<pre>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</pre>
<p>
Optional:
</p>
<pre>kf5-kwallet-devel kf5-knewstuff-devel kf5-threadweaver-devel kf5-kitemmodels-devel kf5-plasma-devel kf5-knotifications-devel libgit2-devel</pre>
</li>
<li>
create and change into a KDE development directory:<br /> <code>mkdir -p ~/kde/usr; cd ~/kde</code>
</li>
<li>
get a copy of the Kate code:<br /> <code>git clone git://anongit.kde.org/kate&lt;br />
cd kate</code><br /> <strong>NOTE:</strong> If you want to build KTextEditor (the editor component), you need to follow exactly the same steps, but replace &#8216;kate&#8217; with &#8216;ktexteditor&#8217; everywhere.
</li>
<li>
create and change into a build directory inside the kate directory for compilation:<br /> <code>mkdir build; cd build</code>
</li>
<li>
run the configure process with cmake:<br /> For just using Kate, build it optimized but with debugging symbols to get useful backtraces for bugreports:
</li>
<li>
<blockquote>
<pre>cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=~/kde/usr -DCMAKE_PREFIX_PATH=~/kde/usr</pre>
</blockquote>
<p>
For developing Kate, build it with debug support (if you have problems using gdb because of optimizations, swap Debug with DebugFull):
</p>
<blockquote>
<pre>cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/kde/usr -DCMAKE_PREFIX_PATH=~/kde/usr</pre>
</blockquote>
</li>
<li>
compile Kate:<br /> <code>make</code>
</li>
<li>
finally install Kate:<br /> <code>make install</code><br /> This installs Kate locally into the separate directory <code>~/kde/usr</code>, so that your global KDE installation will not be touched at all.
</li>
<li>
Now you can run the compiled Kate version from you shell via <code>kate</code> after sourcing the prefix.sh in your build directory via <code>. prefix.sh</code>.
</li>
</ol>
</li>
</ol>
</li>
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 [phabricator.kde.org][2] for review. If you have questions you can ask them on our mailing list [`kwrite-devel@kde.org`][3] and/or join [`#kate` on `irc.kde.org`][4] :–)
### Building Kate from Sources on Windows {#mac}
To build the KF5 based Kate/KWrite you can follow the guide on [KDE on Windows][5].
### Building Kate from Sources on Mac OS {#mac}
To build the KF5 based Kate/KWrite you can follow the guide on [KDE on Mac][6].
[2]: https://phabricator.kde.org/differential/diff/create/
[3]: mailto:kwrite-devel@kde.org
[4]: irc://irc.kde.org/kate "Kate IRC Channel"
[5]: https://community.kde.org/Windows
[6]: https://community.kde.org/Mac#Building_KDE_Frameworks_based_software_on_Mac_OS_X
# Building Kate from Sources on Linux {#linux}
Right now, Kate's source code is located on [git.kde.org](https://cgit.kde.org/kate.git/).
This how-to explains how to build Kate without touching your stable KDE installation.
### Install dependencies
Make sure you have the following packages installed: <strong>git</strong> and the <strong>KF5 development package</strong> (and CMake).
* openSUSE
{{< highlight bash >}}
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
{{< / highlight >}}
* Ubuntu and derivates
{{< highlight bash >}}
sudo apt install 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 libkf5wallet-dev \
libkf5service-dev libkf5itemmodels-dev \
libkf5notifications-dev libkf5threadweaver-dev libkf5newstuff-dev
{{< / highlight >}}
* Fedora/RHEL/CentOS
{{< highlight bash >}}
sudo yum install 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 kf5-kwallet-devel \
kf5-knewstuff-devel kf5-threadweaver-devel kf5-kitemmodels-devel \
kf5-plasma-devel kf5-knotifications-devel libgit2-devel
{{< / highlight >}}
### Prepare the Kate sources
* create and change into a KDE development directory:
{{< highlight bash >}}
mkdir -p ~/kde/usr
cd ~/kde
{{< / highlight >}}
* get a copy of the Kate code:
{{< highlight bash >}}
git clone git://anongit.kde.org/kate
cd kate
{{< / highlight >}}
<strong>NOTE:</strong> If you want to build KTextEditor (the editor component), you need to follow exactly the same steps, but replace &#8216;kate&#8217; with &#8216;ktexteditor&#8217; everywhere.
Your copy of Kate contains all of the Kate code, i.e.: Kate, KWrite and all bundled plugins.
### Configure Kate
* create and change into a build directory inside the kate directory for compilation:
{{< highlight bash >}}
mkdir build
cd build
{{< / highlight >}}
* run the configure process with cmake:
- For just using Kate, build it optimized but with debugging symbols to get useful backtraces for bugreports:
{{< highlight bash >}}
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=~/kde/usr \
-DCMAKE_PREFIX_PATH=~/kde/usr
{{< / highlight >}}
- For developing Kate, build it with debug support (if you have problems using gdb because of optimizations, swap Debug with DebugFull):
{{< highlight bash >}}
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/kde/usr \
-DCMAKE_PREFIX_PATH=~/kde/usr
{{< / highlight >}}
### Build & Install
* compile Kate:
{{< highlight bash >}}
make
{{< / highlight >}}
* finally install Kate:
{{< highlight bash >}}
make install
{{< / highlight >}}
This installs Kate locally into the separate directory <code>~/kde/usr</code>, so that your global KDE installation will not be touched at all.
### Run the self-compiled Kate
Now you can run the compiled Kate version from you shell via <code>kate</code> after sourcing the prefix.sh in your build directory.
{{< highlight bash >}}
. prefix.sh
kate
{{< / highlight >}}
### Keeping Kate up-to-date?
You can keep your copy up-to-date by typing:
{{< highlight bash >}}
cd ~/kde/kate
git pull --rebase
{{< / highlight >}}
### Contribute back!
Feel free to send patches to [phabricator.kde.org](https://phabricator.kde.org/differential/diff/create/) for review.
### Get Support?
If you have questions you can ask them on our mailing list [kwrite-devel@kde.org](mailto:kwrite-devel@kde.org) and/or join #kate on irc.kde.org.
For more information see [Get Help](/support/).
# Building Kate from Sources on Windows {#mac}
To build the KF5 based Kate/KWrite you can follow the guide on [KDE on Windows](https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source/Windows).
# Building Kate from Sources on macOS {#mac}
To build the KF5 based Kate/KWrite you can follow the guide on [KDE on macOS](https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source/Mac).
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment