merge buildsystem changes (dummy player and GUI/gdl work)

This commit is contained in:
Fischlurch 2009-04-24 17:20:39 +02:00
commit ae67c6db5c
6 changed files with 63 additions and 45 deletions

View file

@ -93,10 +93,10 @@ def setupBasicEnvironment():
appendVal(env,'DEBUG', 'CCFLAGS', val=' -ggdb')
# setup search path for Lumiera plugins
appendCppDefine(env,'PKGLIBDIR','LUMIERA_PLUGIN_PATH=\\"$PKGLIBDIR\\"'
,'LUMIERA_PLUGIN_PATH=\\"$DESTDIR/lib/lumiera\\"')
appendCppDefine(env,'PKGDATADIR','LUMIERA_CONFIG_PATH=\\"$PKGLIBDIR\\"'
,'LUMIERA_CONFIG_PATH=\\"$DESTDIR/share/lumiera\\"')
appendCppDefine(env,'PKGLIBDIR','LUMIERA_PLUGIN_PATH=\\"$PKGLIBDIR/:./.libs\\"'
,'LUMIERA_PLUGIN_PATH=\\"$DESTDIR/lib/lumiera/:./.libs\\"')
appendCppDefine(env,'PKGDATADIR','LUMIERA_CONFIG_PATH=\\"$PKGLIBDIR/:.\\"'
,'LUMIERA_CONFIG_PATH=\\"$DESTDIR/share/lumiera/:.\\"')
prepareOptionsHelp(opts,env)
opts.Save(OPTIONSCACHEFILE, env)
@ -257,14 +257,18 @@ def configurePlatform(env):
if not conf.CheckPkgConfig('glibmm-2.4', '2.16'):
problems.append('Unable to configure Lib glib--, exiting.')
if not conf.CheckPkgConfig('gthread-2.0', '2.16'):
if not conf.CheckPkgConfig('gthread-2.0', '2.12.4'):
problems.append('Need gthread support lib for glib-- based thread handling.')
if not conf.CheckPkgConfig('cairomm-1.0', 0.6):
problems.append('Unable to configure Cairo--, exiting.')
if not conf.CheckPkgConfig('gdl-1.0', '0.6.1'):
problems.append('Unable to configure the GNOME DevTool Library.')
verGDL = '2.27.1'
if not conf.CheckPkgConfig('gdl-lum', verGDL, alias='gdl'):
print 'Custom package "gdl-lum" not found. Trying official GDL release >=%s...' % verGDL
if not conf.CheckPkgConfig('gdl-1.0', verGDL, alias='gdl'):
problems.append('GNOME Docking Library not found. We either need a very recent GDL '
'version (>=%s), or the custom package "gdl-lum".' % verGDL)
if not conf.CheckPkgConfig('librsvg-2.0', '2.18.1'):
problems.append('Need rsvg Library for rendering icons.')
@ -340,13 +344,6 @@ def defineBuildTargets(env, artifacts):
envPlu.Append(CPPDEFINES='LUMIERA_PLUGIN')
artifacts['plugins'] = [] # currently none
# the Lumiera GTK GUI
envGtk = env.Clone()
envGtk.mergeConf(['gtkmm-2.4','cairomm-1.0','gdl-1.0','librsvg-2.0','xv','xext','sm'])
envGtk.Append(CPPDEFINES='LUMIERA_PLUGIN', LIBS=core)
objgui = srcSubtree(envGtk,'$SRCDIR/gui')
# render and install Icons
vector_icon_dir = env.subst('$ICONDIR/svg')
prerendered_icon_dir = env.subst('$ICONDIR/prerendered')
@ -354,15 +351,20 @@ def defineBuildTargets(env, artifacts):
+ [env.IconCopy(f) for f in scanSubtree(prerendered_icon_dir, ['*.png'])]
)
guimodule = envGtk.LoadableModule('$LIBDIR/gtk_gui', objgui, SHLIBPREFIX='', SHLIBSUFFIX='.lum')
artifacts['lumigui'] = ( guimodule
+ envGtk.Program('$BINDIR/lumigui', objgui )
+ env.Install('$BINDIR', env.Glob('$SRCDIR/gui/*.rc'))
+ artifacts['icons']
)
# the Lumiera GTK GUI
envGtk = env.Clone()
envGtk.mergeConf(['gtkmm-2.4','cairomm-1.0','gdl','xv','xext','sm'])
envGtk.Append(CPPDEFINES='LUMIERA_PLUGIN', LIBS=core)
objgui = srcSubtree(envGtk,'$SRCDIR/gui')
guimodule = envGtk.LoadableModule('$LIBDIR/gtk_gui', objgui, SHLIBPREFIX='', SHLIBSUFFIX='.lum')
artifacts['gui'] = ( guimodule
+ env.Install('$BINDIR', env.Glob('$SRCDIR/gui/*.rc'))
+ artifacts['icons']
)
# call subdir SConscript(s) for independent components
SConscript(dirs=[SRCDIR+'/tool'], exports='env envGtk artifacts core')
SConscript(dirs=[SRCDIR+'/tool'], exports='env artifacts core')
SConscript(dirs=[TESTDIR], exports='env envPlu artifacts core')
@ -375,7 +377,7 @@ def definePostBuildTargets(env, artifacts):
il = env.Alias('install-lib', '$DESTDIR/lib')
env.Alias('install', [ib, il])
build = env.Alias('build', artifacts['lumiera']+artifacts['lumigui']+artifacts['plugins']+artifacts['tools'])
build = env.Alias('build', artifacts['lumiera']+artifacts['gui']+artifacts['plugins']+artifacts['tools'])
allbu = env.Alias('allbuild', build+artifacts['testsuite'])
env.Default('build')
# additional files to be cleaned when cleaning 'build'
@ -416,6 +418,7 @@ artifacts = {}
# Each entry actually is a SCons-Node list.
# Passing these entries to other builders defines dependencies.
# 'lumiera' : the App
# 'gui' : the GTK UI (plugin)
# 'plugins' : plugin shared lib
# 'tools' : small tool applications (e.g mpegtoc)
# 'src,tar' : source tree as tarball (without doc)

