首页 > 代码库 > (原)ubuntu中安装kate

(原)ubuntu中安装kate

转载请注明出处:

http://www.cnblogs.com/darkknightzh/p/6339642.html

参考网址:

https://kate-editor.org/build-it/#linux

 

1. 安装依赖项:

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 ibkf5jobwidgets-dev kio-dev libkf5texteditor-dev libkf5windowsystem-dev libkf5xmlgui-dev libgit2-dev

可选依赖项:

sudo apt install libkf5wallet-dev libkf5service-dev libkf5itemmodels-dev libkf5notifications-dev libkf5threadweaver-dev libkf5newstuff-dev

2. 在需要安装的位置打开终端,输入:

mkdir -p kde/usr
cd kde

3. 下载kate:

git clone git://anongit.kde.org/kate
cd kate

4. 终端中输入:

mkdir build
cd build

5. 使用cmake编译。

如果仅使用kate,输入(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

说明:~/kde/usr为/home/XXX/kde/usr的路径,如果不想安装在这个路径,可以自己设置。

如果需要开发kate,输入(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

6. 编译并安装kate:

make
make install

7. 将kate增加打到applications中

先将/kde/kate/kate/icons/128-apps-kate.png复制到kde/usr/bin/目录下,而后,

在终端中输入如下命令:

cd /usr/share/applications
sudo gedit kate.desktop

并输入:

[Desktop Entry]

Type=Application

Name=kate

Comment=kate

Icon=/home/XXX/kde/usr/bin/128-apps-kate.png

Exec=/home/XXX/kde/usr/bin/kate %F

Terminal=false

Categories=Development;

即可正常使用kate了。

 

(原)ubuntu中安装kate