[bt-devel] Environment setup

Torsten Uhlmann bt-devel@crosswire.org
29 Jan 2000 18:25:23 +0100


>>>>> "darwin" == darwin  <darwin@ichristian.com> writes:

    > It would be helpful for me if someone would provide a step by step
    > guide in setting up the development environment for development of
    > BibleTime 0.3

I will do what I can :)

    > I will present what I plan to do, please fill in the details and
    > make corrections.

    > I will be creating a special account for development that will use
    > .bashrc to customize environment variables so that the Beta
    > software has minimal impact on my everyday environment.

I didn't do that but it will probably simplify things. For my daily work
I run KDE-1.1.2. I don't run KDE2 programs at the moment exept for
testing (konqueror and stuff). I run them all from one account. But
setting up a different one is not wrong either.

    > I will be downloading KDK 1.0 and installing it.

Yes.
After this please download kdoc from cvsup or kde2 snapshots because it
contains the kdoc2 you use with the new KDE documentation (Joachim wrote
about this on the list).

    > I will be downloding the latest snapshot of Qt and installing it.
    > The development environment will point to this version with the
    > QTDIR environmental variable.

    > Would it be beneficial to download the Qt snapshot from the KDE
    > site instead?

    > I will be downloading kdelibs 1.89 and installing it.  The
    > development environment will point to this version with the KDEDIR
    > environment variable.

If anyhow possible use cvsup to upload your kde and qt files. That is
much quicker and after the settup easier than getting snapshots. You
will have problems with cvsup if you are behind a firewall
though. Joachim posted a cvsup file to the list. If you need it again
please tell us.

If not cvsup:
You can try the latest snapshot but I don't know if it will work. There
is one on the kde snapshot page that works.
*Don't* download kdelibs 1.89, they are very old :), things Joachim uses
are missing there (I think KJanusWidget). Download the latest
snapshot. They compile here without flaw since weeks. You _also_ need
kdesupport (latest snapshot). First compile qt, then kdesupport, then kdelibs.

I use this scripe to compile kdelibs:

#!/bin/bash
export QTDIR=/usr/local/qt2
if [ ! -f $QTDIR/bin/moc ] ;  then
   echo "Creating link to moc";
   ln -s $QTDIR/src/moc/moc $QTDIR/bin/moc ;
 else
   echo "link to moc exists.";
fi
make -f Makefile.cvs && ../conf && make && make install
export QTDIR=/usr/local/qt

where ../conf is:

./configure --prefix=/opt/kde2 --with-qt-dir=/usr/local/qt2 
--with-qt-libs=/usr/local/qt2/lib
--with-qt-includes=/usr/local/qt2/include $1 $2 $3 $4

These are simple scripts but do the job for me. You wont use
Makefile.cvs if you have snapshots, you start with ../conf

    > Is running configure, make and make install with the KDEDIR set to
    > the target location the proper way to install a second KDE
    > environment?

See above.

    > Is there anything that needs to be done to Kdevelop to prepare it
    > to use these new libraries, or are the environment variables
    > enough?

Kdevelop itself compiles with kde1. Kdevelop cannot handle KDE2, you
need to do this manually. So, after you have added a file to the sources
for instance and kdevelop would write your Makefile.am new it will call
make -f Makefile.dist to rebuild the configure system. This you need to
call manually. I use the following script:

export QTDIR=/usr/local/qt2
export KDEDIR=/opt/kde2
make -f Makefile.dist
./configure

This is the build script found in the bibletime-2 dir.
After you have done this you can stay within kdevelop until who do an
action that changes Makefile.am again (adding/deleting of files etc.)

    > Anything else I should look out for?

The kde2/lib directory must be found by the linker, so put it into
/etc/ld.so.conf
for instance.

I use this scripe to switch to kde2 binaries:

#!/bin/sh
export KDEDIR=/opt/kde2
export QTDIR=/usr/local/qt2
firstitem=`echo $PATH | sed -e 's/:.*//'`
if [ "$firstitem" != "$KDEDIR/bin" ]; then
  export PATH=$KDEDIR/bin:$PATH
fi
export LD_LIBRARY_PATH=$KDEDIR/lib:$QTDIR/lib 

It is in a bin path.

I hope this helps you starting up and anybody alse who reads this :)
I know it is not easy to get it running, I had those difficulties
myself. And there is a threshold to step over in order to start all
this.

Ah, sometimes I got errors because make clean did not deleet all moc
files in the kde sources. I use this to get rid of them:

find . -name "*.moc*" |xargs rm -f

    > -- Darwin Gregory

    >    Creation is more scientifically valid than evolution!


-- 

best regards,
Torsten Uhlmann

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TUhlmann@gmx.de
TUhlmann@debis.com

http://www.tuhlmann.purespace.de
http://www.bibletime.de
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Wise men still seek him!