View file

@ -63,7 +63,7 @@ class LumieraEnvironment(Environment):
return self
def addLibInfo (self, libID, minVersion=0):
def addLibInfo (self, libID, minVersion=0, alias=None):
""" use pkg-config to create an Environment describing the lib.
Don't add this defs to the current Environment, rather store
them in the libInfo Dictionary.
@ -73,8 +73,10 @@ class LumieraEnvironment(Environment):
print "Problems configuring the Library %s (>= %s)" % (libID,minVersion)
return False
self.libInfo[libID] = libInfo = LumieraEnvironment()
self.libInfo[libID] = libInfo = LumieraEnvironment()
libInfo.ParseConfig ('pkg-config --cflags --libs '+ libID )
if alias:
self.libInfo[alias] = libInfo
return libInfo
def Glob (self, pattern):
@ -88,8 +90,8 @@ class LumieraEnvironment(Environment):
#### temporary pre 1.0 SCons compatibility hack ####
_ver = map(int, SCons.__version__.split('.'))
_old = (_ver[0]<1 and _ver[1]<98)
_ver = map(int, SCons.__version__.split('.')[:2])
_old = (_ver[0]<1 and _ver[1]<97)
if _old:
ConfigBase = SCons.SConf.SConf
else:
@ -107,9 +109,9 @@ class LumieraConfigContext(ConfigBase):
def __init__(self, *args,**kw):
ConfigBase.__init__(self,*args,**kw)
def CheckPkgConfig (self, libID, minVersion=0):
def CheckPkgConfig (self, libID, minVersion=0, alias=None):
print "Checking for library configuration: %s " % libID
# self.Message(self,"Checking for library configuration: %s " % libID)
return self.env.addLibInfo (libID, minVersion)
return self.env.addLibInfo (libID, minVersion, alias)

View file

@ -19,6 +19,13 @@
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
id="defs4">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 50 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="150 : 50 : 1"
inkscape:persp3d-origin="75 : 33.333333 : 1"
id="perspective59" />
<linearGradient
inkscape:collect="always"
id="linearGradient10554">
@ -185,7 +192,7 @@
xlink:href="#linearGradient10554"
id="linearGradient7986"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.7041896,0,0,0.7041896,-40.406443,-220.43015)"
gradientTransform="matrix(0.7041896,0,0,0.7041896,-41.406433,-220.43017)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
@ -195,7 +202,7 @@
xlink:href="#linearGradient124"
id="radialGradient7989"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.5869533,0,0,0.8448423,-51.871574,-221.82034)"
gradientTransform="matrix(0.5869533,0,0,0.8448423,-52.871564,-221.82036)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
@ -206,7 +213,7 @@
xlink:href="#linearGradient124"
id="linearGradient7992"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.559542,1.292457,-0.3231142,0.1398855,-51.871571,-221.82034)"
gradientTransform="matrix(0.559542,1.292457,-0.3231142,0.1398855,-52.871561,-221.82036)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
@ -222,9 +229,9 @@
objecttolerance="10"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.6568545"
inkscape:cx="67.786397"
inkscape:cy="10.056284"
inkscape:zoom="22.627418"
inkscape:cx="121.33645"
inkscape:cy="16.380045"
inkscape:document-units="px"
inkscape:current-layer="layer3"
showgrid="true"
@ -294,22 +301,22 @@
sodipodi:nodetypes="ccccc" />
<path
id="path14451"
d="M 128.49999,77.500022 L 128.49999,88.500022 L 131.49999,86.500022 L 133.49999,90.500022 L 135.49999,89.500022 L 133.49999,85.500022 L 136.49999,85.500022 L 128.49999,77.500022 z"
d="M 127.5,77.5 L 127.5,88.5 L 130.5,86.5 L 132.5,90.5 L 134.5,89.5 L 132.5,85.5 L 135.5,85.5 L 127.5,77.5 z"
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
sodipodi:nodetypes="cccccccc" />
<path
style="fill:url(#linearGradient7992);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.24999988;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
d="M 132.00799,83.448274 L 133.59102,84.965162 L 133.0687,85.76811 L 134.8336,89.279979 L 133.71007,89.835652 L 132.00919,86.369947 L 131.22922,86.090464 L 131.04078,83.859018 L 132.00799,83.448274 z"
d="M 131.008,83.448252 L 132.59103,84.96514 L 132.06871,85.768088 L 133.83361,89.279957 L 132.71008,89.83563 L 131.0092,86.369925 L 130.22923,86.090442 L 130.04079,83.858996 L 131.008,83.448252 z"
id="path14453"
sodipodi:nodetypes="ccccccccc" />
<path
sodipodi:nodetypes="ccccc"
id="path14455"
d="M 135.29013,84.99752 L 132.85569,84.999865 L 129.00416,87.559739 L 129.00329,78.735163 L 135.29013,84.99752 z"
d="M 134.29014,84.997498 L 131.8557,84.999843 L 128.00417,87.559717 L 128.0033,78.735141 L 134.29014,84.997498 z"
style="fill:url(#radialGradient7989);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1" />
<path
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient7986);stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
d="M 134.09791,84.503528 L 132.63635,84.542245 L 129.51177,86.639535 L 129.50564,79.893544 L 134.09791,84.503528 z"
d="M 133.09792,84.503506 L 131.63636,84.542223 L 128.51178,86.639513 L 128.50565,79.893522 L 133.09792,84.503506 z"
id="path14457"
sodipodi:nodetypes="ccccc" />
<g
@ -372,7 +379,8 @@
inkscape:groupmode="layer"
id="layer4"
inkscape:label="plate#1"
style="display:none">
style="display:none"
sodipodi:insensitive="true">
<rect
y="69"
x="97"

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View file

@ -54,6 +54,7 @@ namespace gui {
void
GtkLumiera::main(int argc, char *argv[])
{
Glib::thread_init();
Main kit(argc, argv);

View file

@ -7,6 +7,7 @@
#ifndef GTK_LUMIERA_HPP
#define GTK_LUMIERA_HPP
#include <locale>
#include <gtkmm.h>
#include <nobug.h> // need to include this after gtkmm.h, because types.h from GTK tries to shaddow the ERROR macro from windows, which kills NoBug's ERROR macro
#include <vector>
@ -16,7 +17,7 @@
#include <boost/weak_ptr.hpp>
#include <boost/scoped_ptr.hpp>
#include <libgdl-1.0/gdl/gdl-dock-layout.h>
#include <gdl/gdl-dock-layout.h>
extern "C" {
#include <gavl/gavltime.h>

View file

@ -3,20 +3,23 @@
## SConscript - SCons buildscript for tool subdirectory (called by SConstruct)
##
Import('env','envGtk','artifacts','core')
Import('env','artifacts','core')
support_lib = artifacts['support']
vgsuppr = env.Program('#$BINDIR/vgsuppression','vgsuppression.c', LIBS=core) ## for suppressing false valgrind alarms
luidgen = env.Program('#$BINDIR/luidgen', 'luidgen.c', LIBS=support_lib) ## for rendering SVG icons (uses librsvg)
envSvg = env.Clone()
envSvg.mergeConf(['librsvg-2.0'])
envSvg.Append(LIBS=support_lib)
rsvg = envGtk.Program('#$BINDIR/rsvg-convert','rsvg-convert.c')
vgsuppr = env.Program('#$BINDIR/vgsuppression','vgsuppression.c', LIBS=core)## for suppressing false valgrind alarms
luidgen = env.Program('#$BINDIR/luidgen', 'luidgen.c', LIBS=support_lib) ## for generating Lumiera-UIDs
rsvg = envSvg.Program('#$BINDIR/rsvg-convert','rsvg-convert.c') ## for rendering SVG icons (uses librsvg)
# build additional test and administrative tools....
artifacts['tools'] = [ env.Program('#$BINDIR/hello-world','hello.c') #### hello world (checks C build)
+ env.Program('#$BINDIR/try', 'try.cpp') #### to try out some feature...
# + luidgen
+ luidgen
+ vgsuppr
+ rsvg
]