scons build files for kdegames
Holger Schröder
holger-kde at holgis.net
Wed Nov 30 18:55:32 CET 2005
Hi,
at http://kdab.net/~dfaure/kdegames-scons.tar.bz2 you will find the files
needed to compile kdegames with scons. the
work is based on the SConscript files from Thomas Nagy
in /branches/work/kdegames-scons/v1/. i put the SConscript files into a svn
checkout of kdegames trunk and added the SConstruct file and the bksys subdir
from kdelibs trunk. then i started adapting things for kdegames, added some
functions and made the SConscript files a little simpler.
i would like to commit the sconscript files to kdegames trunk, and the bksys
subdir should go to kdegames trunk temporarily too. then i would like to
merge my changes to kdelibs bksys step by step.
this is what i changed:
- make the env.subdirs() function create the dirs in the build dir on the fly,
also when some parent dirs have to be created on the way down to the dir,
too.
- added a locallibs member to genobj class. this can be used to handle
depencencies to libs automatically in a platform-independent way:
in an object you write a line:
obj.locallibs = '../libkdegames/kdegames'
this can the be split up into the relative path to the lib in the build dir,
and the platform-independent part of the lib name. then the genobj class can
add the dependency to the lib, when this member is not empty. by doing so,
the SConscript files do not have to add the env.Depends( 'xxx',
'#libkdegames/libkdegames.so' ) lines when they want to link against a
library.
- added some new functions to install kde files:
kdeheaders, kdeappdata, kdekcfg, kdesktopfile
these functions take the following arguments: files, subdir
they are used to install some files into the respective kde installation dir,
or a subdir thereof.
the files argument can contain the * glob character, and when it does, the
string will be expanded to the respective files, for example '*.png' to
'a.png b.png c.png'. this makes installing of many similar files to the same
destination dir easier. the expansion is only done, if * is contained in
files, so no expensive reading of directories is done, when it is not used.
- a new kdeauto() installation function:
it does the following tasks, if the files are there:
- install *.desktop file
- install *ui.rc file
- install eventsrc file
- installs icon files
- installs *.kcfg
this makes installation of the typical kde files easier and less error prone.
- detect the version of ui files when they have the extension .ui, the same
way as unsermeke does it
when you want to try it out, you have to extract the tarball to the kdegames
dir, and then do:
# set qt dir
export QTDIR=/path/to/qt-4
# configure with kde dir
scons configure prefix=/path/to/kde4
# build, and continue, when errors happen
scons -k
# install it to where you want
scons prefix=/some/other/path -k install
then you can diff the installed stuff against a unsermake-installed version of
kdegames. then you will find that the installation of icons is not the same
as with unsermake, but the rest is alread quite similar.
please review the patches and tell me what you think about it
regards, Holger
More information about the Kde-buildsystem
mailing list