[Panel-devel] KDE Development Environment (continued)

Colin Thomsen colin at freeshell.org
Wed Jul 20 12:34:41 CEST 2005


Howdy,

I've been trying to get a KDE4 install up and running for development 
and it seems to be very close now, so I thought I'd expand on Matt's 
earlier email about how I set it up. Please see below for my adjusted 
instructions (Please refer to the list archives for Matt's original 
comments).

Linux distro: Kubuntu 5.0.4

Here we go, pretty simple really:
1. Create a new user, I chose kde4, this step is bound to be disliked
by a number of people. Personally, I found it much easier to
completely separate it out so the somewhat broken kde4 setup wouldn't
mess with my current kde3 setup.
 
   useradd -m -G <groups> <username> (I chose kde4 as a username for
future reference in this document)
   passwd <username>

then logout of your current user, and login to the newly created one.
or just su...
   su - <username>

2. Decide where you want to put your development tree. I put my tree at
    /mnt/hdb6/kde4 

    I'll just call this KDE_DEVEL_BASE in the following

3. Grab unsermake, which is required for building.

  cd $KDE_DEVEL_BASE
  svn co svn://anonsvn.kde.org/home/kde/trunk/kdenonbeta/unsermake/ <svn://anonsvn.kde.org/home/kde/branches/work/kde4>

4. Grab the other required files

  svn co svn://anonsvn.kde.org/home/kde/branches/work/kde4/kdelibs <svn://anonsvn.kde.org/home/kde/branches/work/kde4>
  svn co svn://anonsvn.kde.org/home/kde/branches/work/kde4/kdebase <svn://anonsvn.kde.org/home/kde/branches/work/kde4>
  svn co svn://anonsvn.kde.org/home/kde/branches/work/kde4/qt-copy <svn://anonsvn.kde.org/home/kde/branches/work/kde4>
  svn co svn://anonsvn.kde.org/home/kde/branches/work/kde4/setup-env

5. Put unsermake in your path. While we're at it, we might as well set
   other variables as well. I put the following in .bash_rc for ~kde4:

MY_KDE_BASE=/mnt/hdb6/kde
MY_KDE_DEVEL_BASE=/mnt/hdb6/kde4
QTDIR=$MY_KDE_DEVEL_BASE/qt-copy
KDEDIR=$MY_KDE_BASE
KDEHOME=~/.kde-unstable
PATH=$MY_KDE_DEVEL_BASE/unsermake:$QTDIR/bin:$KDEDIR/bin:$PATH
LD_LIBRARY_PATH=$QTDIR/lib:$KDEDIR/lib
XDG_DATA_DIRS=$KDEDIR/share/:/usr/local/share/:/usr/share/
XDG_CONFIG_DIRS=$KDEDIR/etc/xdg/:/etc/xdg/
export KDEHOME QTDIR KDEDIR PATH LD_LIBRARY_PATH XDG_DATA_DIRS XDG_CONFIG_DIRS

6. Let's build qt-copy..
  cd $KDE_DEVEL_BASE/qt-copy
  
  (This is more or less directly copied from the README.qt-copy, so
for future notice RTFM heh, by the way make sure you have "byacc"
installed. Gentoo does not have this installed by default so 'emerge
byacc'. You're going to have to fend for yourself with other distros)

  export QTDIR=$PWD
  export PATH=$QTDIR/bin:$PATHExec=/mnt/hdb6/kde/bin/startkde
TryExec=/mnt/hdb6/kde/bin/startkde
Name=KDE4

  export YACC='byacc -d'		(I didn't actually do this line)
  ./configure -qt-gif -no-exceptions -debug -fast -prefix $QTDIR
  make sub-src sub-tools

7. Now we need to setup the environment variables. 
  cd $KDE_DEVEL_BASE
  source ./setup-env

8. Now we're ready to tackle kdelibs. I'm assuming we are going to
build the most basic build of kdelibs, so no special configure options
etc.
  cd ~/kde4/kdelibs
  unsermake -f Makefile.cvs
  ./configure --prefix=/home/<username>/kde
--with-qt-copy=/home/<username>/kde4/qt-copy
  unsermake
  su		(change to super user. You may need to set the path for unsermake)
  unsermake install

   Note that when you run configure and unsermake, you may come across missing
   libraries. I just used kynaptic to install them and then restarted where
   appropriate. For kubuntu there was also a problem with a missing m4 macro, which
   was fixed by installing an updated automake.

9. Now we'll hit kdebase. This will, in all liklihood, not build
completely at all. Only portions are "ported" (used VERY loosely in
this context :) ) but, this is where we're at.
  cd ~/kde4/kdebase
  unsermake -f Makefile.cvs
  ./configure --prefix=/home/<username>/kde
--with-qt-copy=/home/<username>/kde4/qt-copy
  unsermake
  su		(change to super user. You may need to set the path for unsermake)
  unsermake install

10. Add the kde4 session to kdm. For Kubuntu this meant:
    cp /usr/share/xsessions/kde.desktop /usr/share/xsessions/kde4.desktop

    Modify the relevant lines to match below (replace KDE_DEVEL_DIR to your dir)
    Exec=/mnt/hdb6/kde/bin/startkde
    TryExec=/mnt/hdb6/kde/bin/startkde
    Name=KDE4

11. Restart kdm (Ctrl-Alt-Backspace)

12. Login as kde4 user

I still have a couple of issues I'm working through (not able to contact klauncher), but this
is pretty much it. I did change Linux distros to Kubuntu and it seemed to make it easier to
get through the process.

As Matt suggested, please send hints, tips, updates etc.

Cheers,

Colin



More information about the Panel-devel mailing list