• Quick Compiling Kate in a stable KDE Environment

    by  • April 17, 2010 • Developers, Users

    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 \
      -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.)

    About

    Dominik is a PhD student at the Control Theory and Robotics Lab, TU Darmstadt, as part of the Research Training Group GKMM (GRK1362). My research focuses on state estimation in distributed systems. As hobby, I contribute to the KDE project and work on the Kate application and editor component.

    http://www.kate-editor.org