轉載請注明出處:
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了。