This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Setting up a built system

Tags: None
(comma "," separated)
donnyboy
Registered Member
Posts
1
Karma
0

Setting up a built system

Mon Nov 30, 2009 3:13 pm
I would really like to compile KDE applications and code but for KDE I never managed to set up a built system which just worked. Documentation to this end is either completely outdated or comprises five different solution drafts and you will get stuck regardless which path you chose.

Is there any up to date description how to compile and built a particular KDE application from sources which JUST WORKS?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Setting up a built system

Mon Nov 30, 2009 9:36 pm
Unfortunately I do not know of any. I recommend simply installing dependencies as CMake configure logs indicate they are needed or optional.

Below is the script I source from ~/.xinitrc which sets up my environment variables. Note that I compile Qt as well, and use /opt/trunk-kde/extras for compiled utilities from sites such as kde-apps.org

Code: Select all
if [ -z "${KDE_ENV_SET}" ]; then
    export TRUNKINSTALLPATH="/opt/trunk-kde"
    # Change this to your kdedir setting in ~/.kdesvn-buildrc
    export KDE_EXTRAS="${TRUNKINSTALLPATH}/extras"
    export KDEDIR="${TRUNKINSTALLPATH}/kde"
    export KDEDIRS="${KDEDIR}:${KDE_EXTRAS}"

    # Change this to your qtdir setting in ~/.kdesvn-buildrc
    export QTDIR="${TRUNKINSTALLPATH}/qt"
    export QT_PLUGIN_PATH="${KDE_EXTRAS}/lib/kde4/plugins:${KDEDIR}/lib/kde4/plugins"

    export PATH="${KDE_EXTRAS}/bin:${KDEDIR}/bin:${QTDIR}/bin:${PATH}"
    export LD_LIBRARY_PATH="${KDE_EXTRAS}/lib:${KDEDIR}/lib:${QTDIR}/lib"
    export CMAKE_PREFIX_PATH="${KDE_EXTRAS}:${KDEDIR}:${QTDIR}"
    export PKG_CONFIG_PATH="${KDE_EXTRAS}/share/pkgconfig:${KDE_EXTRAS}/lib/pkgconfig:${KDEDIR}/lib/pkgconfig:${KDEDIR}/share/pkgconfig:${QTDIR}/lib/pkgconfig"

    export KDEHOME="${HOME}/.kde4/"
    unset XDG_DATA_DIRS

    # Set the XDG data path, helps finding plugins, etc
    export XDG_DATA_DIRS="${KDE_EXTRAS}/share:${KDEDIR}/share"
    export XDG_CONFIG_DIRS="${KDEDIR}/etc/xdg:${KDE_EXTRAS}/etc/xdg"

    # Don't accidentally get sourced again.
    export KDE_ENV_SET=1
fi


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
anda_skoa
KDE Developer
Posts
783
Karma
4
OS

Re: Setting up a built system

Thu Dec 03, 2009 12:54 pm
Which application are we talking about?
What kind of source code source are we talking about (SVN, tar balls, etc)?

Cheers,
_


anda_skoa, proud to be a member of KDE forums since 2008-Oct.
xxtjaxx
Registered Member
Posts
58
Karma
0
OS

Re: Setting up a built system

Sun Feb 14, 2010 9:47 pm
First of all you will need the development essentials of your distribution and some packages that KDE needs specifically you can get this from the Getting started guide never the less. But when it comes to compiling things like trunk from start to finish I advise you to use kdesvn-build.
And here is a simple how to for using kdesvn-build.

Otherwise if you only want to compile things like Bangarang or Konversation there is in Debian/Ubuntu/every other APT based distro a simple line you can run to install what is needed to get you started:

apt-get build-dep konversation


Have fun!


My blog :
http://adreasdevblog.wordpress.com

I work with the head developer on this one:
http://techbase.kde.org/Projects/Aki

My code repository on github:
https://github.com/xxtjaxx/xxtjaxxRepository/tree
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS

Re: Setting up a built system

Sun Feb 14, 2010 10:22 pm
If it's about building KDE from subversion, I have written a guide which I hope "just works". It only describes one path - building with a special user (kde-devel) and kdesvn-build - because I tried to keep it simple. There are also some links to Techbase articles for more information.

To build an application from source, you usually just have to do something like this: (KDE SC 4)

1. Extract archive
2. Enter the extracted directory
3. Make a build directory and enter it
Code: Select all
mkdir build
cd build

4. Run cmake (you might want to specify more/less options)
Code: Select all
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ..

Don't forget the two dots at the end!

5. Build and install
Code: Select all
make
sudo make install #install system wide


Generally it's better to let your package manager take care of installing applications since it'll keep track of it, notify you when there's an update etc.


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]