TheBlindCow

FreeSoftware to the fullest!

Easily building and testing KDE applications into a separate prefix

When developing your projects you will often need to install them somewhere safe. On my system I have a prefix full build of all Qt, KDE software, but this doesn’t work when we just want to work on an application or want to test a build in someone else’s system.

Installing to /usr doesn’t feel right, /usr/local isn’t that much helpful either, so what I usually do is to create a sub-directory in /opt (e.g. /opt/discover, /opt/kalgebra), then it was a matter of having the session point at the right place. This is why I submitted a small change in ECM that generates a prefix.sh that sets the right environment variables.
This was merged a while ago, so it should be part of any distribution by now.

This is what the workflow ends up being. First we fetch and build the software we want, as usual:

$ git clone kde:kate
$ mkdir build-kate
$ cd build-kate
$ cmake -DCMAKE_INSTALL_PREFIX=/opt/kate ../kate
$ make
$ make install

Then to run it, we just need to do the following:

$ source prefix.sh
$ kate

And we’ll get our own kate, with the modifications we made.

Hope this helps!

1 Comment

  1. That’s likely very useful. I have the file prefix.sh (named run.sh) for years already, maintained manually. Very good idea to add this to the build folder automatically.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2018 TheBlindCow

Theme by Anders NorenUp ↑