integrate the GTK-Gui (draft) in the SCons build
This commit is contained in:
parent
ce90f1763b
commit
a46bfd2bf6
10 changed files with 104 additions and 32 deletions
49
SConstruct
49
SConstruct
|
|
@ -35,6 +35,7 @@ CUSTOPTIONSFILE = 'custom-options'
|
||||||
SRCDIR = 'src'
|
SRCDIR = 'src'
|
||||||
BINDIR = 'bin'
|
BINDIR = 'bin'
|
||||||
TESTDIR = 'tests'
|
TESTDIR = 'tests'
|
||||||
|
ICONDIR = 'icons'
|
||||||
VERSION = '0.1+pre.01'
|
VERSION = '0.1+pre.01'
|
||||||
#-----------------------------------Configuration
|
#-----------------------------------Configuration
|
||||||
|
|
||||||
|
|
@ -61,6 +62,7 @@ def setupBasicEnvironment():
|
||||||
env.Replace( VERSION=VERSION
|
env.Replace( VERSION=VERSION
|
||||||
, SRCDIR=SRCDIR
|
, SRCDIR=SRCDIR
|
||||||
, BINDIR=BINDIR
|
, BINDIR=BINDIR
|
||||||
|
, ICONDIR=ICONDIR
|
||||||
, CPPPATH=["#"+SRCDIR] # used to find includes, "#" means always absolute to build-root
|
, 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
|
, CPPDEFINES=['-DLUMIERA_VERSION='+VERSION ] # note: it's a list to append further defines
|
||||||
, CCFLAGS='-Wall ' # -fdiagnostics-show-option
|
, CCFLAGS='-Wall ' # -fdiagnostics-show-option
|
||||||
|
|
@ -211,8 +213,36 @@ def configurePlatform(env):
|
||||||
if not conf.CheckLibWithHeader('boost_regex-mt','boost/regex.hpp','C++'):
|
if not conf.CheckLibWithHeader('boost_regex-mt','boost/regex.hpp','C++'):
|
||||||
print 'We need the boost regular expression lib (incl. binary lib for linking).'
|
print 'We need the boost regular expression lib (incl. binary lib for linking).'
|
||||||
Exit(1)
|
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
|
# create new env containing the finished configuration
|
||||||
return conf.Finish()
|
return conf.Finish()
|
||||||
|
|
||||||
|
|
@ -245,7 +275,7 @@ def defineBuildTargets(env, artifacts):
|
||||||
objlib = ( srcSubtree(env,'$SRCDIR/common')
|
objlib = ( srcSubtree(env,'$SRCDIR/common')
|
||||||
+ srcSubtree(env,'$SRCDIR/lib')
|
+ 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)
|
core = ( env.StaticLibrary('$BINDIR/lumiback.la', objback)
|
||||||
+ env.StaticLibrary('$BINDIR/lumiproc.la', objproc)
|
+ env.StaticLibrary('$BINDIR/lumiproc.la', objproc)
|
||||||
+ env.StaticLibrary('$BINDIR/lumi.la', objlib)
|
+ env.StaticLibrary('$BINDIR/lumi.la', objlib)
|
||||||
|
|
@ -259,7 +289,16 @@ def defineBuildTargets(env, artifacts):
|
||||||
env.Depends(objlib, precomp)
|
env.Depends(objlib, precomp)
|
||||||
|
|
||||||
artifacts['lumiera'] = env.Program('$BINDIR/lumiera', ['$SRCDIR/main.cpp']+ core )
|
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
|
# call subdir SConscript(s) for independent components
|
||||||
SConscript(dirs=[SRCDIR+'/tool'], exports='env artifacts core')
|
SConscript(dirs=[SRCDIR+'/tool'], exports='env artifacts core')
|
||||||
|
|
@ -275,7 +314,7 @@ def definePostBuildTargets(env, artifacts):
|
||||||
il = env.Alias('install-lib', '$DESTDIR/lib')
|
il = env.Alias('install-lib', '$DESTDIR/lib')
|
||||||
env.Alias('install', [ib, il])
|
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'])
|
allbu = env.Alias('allbuild', build+artifacts['testsuite'])
|
||||||
env.Default('build')
|
env.Default('build')
|
||||||
# additional files to be cleaned when cleaning 'build'
|
# additional files to be cleaned when cleaning 'build'
|
||||||
|
|
|
||||||
|
|
@ -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):
|
def RegisterPrecompiledHeader_Builder(env):
|
||||||
""" Registeres an Custom Builder for generating a precompiled Header.
|
""" Registeres an Custom Builder for generating a precompiled Header.
|
||||||
Note you should define a dependency to the PCH file
|
Note you should define a dependency to the PCH file
|
||||||
|
|
|
||||||
|
|
@ -51,15 +51,15 @@ class LumieraEnvironment(Environment):
|
||||||
for elm in other:
|
for elm in other:
|
||||||
self.mergeConf(elm)
|
self.mergeConf(elm)
|
||||||
elif isinstance(other, str):
|
elif isinstance(other, str):
|
||||||
if not other in self.libInfo:
|
if other in self.libInfo:
|
||||||
raise "Lib-info '%s' not available" % other
|
|
||||||
else:
|
|
||||||
self.mergeConf(self.libInfo[other])
|
self.mergeConf(self.libInfo[other])
|
||||||
else:
|
else:
|
||||||
self.Append (LIBS = other.get ('LIBS',[]))
|
self.Append (LIBS = other.get ('LIBS',[]))
|
||||||
self.Append (LIBPATH = other.get ('LIBPATH', []))
|
self.Append (LIBPATH = other.get ('LIBPATH', []))
|
||||||
self.Append (CPPPATH = other.get('CPPPATH', []))
|
self.Append (CPPPATH = other.get('CPPPATH', []))
|
||||||
self.Append (LINKFLAGS = other.get('LINKFLAGS', []))
|
self.Append (LINKFLAGS = other.get('LINKFLAGS', []))
|
||||||
|
|
||||||
|
return self
|
||||||
|
|
||||||
|
|
||||||
def addLibInfo (self, libID, minVersion=0):
|
def addLibInfo (self, libID, minVersion=0):
|
||||||
|
|
@ -75,7 +75,12 @@ class LumieraEnvironment(Environment):
|
||||||
self.libInfo[libID] = libInfo = LumieraEnvironment()
|
self.libInfo[libID] = libInfo = LumieraEnvironment()
|
||||||
libInfo.ParseConfig ('pkg-config --cflags --libs '+ libID )
|
libInfo.ParseConfig ('pkg-config --cflags --libs '+ libID )
|
||||||
return libInfo
|
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):
|
class LumieraConfigContext(SConf):
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ liblumicommon_a_CXXFLAGS = $(CXXFLAGS) -Wall
|
||||||
liblumicommon_a_CPPFLAGS = -I$(top_srcdir)/src/
|
liblumicommon_a_CPPFLAGS = -I$(top_srcdir)/src/
|
||||||
|
|
||||||
liblumicommon_a_SOURCES = \
|
liblumicommon_a_SOURCES = \
|
||||||
$(liblumicommon_a_srcdir)/time.cpp \
|
$(liblumicommon_a_srcdir)/lumitime.cpp \
|
||||||
$(liblumicommon_a_srcdir)/util.cpp \
|
$(liblumicommon_a_srcdir)/util.cpp \
|
||||||
$(liblumicommon_a_srcdir)/visitor.cpp \
|
$(liblumicommon_a_srcdir)/visitor.cpp \
|
||||||
$(liblumicommon_a_srcdir)/cmdline.cpp \
|
$(liblumicommon_a_srcdir)/cmdline.cpp \
|
||||||
|
|
@ -43,7 +43,7 @@ noinst_HEADERS += \
|
||||||
$(liblumicommon_a_srcdir)/singleton.hpp \
|
$(liblumicommon_a_srcdir)/singleton.hpp \
|
||||||
$(liblumicommon_a_srcdir)/singletonpolicies.hpp \
|
$(liblumicommon_a_srcdir)/singletonpolicies.hpp \
|
||||||
$(liblumicommon_a_srcdir)/singletonpreconfigure.hpp \
|
$(liblumicommon_a_srcdir)/singletonpreconfigure.hpp \
|
||||||
$(liblumicommon_a_srcdir)/time.hpp \
|
$(liblumicommon_a_srcdir)/lumitime.hpp \
|
||||||
$(liblumicommon_a_srcdir)/typelist.hpp \
|
$(liblumicommon_a_srcdir)/typelist.hpp \
|
||||||
$(liblumicommon_a_srcdir)/visitor.hpp \
|
$(liblumicommon_a_srcdir)/visitor.hpp \
|
||||||
$(liblumicommon_a_srcdir)/visitordispatcher.hpp \
|
$(liblumicommon_a_srcdir)/visitordispatcher.hpp \
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
* *****************************************************/
|
* *****************************************************/
|
||||||
|
|
||||||
|
|
||||||
#include "common/time.hpp"
|
#include "common/lumitime.hpp"
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -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
|
Copyright (C) Lumiera.org
|
||||||
2008, Hermann Vosseler <Ichthyostega@web.de>
|
2008, Hermann Vosseler <Ichthyostega@web.de>
|
||||||
|
|
@ -21,8 +21,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef LUMIERA_TIME_H
|
#ifndef LUMIERA_LUMITIME_H
|
||||||
#define LUMIERA_TIME_H
|
#define LUMIERA_LUMITIME_H
|
||||||
|
|
||||||
#include <boost/operators.hpp>
|
#include <boost/operators.hpp>
|
||||||
|
|
||||||
|
|
@ -28,6 +28,7 @@ lumiera_tmpbuf_print_time (gavl_time_t time)
|
||||||
{
|
{
|
||||||
int milliseconds, seconds, minutes, hours;
|
int milliseconds, seconds, minutes, hours;
|
||||||
int negative;
|
int negative;
|
||||||
|
|
||||||
|
|
||||||
if(time < 0)
|
if(time < 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
#include "common/p.hpp"
|
#include "common/p.hpp"
|
||||||
#include "common/util.hpp"
|
#include "common/util.hpp"
|
||||||
#include "common/time.hpp"
|
#include "common/lumitime.hpp"
|
||||||
#include "common/error.hpp" ///< pulls in NoBug via nobugcfg.hpp
|
#include "common/error.hpp" ///< pulls in NoBug via nobugcfg.hpp
|
||||||
#include "lib/appconfig.hpp"
|
#include "lib/appconfig.hpp"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -747,19 +747,19 @@ config.macros.timeline.handler = function(place,macroName,params,wikifier,paramS
|
||||||
}
|
}
|
||||||
//}}}</pre>
|
//}}}</pre>
|
||||||
</div>
|
</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
|
<pre>! Programming Languages
|
||||||
* C
|
* C
|
||||||
** a C99 compatible compiler, some GCC extensions are used, most are optional.
|
** a C99 compatible compiler, some GCC extensions are used, most are optional.
|
||||||
* C++
|
* C++
|
||||||
** C++98
|
** C++98
|
||||||
** std::tr1 (for <std::tr1::memory>)
|
** std::tr1 (for <std::tr1::memory>)
|
||||||
** BOOST ~~(below are the DEBIAN package names)~~
|
* BOOST ~~(listed below are the DEBIAN package names)~~
|
||||||
*** libboost-dev (=1.34.1-2)
|
** libboost-dev (>=1.34.1-2)
|
||||||
*** libboost-program-options-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-program-options1.34.1 (>=1.34.1-2) ''NOTE: binary dependency''
|
||||||
*** libboost-regex-dev (=1.34.1-2)
|
** libboost-regex-dev (>=1.34.1-2)
|
||||||
*** libboost-regex1.34.1 (=1.34.1-2) ''binary lib depenency''
|
** libboost-regex1.34.1 (>=1.34.1-2) ''binary..''
|
||||||
** //usually, newer versions are OK//
|
** //usually, newer versions are OK//
|
||||||
|
|
||||||
* bash
|
* bash
|
||||||
|
|
@ -769,7 +769,8 @@ config.macros.timeline.handler = function(place,macroName,params,wikifier,paramS
|
||||||
* autotools
|
* autotools
|
||||||
* SCons
|
* SCons
|
||||||
** //need either autotools or scons//
|
** //need either autotools or scons//
|
||||||
** SCons (0.96.90), Python (2.3)
|
** SCons (0.96), Python (2.4)
|
||||||
|
** pkg-config
|
||||||
* Doxygen
|
* Doxygen
|
||||||
* test.sh (included)
|
* 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)
|
* boost (see above, version 1.35 works too)
|
||||||
* NoBug
|
* NoBug
|
||||||
* [[GAVL|http://gmerlin.sourceforge.net/gavl.html]] (1.0.0)
|
* [[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 (>=2.8)
|
||||||
|
** libcairomm-1.0-dev (>=0.6.0)
|
||||||
|
** libgdl-1-dev (>=0.6.1)
|
||||||
|
*** libbonoboui2-dev (>=2.14.0)
|
||||||
|
** libxv-dev ~~(1.0.2 is known to work)~~
|
||||||
|
|
||||||
|
//usually, newer versions are OK//
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -759,20 +759,26 @@ config.macros.timeline.handler = function(place,macroName,params,wikifier,paramS
|
||||||
}
|
}
|
||||||
//}}}</pre>
|
//}}}</pre>
|
||||||
</div>
|
</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__
|
<pre>for __Building__
|
||||||
* gcc (4.1), glibc6 (2.3), libstdc++6 (4.1)
|
* 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)
|
* [[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 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 (&rarr; glibc)
|
* ~NoBug needs [[valgrind|Valgrind]] (3.2), execinfo.h and libpthread (&rarr; glibc)
|
||||||
* std::tr1 &mdash; esp. for the former BOOST::shared_ptr (which is now proposed standard)
|
* std::tr1 &mdash; esp. for the former BOOST::shared_ptr (which is now proposed standard)
|
||||||
* BOOST ~~(below are the DEBIAN package names)~~
|
* BOOST ~~(listed below are the DEBIAN package names)~~
|
||||||
** libboost-dev (=1.34.1-2)
|
** libboost-dev (>=1.34.1-2)
|
||||||
** libboost-program-options-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-program-options1.34.1 (>=1.34.1-2) ''NOTE: binary dependency''
|
||||||
** libboost-regex-dev (=1.34.1-2)
|
** libboost-regex-dev (>=1.34.1-2)
|
||||||
** libboost-regex1.34.1 (=1.34.1-2) ''binary..''
|
** libboost-regex1.34.1 (>=1.34.1-2) ''binary..''
|
||||||
|
* for the GUI: gtkmm-2.4 gdl-1.0 cairomm-1.0 xv
|
||||||
|
** libgtkmm-2.4-dev (>=2.8)
|
||||||
|
** libcairomm-1.0-dev (>=0.6.0)
|
||||||
|
** libgdl-1-dev (>=0.6.1)
|
||||||
|
*** libbonoboui2-dev (>=2.14.0)
|
||||||
|
** libxv-dev (>=1.0.2)
|
||||||
//usually, newer versions are OK//
|
//usually, newer versions are OK//
|
||||||
|
|
||||||
boost 1.35 works too.
|
boost 1.35 works too.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue