integrate the GTK-Gui (draft) in the SCons build

This commit is contained in:
Fischlurch 2008-07-11 03:51:37 +02:00
parent ce90f1763b
commit a46bfd2bf6
10 changed files with 104 additions and 32 deletions

View file

@ -35,6 +35,7 @@ CUSTOPTIONSFILE = 'custom-options'
SRCDIR = 'src'
BINDIR = 'bin'
TESTDIR = 'tests'
ICONDIR = 'icons'
VERSION = '0.1+pre.01'
#-----------------------------------Configuration
@ -61,6 +62,7 @@ def setupBasicEnvironment():
env.Replace( VERSION=VERSION
, SRCDIR=SRCDIR
, BINDIR=BINDIR
, ICONDIR=ICONDIR
, CPPPATH=["#"+SRCDIR] # used to find includes, "#" means always absolute to build-root
, CPPDEFINES=['-DLUMIERA_VERSION='+VERSION ] # note: it's a list to append further defines
, CCFLAGS='-Wall ' # -fdiagnostics-show-option
@ -211,8 +213,36 @@ def configurePlatform(env):
if not conf.CheckLibWithHeader('boost_regex-mt','boost/regex.hpp','C++'):
print 'We need the boost regular expression lib (incl. binary lib for linking).'
Exit(1)
# if not conf.CheckLibWithHeader('gavl', ['gavlconfig.h', 'gavl/gavl.h'], 'C'):
if not conf.CheckPkgConfig('gavl', 1.0):
print 'Did not find Gmerlin Audio Video Lib [http://gmerlin.sourceforge.net/gavl.html], exiting.'
Exit(1)
else:
conf.env.mergeConf('gavl')
if not conf.CheckPkgConfig('gtkmm-2.4', 2.8):
print 'Unable to configure GTK--, exiting.'
Exit(1)
if not conf.CheckPkgConfig('cairomm-1.0', 0.6):
print 'Unable to configure Cairo--, exiting.'
Exit(1)
if not conf.CheckPkgConfig('gdl-1.0', '0.6.1'):
print 'Unable to configure the GNOME DevTool Library, exiting.'
Exit(1)
if not conf.CheckPkgConfig('xv'): Exit(1)
# if not conf.CheckPkgConfig('xext'): Exit(1)
# if not conf.CheckPkgConfig('sm'): Exit(1)
#
# obviously not needed?
print "** Gathered Library Info: %s" % conf.env.libInfo.keys()
# create new env containing the finished configuration
return conf.Finish()
@ -245,7 +275,7 @@ def defineBuildTargets(env, artifacts):
objlib = ( srcSubtree(env,'$SRCDIR/common')
+ srcSubtree(env,'$SRCDIR/lib')
)
plugobj = srcSubtree(env,'$SRCDIR/plugin', isShared=True)
objplug = srcSubtree(env,'$SRCDIR/plugin', isShared=True)
core = ( env.StaticLibrary('$BINDIR/lumiback.la', objback)
+ env.StaticLibrary('$BINDIR/lumiproc.la', objproc)
+ env.StaticLibrary('$BINDIR/lumi.la', objlib)
@ -259,7 +289,16 @@ def defineBuildTargets(env, artifacts):
env.Depends(objlib, precomp)
artifacts['lumiera'] = env.Program('$BINDIR/lumiera', ['$SRCDIR/main.cpp']+ core )
artifacts['plugins'] = env.SharedLibrary('$BINDIR/lumiera-plugin', plugobj)
artifacts['plugins'] = env.SharedLibrary('$BINDIR/lumiera-plugin', objplug)
# the Lumiera GTK GUI
envgtk = env.Clone().mergeConf(['gtkmm-2.4','cairomm-1.0','gdl-1.0','xv','xext','sm'])
objgui = srcSubtree(envgtk,'$SRCDIR/gui')
artifacts['lumigui'] = ( envgtk.Program('$BINDIR/lumigui', objgui + core)
+ env.Install('$BINDIR', env.Glob('$ICONDIR/*.png'))
+ env.Install('$BINDIR', env.Glob('$SRCDIR/gui/*.rc'))
)
# call subdir SConscript(s) for independent components
SConscript(dirs=[SRCDIR+'/tool'], exports='env artifacts core')
@ -275,7 +314,7 @@ def definePostBuildTargets(env, artifacts):
il = env.Alias('install-lib', '$DESTDIR/lib')
env.Alias('install', [ib, il])
build = env.Alias('build', artifacts['lumiera']+artifacts['plugins']+artifacts['tools'])
build = env.Alias('build', artifacts['lumiera']+artifacts['lumigui']+artifacts['plugins']+artifacts['tools'])
allbu = env.Alias('allbuild', build+artifacts['testsuite'])
env.Default('build')
# additional files to be cleaned when cleaning 'build'

View file

@ -90,6 +90,18 @@ def globRootdirs(roots):
def filterNodes(nlist, removeName=None):
""" filter out scons build nodes using the given criteria.
removeName: if set, remove all nodes with this srcname
"""
if removeName:
predicate = lambda n : not fnmatch.fnmatch(os.path.basename(str(n[0])), removeName)
else:
predicate = lambda n : True;
return filter(predicate, nlist)
def RegisterPrecompiledHeader_Builder(env):
""" Registeres an Custom Builder for generating a precompiled Header.
Note you should define a dependency to the PCH file

View file

@ -51,15 +51,15 @@ class LumieraEnvironment(Environment):
for elm in other:
self.mergeConf(elm)
elif isinstance(other, str):
if not other in self.libInfo:
raise "Lib-info '%s' not available" % other
else:
if other in self.libInfo:
self.mergeConf(self.libInfo[other])
else:
self.Append (LIBS = other.get ('LIBS',[]))
self.Append (LIBPATH = other.get ('LIBPATH', []))
self.Append (CPPPATH = other.get('CPPPATH', []))
self.Append (LINKFLAGS = other.get('LINKFLAGS', []))
return self
def addLibInfo (self, libID, minVersion=0):
@ -75,7 +75,12 @@ class LumieraEnvironment(Environment):
self.libInfo[libID] = libInfo = LumieraEnvironment()
libInfo.ParseConfig ('pkg-config --cflags --libs '+ libID )
return libInfo
def Glob (self, pattern):
""" temporary workaround; newer versions of SCons provide this as a global function
"""
pattern = self.subst(pattern)
return glob.glob(pattern)
class LumieraConfigContext(SConf):

View file

@ -25,7 +25,7 @@ liblumicommon_a_CXXFLAGS = $(CXXFLAGS) -Wall
liblumicommon_a_CPPFLAGS = -I$(top_srcdir)/src/
liblumicommon_a_SOURCES = \
$(liblumicommon_a_srcdir)/time.cpp \
$(liblumicommon_a_srcdir)/lumitime.cpp \
$(liblumicommon_a_srcdir)/util.cpp \
$(liblumicommon_a_srcdir)/visitor.cpp \
$(liblumicommon_a_srcdir)/cmdline.cpp \
@ -43,7 +43,7 @@ noinst_HEADERS += \
$(liblumicommon_a_srcdir)/singleton.hpp \
$(liblumicommon_a_srcdir)/singletonpolicies.hpp \
$(liblumicommon_a_srcdir)/singletonpreconfigure.hpp \
$(liblumicommon_a_srcdir)/time.hpp \
$(liblumicommon_a_srcdir)/lumitime.hpp \
$(liblumicommon_a_srcdir)/typelist.hpp \
$(liblumicommon_a_srcdir)/visitor.hpp \
$(liblumicommon_a_srcdir)/visitordispatcher.hpp \

View file

@ -21,7 +21,7 @@
* *****************************************************/
#include "common/time.hpp"
#include "common/lumitime.hpp"
#include <limits>

View file

@ -1,5 +1,5 @@
/*
TIME.hpp - unified representation of a time point, including conversion functions
LUMITIME.hpp - unified representation of a time point, including conversion functions
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
@ -21,8 +21,8 @@
*/
#ifndef LUMIERA_TIME_H
#define LUMIERA_TIME_H
#ifndef LUMIERA_LUMITIME_H
#define LUMIERA_LUMITIME_H
#include <boost/operators.hpp>

View file

@ -28,6 +28,7 @@ lumiera_tmpbuf_print_time (gavl_time_t time)
{
int milliseconds, seconds, minutes, hours;
int negative;
if(time < 0)
{

View file

@ -32,7 +32,7 @@
#include "common/p.hpp"
#include "common/util.hpp"
#include "common/time.hpp"
#include "common/lumitime.hpp"
#include "common/error.hpp" ///< pulls in NoBug via nobugcfg.hpp
#include "lib/appconfig.hpp"

View file

@ -747,19 +747,19 @@ config.macros.timeline.handler = function(place,macroName,params,wikifier,paramS
}
//}}}</pre>
</div>
<div title="BuildDependencies" modifier="Ichthyostega" modified="200807090323" created="200803261326" changecount="9">
<div title="BuildDependencies" modifier="Ichthyostega" modified="200807110148" created="200803261326" changecount="13">
<pre>! Programming Languages
* C
** a C99 compatible compiler, some GCC extensions are used, most are optional.
* C++
** C++98
** std::tr1 (for &lt;std::tr1::memory&gt;)
** BOOST ~~(below are the DEBIAN package names)~~
*** libboost-dev (=1.34.1-2)
*** libboost-program-options-dev (=1.34.1-2)
*** libboost-program-options1.34.1 (=1.34.1-2) ''NOTE: binary lib dependency''
*** libboost-regex-dev (=1.34.1-2)
*** libboost-regex1.34.1 (=1.34.1-2) ''binary lib depenency''
* BOOST ~~(listed below are the DEBIAN package names)~~
** libboost-dev (&gt;=1.34.1-2)
** libboost-program-options-dev (&gt;=1.34.1-2)
** libboost-program-options1.34.1 (&gt;=1.34.1-2) ''NOTE: binary dependency''
** libboost-regex-dev (&gt;=1.34.1-2)
** libboost-regex1.34.1 (&gt;=1.34.1-2) ''binary..''
** //usually, newer versions are OK//
* bash
@ -769,7 +769,8 @@ config.macros.timeline.handler = function(place,macroName,params,wikifier,paramS
* autotools
* SCons
** //need either autotools or scons//
** SCons (0.96.90), Python (2.3)
** SCons (0.96), Python (2.4)
** pkg-config
* Doxygen
* test.sh (included)
@ -781,6 +782,14 @@ config.macros.timeline.handler = function(place,macroName,params,wikifier,paramS
* boost (see above, version 1.35 works too)
* NoBug
* [[GAVL|http://gmerlin.sourceforge.net/gavl.html]] (1.0.0)
* for the GUI: gtkmm-2.4 gdl-1.0 cairomm-1.0 xv
** libgtkmm-2.4-dev (&gt;=2.8)
** libcairomm-1.0-dev (&gt;=0.6.0)
** libgdl-1-dev (&gt;=0.6.1)
*** libbonoboui2-dev (&gt;=2.14.0)
** libxv-dev ~~(1.0.2 is known to work)~~
//usually, newer versions are OK//
</pre>
</div>

View file

@ -759,20 +759,26 @@ config.macros.timeline.handler = function(place,macroName,params,wikifier,paramS
}
//}}}</pre>
</div>
<div title="BuildDependenceis" modifier="Ichthyostega" modified="200807090324" created="200708120103" tags="organization buildsys" changecount="10">
<div title="BuildDependenceis" modifier="Ichthyostega" modified="200807110146" created="200708120103" tags="organization buildsys" changecount="15">
<pre>for __Building__
* gcc (4.1), glibc6 (2.3), libstdc++6 (4.1)
* [[build system|BuildSystem]] dependencies: SCons (0.96.90), Python (2.3)
* [[build system|BuildSystem]] dependencies: SCons (0.96.90), Python (2.4), pkg-config
* [[GAVL|http://gmerlin.sourceforge.net/gavl.html]] (1.0.0)
* NoBug for Logging, Tracing, Asserting (can be obtained from [[Pipapo.org|http://www.pipapo.org/pipawiki/NoBug]])
* ~NoBug needs [[valgrind|Valgrind]] (3.2), execinfo.h and libpthread (&amp;rarr; glibc)
* std::tr1 &amp;mdash; esp. for the former BOOST::shared_ptr (which is now proposed standard)
* BOOST ~~(below are the DEBIAN package names)~~
** libboost-dev (=1.34.1-2)
** libboost-program-options-dev (=1.34.1-2)
** libboost-program-options1.34.1 (=1.34.1-2) ''NOTE: binary dependency''
** libboost-regex-dev (=1.34.1-2)
** libboost-regex1.34.1 (=1.34.1-2) ''binary..''
* BOOST ~~(listed below are the DEBIAN package names)~~
** libboost-dev (&gt;=1.34.1-2)
** libboost-program-options-dev (&gt;=1.34.1-2)
** libboost-program-options1.34.1 (&gt;=1.34.1-2) ''NOTE: binary dependency''
** libboost-regex-dev (&gt;=1.34.1-2)
** libboost-regex1.34.1 (&gt;=1.34.1-2) ''binary..''
* for the GUI: gtkmm-2.4 gdl-1.0 cairomm-1.0 xv
** libgtkmm-2.4-dev (&gt;=2.8)
** libcairomm-1.0-dev (&gt;=0.6.0)
** libgdl-1-dev (&gt;=0.6.1)
*** libbonoboui2-dev (&gt;=2.14.0)
** libxv-dev (&gt;=1.0.2)
//usually, newer versions are OK//
boost 1.35 works too.