From dc10c78a8319df64bb03dfef913c2601486549c0 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Mon, 10 Mar 2008 09:28:58 +0100 Subject: [PATCH 1/4] merge Lumiera renaming --- DIR_INFO | 2 +- INSTALL | 4 ++-- LICENSE | 11 ++--------- README | 29 ++++++++++++++++++----------- SConstruct | 30 +++++++++++++++--------------- admin/scons/Buildhelper.py | 8 ++++---- bin/DIR_INFO | 2 +- oldsrc/DIR_INFO | 2 +- src/lib/DIR_INFO | 2 +- src/main.cpp | 14 ++++++++------ src/nobugcfg.h | 6 +++--- src/plugin/helloplugin.c | 4 ++-- src/tool/DIR_INFO | 2 +- src/tool/SConscript | 4 ---- src/tool/hello.c | 4 ++-- tests/test.sh | 2 +- 16 files changed, 62 insertions(+), 64 deletions(-) diff --git a/DIR_INFO b/DIR_INFO index 39fd1850f..f05e9a881 100644 --- a/DIR_INFO +++ b/DIR_INFO @@ -1 +1 @@ -The root dir for the cinelerra3 project +The root dir for the Lumiera project diff --git a/INSTALL b/INSTALL index c6cf3ff92..7983166ec 100644 --- a/INSTALL +++ b/INSTALL @@ -1,5 +1,5 @@ -Running / Installing Cinelerra-3 Prototype -========================================== +Running / Installing Lumiera Prototype +====================================== ** to be written ** diff --git a/LICENSE b/LICENSE index b93cee22f..4a684524d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,17 +1,10 @@ -The Cinelerra source code is (C) by the original authors (see AUTHORS) +The Lumiera source code is (C) by the original authors (see AUTHORS) ======================================================================= -Cinelerra is free software -- you may use and redistribute it under the +Lumiera is free software -- you may use and redistribute it under the Terms and conditions of the GNU GENERAL PUBLIC LICENSE (GPL); either version 2 of the License, or (at your option) any later version. ======================================================================= For a copy of the GPL Version 2 see the file "COPYING" -In addition to the GPL's warranty stipulation, Cinelerra is distributed WITHOUT -GUARANTEED SUPPORT; without even the guarantee of ADDITIONAL LABOR. Support -that is not guaranteed includes technical support, compiler troubleshooting, -debugging, version matching, updating, among other additional labor which -may or may not be required to meet a user's requirements. - - diff --git a/README b/README index 0ab5fe3ae..7913094ee 100644 --- a/README +++ b/README @@ -1,8 +1,8 @@ -====================================== -Cinelerra -- the video NLE for Linux -====================================== +==================================== +Lumiera -- the video NLE for Linux +==================================== - Cinelerra is a nonlinear video editing and compositing tool. + Lumiera is a nonlinear video editing and compositing tool. It understands some of the common multimedia formats (quicktime, avi, ogg) and audio/video compression codecs (divx, xvid, mpeg1/2/4, ...) @@ -12,23 +12,30 @@ Cinelerra -- the video NLE for Linux and RGB-float colormodels and the ability to mix media with differing sizes and framerates. +For more information about Lumiera visit http://lumiera.org/ For more information about Cinelerra visit http://cinelerra.org/ ------------------------------- -"Cinelerra-3" prototype code ------------------------------- +---------------------------- +"Lumiera" prototype code +---------------------------- -**This source tree doesn't contain a working video editing application** -Rather, it contains some design studies and prototype code for improving -some aspects of the Cinelerra Application. This work may eventually -evolve into a new major release of Cinelerra. +**This source tree doesn't yet contain a working video editing application** +Rather, it contains the initial framework and core modules of the lower and +middle layer of the envisioned new Application "Lumiera". As of 7/2007, we start here with some backend and render engine modules together with some unit tests. You should find a wiki with detailed design considerations and developer documentation and a UML model (usable with BOUML 2.29) in the sibling directories. +As of 2/2008 the project has been separated completely from his ancestor "Cinelerra" +The Community, which is largely identical to the Cinelerra-CV community, choose the +new project name "Lumiera". The basic project infrastructure is up and running, +and work on the new codebase is going on continuosely. We can show nothing but +a running test suite for now. + + Build Requirements ------------------ diff --git a/SConstruct b/SConstruct index 5dc55580a..4d2f2ee9c 100644 --- a/SConstruct +++ b/SConstruct @@ -1,10 +1,10 @@ # -*- python -*- ## -## SConstruct - SCons based build-sytem for Cinelerra +## SConstruct - SCons based build-sytem for Lumiera ## -# Copyright (C) CinelerraCV -# 2007, Hermann Vosseler +# Copyright (C) Lumiera.org +# 2008, Hermann Vosseler # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -61,7 +61,7 @@ def setupBasicEnvironment(): , SRCDIR=SRCDIR , BINDIR=BINDIR , CPPPATH=["#"+SRCDIR] # used to find includes, "#" means always absolute to build-root - , CPPDEFINES=['-DCINELERRA_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 ) @@ -134,7 +134,7 @@ def defineCmdlineOptions(): def prepareOptionsHelp(opts,env): prelude = """ USAGE: scons [-c] [OPTS] [key=val [key=val...]] [TARGETS] - Build and optionally install Cinelerra. + Build and optionally install Lumiera. Without specifying any target, just the (re)build target will run. Add -c to the commandline to clean up anything a given target would produce @@ -234,21 +234,21 @@ def defineBuildTargets(env, artifacts): We use a custom function to declare a whole tree of srcfiles. """ - cinobj = ( srcSubtree(env,'$SRCDIR/backend') + lumobj = ( srcSubtree(env,'$SRCDIR/backend') + srcSubtree(env,'$SRCDIR/proc') + srcSubtree(env,'$SRCDIR/common') + srcSubtree(env,'$SRCDIR/lib') ) plugobj = srcSubtree(env,'$SRCDIR/plugin', isShared=True) - core = env.StaticLibrary('$BINDIR/core.la', cinobj) - #core = cinobj # use this for linking directly + core = env.StaticLibrary('$BINDIR/core.la', lumobj) + #core = lumobj # use this for linking directly # use PCH to speed up building precomp = env.PrecompiledHeader('$SRCDIR/pre') - env.Depends(cinobj, precomp) + env.Depends(lumobj, precomp) - artifacts['cinelerra'] = env.Program('$BINDIR/cinelerra', ['$SRCDIR/main.cpp']+ core ) - artifacts['plugins'] = env.SharedLibrary('$BINDIR/cinelerra-plugin', plugobj) + artifacts['lumiera'] = env.Program('$BINDIR/lumiera', ['$SRCDIR/main.cpp']+ core ) + artifacts['plugins'] = env.SharedLibrary('$BINDIR/lumiera-plugin', plugobj) # call subdir SConscript(s) for independent components SConscript(dirs=[SRCDIR+'/tool'], exports='env artifacts') @@ -264,7 +264,7 @@ def definePostBuildTargets(env, artifacts): il = env.Alias('install-lib', '$DESTDIR/lib') env.Alias('install', [ib, il]) - build = env.Alias('build', artifacts['cinelerra']+artifacts['plugins']) + build = env.Alias('build', artifacts['lumiera']+artifacts['plugins']) allbu = env.Alias('allbuild', build+artifacts['testsuite']) env.Default('build') # additional files to be cleaned when cleaning 'build' @@ -286,11 +286,11 @@ def definePostBuildTargets(env, artifacts): def defineInstallTargets(env, artifacts): """ define some artifacts to be installed into target locations. """ - env.Install(dir = '$DESTDIR/bin', source=artifacts['cinelerra']) + env.Install(dir = '$DESTDIR/bin', source=artifacts['lumiera']) env.Install(dir = '$DESTDIR/lib', source=artifacts['plugins']) env.Install(dir = '$DESTDIR/bin', source=artifacts['tools']) - env.Install(dir = '$DESTDIR/share/doc/cinelerra$VERSION/devel', source=artifacts['doxydoc']) + env.Install(dir = '$DESTDIR/share/doc/lumiera$VERSION/devel', source=artifacts['doxydoc']) ##################################################################### @@ -310,7 +310,7 @@ artifacts = {} # the various things we build. # Each entry actually is a SCons-Node list. # Passing these entries to other builders defines dependencies. -# 'cinelerra' : the App +# 'lumiera' : the App # 'plugins' : plugin shared lib # 'tools' : small tool applications (e.g mpegtoc) # 'src,tar' : source tree as tarball (without doc) diff --git a/admin/scons/Buildhelper.py b/admin/scons/Buildhelper.py index 419de6e68..ae3f5fb1f 100644 --- a/admin/scons/Buildhelper.py +++ b/admin/scons/Buildhelper.py @@ -3,8 +3,8 @@ ## Buildhelper.py - helpers, custom builders, for SConstruct ## -# Copyright (C) CinelerraCV -# 2007, Hermann Vosseler +# Copyright (C) Lumiera.org +# 2008, Hermann Vosseler # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -123,8 +123,8 @@ def Tarball(env,location,dirs,suffix=''): """ targetID = '../extern-tar%s' % suffix versionID = env['VERSION'] - defaultName = 'cinelerra%s_%s' % (suffix, versionID) - nameprefix = 'cinelerra-%s/' % (versionID) + defaultName = 'lumiera%s_%s' % (suffix, versionID) + nameprefix = 'lumiera-%s/' % (versionID) location = env.subst(location) dirs = env.subst(dirs) return env.Command(targetID,None, createTarball, diff --git a/bin/DIR_INFO b/bin/DIR_INFO index c9048f8c1..9dafe61c3 100644 --- a/bin/DIR_INFO +++ b/bin/DIR_INFO @@ -1 +1 @@ -cinelerra executable(s) and libraries will be built here +Lumiera executable(s) and libraries will be built here diff --git a/oldsrc/DIR_INFO b/oldsrc/DIR_INFO index 666124344..e3f9d5b47 100644 --- a/oldsrc/DIR_INFO +++ b/oldsrc/DIR_INFO @@ -1 +1 @@ -cinelerra2 sources, added per case when needed +Cinelerra2 sources, added per case when needed diff --git a/src/lib/DIR_INFO b/src/lib/DIR_INFO index 1bc5bfed3..6946a8b7e 100644 --- a/src/lib/DIR_INFO +++ b/src/lib/DIR_INFO @@ -1,2 +1,2 @@ -cinelerra support library +Lumiera support library This dir contains the code for some tools and library code which will be used in many places diff --git a/src/main.cpp b/src/main.cpp index 18384f0c7..398cdc3df 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,8 +1,8 @@ /* - main.cpp - start the Cinelerra Application + main.cpp - start the Lumiera Application - Copyright (C) CinelerraCV - 2007, Christian Thaeter + Copyright (C) Lumiera.org + 2008, Christian Thaeter Hermann Vosseler This program is free software; you can redistribute it and/or @@ -23,14 +23,16 @@ #include +#include "lumiera.h" + using std::cout; using std::endl; +using lumiera::Appconfig; int main (int argc, char* argv[]) { - cout << "*** Cinelerra NLE for Linux ***" << endl - << " hello SCONS build system" << endl; + cout << "*** Lumiera NLE for Linux ***" << endl + << " Version: " << Appconfig::get("version") << endl; return 0; } - diff --git a/src/nobugcfg.h b/src/nobugcfg.h index 7907d50a1..916f28663 100644 --- a/src/nobugcfg.h +++ b/src/nobugcfg.h @@ -2,8 +2,8 @@ NOBUGCFG.h - global configuration and definitions for NoBug - Copyright (C) CinelerraCV - 2007, Christian Thaeter + Copyright (C) Lumiera.org + 2008, Christian Thaeter Hermann Vosseler This program is free software; you can redistribute it and/or @@ -27,7 +27,7 @@ ** The idea is that configuration and some globally used flag ** declarations are to be kept in one central location. Normally, ** this header will be included by appconfig.hpp, which in turn gets - ** included by cinelerra.h + ** included by lumiera.h ** @par Besides the usual guarded declarations, this header contains ** one section with the corresponding definitions. This section ** is to be called by appconfig.cpp only, which deals with application diff --git a/src/plugin/helloplugin.c b/src/plugin/helloplugin.c index 62a033f4e..d75f55f94 100644 --- a/src/plugin/helloplugin.c +++ b/src/plugin/helloplugin.c @@ -1,12 +1,12 @@ /* * hello.c - demonstrates how to build a standalone tool (C source) - * integrated into the SCons based build system of Cinelerra + * integrated into the SCons based build system of Lumiera */ #include int main(int argc, char* argv[]) { - printf("hello cinelerra world"); + printf("hello lumiera world"); return 0; } diff --git a/src/tool/DIR_INFO b/src/tool/DIR_INFO index 76e84db53..c8933be3e 100644 --- a/src/tool/DIR_INFO +++ b/src/tool/DIR_INFO @@ -1 +1 @@ -source code of supplementary tools to be built alongside with Cinelerra +source code of supplementary tools to be built alongside with Lumiera diff --git a/src/tool/SConscript b/src/tool/SConscript index fe3a35dcc..738483498 100644 --- a/src/tool/SConscript +++ b/src/tool/SConscript @@ -5,10 +5,6 @@ Import('env','artifacts') -# at the moment (8/07), Ichthyo tries to find out how to configure NoBug -# does it help, if we set the NOBUG_LOG to the environment used for building?? -env = env.Clone() -env['ENV']['NOBUG_LOG'] = 'ttt:WARNING' # build the ubiquitous Hello World application (note: C source) artifacts['tools'] = [ env.Program('#$BINDIR/hello-world','hello.c') diff --git a/src/tool/hello.c b/src/tool/hello.c index 62a033f4e..d75f55f94 100644 --- a/src/tool/hello.c +++ b/src/tool/hello.c @@ -1,12 +1,12 @@ /* * hello.c - demonstrates how to build a standalone tool (C source) - * integrated into the SCons based build system of Cinelerra + * integrated into the SCons based build system of Lumiera */ #include int main(int argc, char* argv[]) { - printf("hello cinelerra world"); + printf("hello lumiera world"); return 0; } diff --git a/tests/test.sh b/tests/test.sh index 1e4256eb2..b692b3959 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) CinelerraCV +# Copyright (C) Lumiera.org # 2007, Christian Thaeter # Hermann Vosseler # From bfa4b2bc70d49405f8da98a67ef409f1f0a287df Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 11 Jul 2008 05:01:56 +0200 Subject: [PATCH 2/4] (irrelevant) adjustments to make the SCons build of the nonexistant source happen --- SConstruct | 1 - src/main.cpp | 10 ++-------- src/proc/lumiera.hpp | 5 +---- src/proc/nobugcfg.hpp | 4 +--- tests/00test.tests | 11 +++++++++++ tests/SConscript | 8 ++++---- tests/bugs/buggy.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 59 insertions(+), 20 deletions(-) create mode 100644 tests/bugs/buggy.cpp diff --git a/SConstruct b/SConstruct index cef5ebda0..b76e0101e 100644 --- a/SConstruct +++ b/SConstruct @@ -247,7 +247,6 @@ def defineBuildTargets(env, artifacts): # use PCH to speed up building precomp = ( env.PrecompiledHeader('$SRCDIR/pre') - + env.PrecompiledHeader('$SRCDIR/pre_a') ) env.Depends(objproc, precomp) env.Depends(objlib, precomp) diff --git a/src/main.cpp b/src/main.cpp index 0e04ef89f..ffa3957f9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,21 +26,15 @@ #include "proc/lumiera.hpp" using std::cout; -using std::endl; -using lumiera::Appconfig; -using lumiera::ON_GLOBAL_INIT; -using lumiera::ON_GLOBAL_SHUTDOWN; int main (int argc, char* argv[]) { - cout << "*** Lumiera NLE for Linux ***" << endl - << " Version: " << Appconfig::get("version") << "\n"; + cout << "*** Lumiera NLE for Linux ***" << "\n" + << " Version: quasi niente" << "\n"; - Appconfig::lifecycle (ON_GLOBAL_INIT); // great things are happening here.... - Appconfig::lifecycle (ON_GLOBAL_SHUTDOWN); return 0; } diff --git a/src/proc/lumiera.hpp b/src/proc/lumiera.hpp index b56ab69b6..f67ec719b 100644 --- a/src/proc/lumiera.hpp +++ b/src/proc/lumiera.hpp @@ -30,10 +30,7 @@ /* common types frequently used... */ -#include "common/util.hpp" -#include "common/time.hpp" -#include "common/error.hpp" ///< pulls in NoBug via nobugcfg.hpp -#include "lib/appconfig.hpp" +#include "proc/nobugcfg.hpp" namespace lumiera diff --git a/src/proc/nobugcfg.hpp b/src/proc/nobugcfg.hpp index 567838320..aa9411471 100644 --- a/src/proc/nobugcfg.hpp +++ b/src/proc/nobugcfg.hpp @@ -45,8 +45,6 @@ #include #include -#include "lib/appconfig.hpp" -#include "common/error.hpp" ///< make assertions throw instead of abort() /* declare flags used throughout the code base... */ @@ -61,7 +59,7 @@ namespace lumiera { void initialize_NoBug (); namespace { - LifecycleHook schedule_ (ON_BASIC_INIT, &initialize_NoBug); +// LifecycleHook schedule_ (ON_BASIC_INIT, &initialize_NoBug); } } #endif /*NOBUGCFG_H ======= (End) Part 1: DECLARATIONS ======== */ diff --git a/tests/00test.tests b/tests/00test.tests index 4d8781629..60b4b26d1 100644 --- a/tests/00test.tests +++ b/tests/00test.tests @@ -11,3 +11,14 @@ err: /bin/cat: ,nonexistent_file: No such file or directory return: 1 END + +TESTING "Run the Dummy Test Executable" ./test-bugs + +TEST "I am a dummy test" < + Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + + +#include + +#include "proc/lumiera.hpp" + +using std::cout; + + +int main (int argc, char* argv[]) +{ + cout << "*** Lumiera NLE for Linux ***" << "\n" + << " This is a dummy test" << "\n"; + + + // great things are happening here.... + + return 2; +} From 50f8be0e161d7b6fe839692ee2801590305da19d Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 11 Jul 2008 05:20:22 +0200 Subject: [PATCH 3/4] merge after integrating backend/library work --- SConstruct | 3 ++- admin/vgsuppression.c | 1 - tests/00test.tests | 1 + tests/SConscript | 6 ++++- tests/test.h | 52 +++++++++++++++++++++++++++++++++++++++++++ tests/test.sh | 3 +-- 6 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 tests/test.h diff --git a/SConstruct b/SConstruct index b76e0101e..8434b0a98 100644 --- a/SConstruct +++ b/SConstruct @@ -33,7 +33,7 @@ CUSTOPTIONSFILE = 'custom-options' SRCDIR = 'src' BINDIR = 'bin' TESTDIR = 'tests' -VERSION = '3+alpha.01' +VERSION = '0.1+pre.01' #-----------------------------------Configuration # NOTE: scons -h for help. @@ -68,6 +68,7 @@ def setupBasicEnvironment(): RegisterPrecompiledHeader_Builder(env) handleNoBugSwitches(env) + env.Append(CPPDEFINES = '_GNU_SOURCE') appendCppDefine(env,'DEBUG','DEBUG', 'NDEBUG') appendCppDefine(env,'OPENGL','USE_OPENGL') appendVal(env,'ARCHFLAGS', 'CCFLAGS') # for both C and C++ diff --git a/admin/vgsuppression.c b/admin/vgsuppression.c index 0e1f41fca..cad026e52 100644 --- a/admin/vgsuppression.c +++ b/admin/vgsuppression.c @@ -18,7 +18,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define _GNU_SOURCE /* just place any problematic calls where valgrind whines about in main (with comments please) diff --git a/tests/00test.tests b/tests/00test.tests index 60b4b26d1..d1205b8c1 100644 --- a/tests/00test.tests +++ b/tests/00test.tests @@ -22,3 +22,4 @@ END PLANNED "this may never happen" END + diff --git a/tests/SConscript b/tests/SConscript index 44d34e047..5a7c0145d 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -9,6 +9,10 @@ from Buildhelper import globRootdirs Import('env','artifacts','core') +# temp fix to add test.h -- wouldn't it be better to put this header be into src/lib ? +env = env.Clone() +env.Append(CPPPATH='#/.') # add Rootdir to Includepath, so test/test.h is found +# temp fix------------- def testExecutable(env,tree, exeName=None, obj=None): """ declare all targets needed to create a standalone @@ -52,7 +56,7 @@ def treatPluginTestcase(env): moduledirs = globRootdirs('*') # but have to treat some subdirs individually. -specials = ['plugin','locking','library'] +specials = ['plugin','locking','library','backend'] diff --git a/tests/test.h b/tests/test.h new file mode 100644 index 000000000..d25fa0a59 --- /dev/null +++ b/tests/test.h @@ -0,0 +1,52 @@ +/* + test.h - macros for running tests + + Copyright (C) CinelerraCV + 2008, Christian Thaeter + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef TEST_H +#define TEST_H + +#include + +#include "lib/error.h" + +LUMIERA_ERROR_DEFINE (TEST, "test error"); + +#define TESTS_BEGIN \ +int \ +main (int argc, char** argv) \ +{ \ + NOBUG_INIT; \ + \ + if (argc == 1) \ + return 1; + +#define TEST(name) \ + else if (!strcmp(argv[1], name)) + + +#define TESTS_END \ + else \ + return 1; \ + \ + return 0; \ +} + + +#endif diff --git a/tests/test.sh b/tests/test.sh index 77bac66bf..d919ed073 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -1,7 +1,6 @@ #!/bin/bash # Copyright (C) Lumiera.org -# 2007, Christian Thaeter -# Hermann Vosseler +# 2007 - 2008, Christian Thaeter # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as From 7a6b987a5032fb2c96c1b2182212e1ead79cf175 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 11 Jul 2008 05:35:48 +0200 Subject: [PATCH 4/4] merge after integrating the GUI draft; now using multiple build environments and check via pkg-config --- .gitignore | 2 +- SConstruct | 86 ++++++++++++---- admin/scons/Buildhelper.py | 16 ++- admin/scons/LumieraEnvironment.py | 97 ++++++++++++++++++ src/gui/lumiera_ui.rc | 157 ++++++++++++++++++++++++++++++ 5 files changed, 334 insertions(+), 24 deletions(-) create mode 100644 admin/scons/LumieraEnvironment.py create mode 100644 src/gui/lumiera_ui.rc diff --git a/.gitignore b/.gitignore index 5dc912d9e..10dbaee23 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ *.os *.gch ,valgrind.log* -Buildhelper.pyc +admin/scons/*.pyc optcache Makefile.in build/* diff --git a/SConstruct b/SConstruct index 8434b0a98..173803853 100644 --- a/SConstruct +++ b/SConstruct @@ -26,6 +26,8 @@ sys.path.append("./admin/scons") import os from Buildhelper import * +from LumieraEnvironment import * + #-----------------------------------Configuration OPTIONSCACHEFILE = 'optcache' @@ -33,6 +35,7 @@ CUSTOPTIONSFILE = 'custom-options' SRCDIR = 'src' BINDIR = 'bin' TESTDIR = 'tests' +ICONDIR = 'icons' VERSION = '0.1+pre.01' #-----------------------------------Configuration @@ -53,13 +56,13 @@ def setupBasicEnvironment(): EnsureSConsVersion(0,96,90) opts = defineCmdlineOptions() - - env = Environment(options=opts) - + env = LumieraEnvironment(options=opts) + env.Append ( CCCOM=' -std=gnu99') # workaround for a bug: CCCOM currently doesn't honor CFLAGS, only CCFLAGS 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 @@ -74,7 +77,7 @@ def setupBasicEnvironment(): appendVal(env,'ARCHFLAGS', 'CCFLAGS') # for both C and C++ appendVal(env,'OPTIMIZE', 'CCFLAGS', val=' -O3') appendVal(env,'DEBUG', 'CCFLAGS', val=' -ggdb') - + prepareOptionsHelp(opts,env) opts.Save(OPTIONSCACHEFILE, env) return env @@ -127,7 +130,7 @@ def defineCmdlineOptions(): ,PathOption('SRCTAR', 'Create source tarball prior to compiling', '..', PathOption.PathAccept) ,PathOption('DOCTAR', 'Create tarball with dev documentaionl', '..', PathOption.PathAccept) ) - + return opts @@ -161,38 +164,42 @@ def configurePlatform(env): setup platform specific options. Abort build in case of failure. """ - conf = Configure(env) - # run all configuration checks in the current env + conf = env.Configure() + # run all configuration checks in the given env + + # Perform checks for prerequisites -------------------------------------------- + if not conf.TryAction('pkg-config --version > $TARGET')[0]: + print 'We need pkg-config for including library configurations, exiting.' + Exit(1) - # Checks for prerequisites ------------ if not conf.CheckLibWithHeader('m', 'math.h','C'): print 'Did not find math.h / libm, exiting.' Exit(1) - + if not conf.CheckLibWithHeader('dl', 'dlfcn.h', 'C'): print 'Functions for runtime dynamic loading not available, exiting.' Exit(1) - + if not conf.CheckLibWithHeader('nobugmt', 'nobug.h', 'C'): print 'Did not find NoBug [http://www.pipapo.org/pipawiki/NoBug], exiting.' Exit(1) - + if not conf.CheckLibWithHeader('pthread', 'pthread.h', 'C'): print 'Did not find the pthread lib or pthread.h, exiting.' else: conf.env.Append(CPPFLAGS = ' -DHAVE_PTHREAD') conf.env.Append(CCFLAGS = ' -pthread') - + if conf.CheckCHeader('execinfo.h'): conf.env.Append(CPPFLAGS = ' -DHAS_EXECINFO_H') - + if conf.CheckCHeader('valgrind/valgrind.h'): conf.env.Append(CPPFLAGS = ' -DHAS_VALGRIND_VALGIND_H') if not conf.CheckCXXHeader('tr1/memory'): print 'We rely on the std::tr1 proposed standard extension for shared_ptr.' Exit(1) - + if not conf.CheckCXXHeader('boost/config.hpp'): print 'We need the C++ boost-lib.' Exit(1) @@ -206,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() @@ -221,7 +256,7 @@ def definePackagingTargets(env, artifacts): artifacts['src.tar'] = t env.Alias('src.tar', t) env.Alias('tar', t) - + t = Tarball(env,location='$DOCTAR',suffix='-doc',dirs='admin doc wiki uml tests') artifacts['doc.tar'] = t env.Alias('doc.tar', t) @@ -240,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) @@ -253,7 +288,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') @@ -269,13 +313,13 @@ 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' env.Clean ('build', [ 'scache.conf', '.sconf_temp', '.sconsign.dblite', 'config.log' ]) env.Clean ('build', [ '$SRCDIR/pre.gch' ]) - + # Doxygen documentation # Note: at the moment we only depend on Doxyfile # obviousely, we should depend on all sourcefiles diff --git a/admin/scons/Buildhelper.py b/admin/scons/Buildhelper.py index ae3f5fb1f..02f17b2b4 100644 --- a/admin/scons/Buildhelper.py +++ b/admin/scons/Buildhelper.py @@ -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 @@ -111,7 +123,7 @@ def RegisterPrecompiledHeader_Builder(env): def Tarball(env,location,dirs,suffix=''): """ Custom Command: create Tarball of some subdirs - location: where to create the tar (optionally incl. filename.tar.gz) + location: where to create the tar (may optionally include filename.tar.gz) suffix: (optional) suffix to include in the tar name dirs: directories to include in the tar @@ -132,7 +144,7 @@ def Tarball(env,location,dirs,suffix=''): def createTarball(target,source,env): - """ helper, builds the tar using the python2.3 tarfil lib. + """ helper, builds the tar using the python2.3 tarfile lib. This allows us to prefix all paths, thus moving the tree into a virtual subdirectory containing the Version number, as needed by common packaging systems. diff --git a/admin/scons/LumieraEnvironment.py b/admin/scons/LumieraEnvironment.py new file mode 100644 index 000000000..82d419a65 --- /dev/null +++ b/admin/scons/LumieraEnvironment.py @@ -0,0 +1,97 @@ +# -*- python -*- +## +## LumieraEnvironment.py - custom SCons Environment +## + +# Copyright (C) Lumiera.org +# 2008, Hermann Vosseler +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +##################################################################### + + +from SCons.SConf import SConf +from SCons.Environment import Environment + +from Buildhelper import * + + + +class LumieraEnvironment(Environment): + """ Custom SCons build environment for Lumiera + This allows us to carry structured config data without + using global vars. Idea inspired by Ardour. + """ + def __init__(self,*args,**kw): + Environment.__init__ (self,*args,**kw) + self.libInfo = {} + + def Configure (self, *args, **kw): + kw['env'] = self + return apply(LumieraConfigContext, args, kw) + + def mergeConf (self,other): + """ extract the library/compiler flags from other Environment. + Optionally accepts a list or just sting(s) representing keys + in our own libInfo Dictionary + """ + if isinstance(other, list): + for elm in other: + self.mergeConf(elm) + elif isinstance(other, str): + 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): + """ 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. + """ + minVersion = str(minVersion) + if 0 != os.system('pkg-config --print-errors --exists "%s >= %s"' % (libID,minVersion)): + print "Problems configuring the Library %s (>= %s)" % (libID,minVersion) + return False + + 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): + """ Extends the SCons Configure context with some convenience methods + """ + def __init__(self, *args,**kw): + SConf.__init__(self,*args,**kw) + + def CheckPkgConfig (self, libID, minVersion=0): + print "Checking for library configuration: %s " % libID + # self.Message(self,"Checking for library configuration: %s " % libID) + return self.env.addLibInfo (libID, minVersion) + + diff --git a/src/gui/lumiera_ui.rc b/src/gui/lumiera_ui.rc new file mode 100644 index 000000000..428b7bed4 --- /dev/null +++ b/src/gui/lumiera_ui.rc @@ -0,0 +1,157 @@ +# +# This is the GTK style file for Lumiera +# +# + +#---------- Styles for Standard Widgets ----------# + +style "medium_text" +{ + font_name = "sans 10" +} + +style "medium_bold_entry" = "medium_text" +{ + fg[NORMAL] = { 0.70, 0.70, 0.70 } + fg[ACTIVE] = { 0.70, 0.70, 0.70 } + + bg[NORMAL] = { 0.35, 0.35, 0.40 } + + base[NORMAL] = { 0, 0, 0 } + base[ACTIVE] = { 0, 0, 0 } + base[SELECTED] = { 0, 0, 0 } +} + +style "default_base" = "medium_text" +{ + GtkWidget::cursor_color = {1.0, 1.0, 1.0 } + GtkButton::default_border = { 0, 0, 0, 0 } + GtkButton::default_outside_border = { 0, 0, 0, 0 } + GtkTreeView::vertical-padding = 0 + GtkTreeView::horizontal-padding = 0 + GtkTreeView::even-row-color = { 0, 0, 0 } + GtkTreeView::odd-row-color = { 0, 0, 0 } + + fg[NORMAL] = { 0.80, 0.80, 0.80 } + fg[ACTIVE] = { 0.80, 0.80, 0.80 } + fg[PRELIGHT] = { 1.0, 1.0, 1.0 } + fg[INSENSITIVE] = { 0.80, 0.80, 0.80 } + fg[SELECTED] = { 0.80, 0.80, 0.80 } + + bg[NORMAL] = { 0.35, 0.35, 0.40 } + bg[ACTIVE] = { 0.35, 0.35, 0.40 } + bg[PRELIGHT] = "#565690" + bg[INSENSITIVE] = { 0.10, 0.10, 0.10 } + bg[SELECTED] = { 0, 0.40, 0.60 } + + text[NORMAL] = { 0.80, 0.80, 0.80 } + text[ACTIVE] = { 0.80, 0.80, 0.80 } + text[PRELIGHT] = { 0.80, 0.80, 0.80 } + text[INSENSITIVE] = { 0.80, 0.80, 0.80} + text[SELECTED] = { 1.0, 1.0, 1.0 } + + base[ACTIVE] = "#272a2f" + base[NORMAL] = "#1a1e20" + base[PRELIGHT] = { 0.20, 0.20, 0.20 } + base[INSENSITIVE] = "#4c5159" + base[SELECTED] = { 0.25, 0.25, 0.25 } + + engine "clearlooks" + { + menubarstyle = 2 # 0 = flat, 1 = sunken, 2 = flat gradient +# menuitemstyle = 1 # 0 = flat, 1 = 3d-ish (gradient), 2 = 3d-ish (button) +# listviewitemstyle = 1 # 0 = flat, 1 = 3d-ish (gradient) +# progressbarstyle = 1 # 0 = candy bar, 1 = fancy candy bar, 2 = flat + } +} + +style "default_buttons_menus" +{ + font_name = "sans 10" + fg[ACTIVE] = { 1.0, 1.0, 1.0 } + + bg[NORMAL] = { 0.30, 0.30, 0.35 } + bg[ACTIVE] = "#565690" + bg[PRELIGHT] = { 0.15, 0.15, 0.20 } + bg[INSENSITIVE] = { 0.15, 0.15, 0.20 } + bg[SELECTED] = { 0.15, 0.15, 0.20 } +} + +style "lumiera_adjusters" = "default_buttons_menus" +{ + fg[NORMAL] = { 0.80, 0.80, 0.80 } + fg[ACTIVE] = { 0.80, 0.80, 0.80 } + fg[PRELIGHT] = { 1.0, 1.0, 1.0 } + fg[INSENSITIVE] = { 0.80, 0.80, 0.80 } + fg[SELECTED] = { 0.80, 0.80, 0.80 } + + bg[NORMAL] = { 0.35, 0.35, 0.40 } + bg[ACTIVE] = { 0.35, 0.35, 0.40 } + bg[PRELIGHT] = "#565690" + bg[INSENSITIVE] = { 0.10, 0.10, 0.10 } + bg[SELECTED] = { 0, 0.40, 0.60 } +} + +style "lumiera_progressbars" = "default_buttons_menus" +{ + bg[NORMAL] = { 0, 0, 0 } + bg[PRELIGHT] = { 0.00, 0.36, 0.40 } +} + +style "lumiera_button" = "default_buttons_menus" +{ + xthickness = 1 + ythickness = 1 +} + +style "tearoff_arrow" = "medium_bold_entry" +{ + fg[NORMAL] = { 0.80, 0.80, 0.80 } + fg[PRELIGHT] = { 0.80, 0.80, 0.80 } + bg[NORMAL] = { 0.80, 0.80, 0.80 } + bg[PRELIGHT] = { 0.80, 0.80, 0.80 } +} + +class "GtkWidget" style:highest "default_base" +class "GtkScrollbar" style:highest "lumiera_adjusters" +class "GtkLabel" style:highest "default_buttons_menus" +class "GtkButton" style:highest "lumiera_button" +class "GtkArrow" style:highest "tearoff_arrow" +class "GtkProgressBar" style:highest "lumiera_progressbars" + +#---------- Styles for Lumiera Widgets ----------# + +style "timeline_body" +{ + gtkmm__CustomObject_TimelineBody::background = "#7E838B" +} + +style "timeline_ruler" = "default_base" +{ + font_name = "sans 8" + gtkmm__CustomObject_TimelineRuler::height = 18 + gtkmm__CustomObject_TimelineRuler::major_tick_height = 18 + gtkmm__CustomObject_TimelineRuler::minor_long_tick_height = 6 + gtkmm__CustomObject_TimelineRuler::minor_short_tick_height = 3 + gtkmm__CustomObject_TimelineRuler::annotation_horz_margin = 3 + gtkmm__CustomObject_TimelineRuler::annotation_vert_margin = 0 + gtkmm__CustomObject_TimelineRuler::min_division_width = 100 + gtkmm__CustomObject_TimelineRuler::mouse_chevron_size = 5 +} + +style "timeline_header_base" = "default_base" +{ +# fg[NORMAL] = { 0.77, 0.77, 0.72 } +# bg[NORMAL] = { 0.18, 0.19, 0.22 } +# bg[ACTIVE] = { 0.20, 0.20, 0.20 } +# bg[PRELIGHT] = { 0.20, 0.20, 0.20 } +# bg[INSENSITIVE] = { 0.20, 0.20, 0.20 } +# bg[SELECTED] = { 0.20, 0.20, 0.20 } +} + +class "gtkmm__CustomObject_TimelineBody" style:highest "timeline_body" +class "gtkmm__CustomObject_TimelineRuler" style:highest "timeline_ruler" + +widget "*TimelineHeaderBaseUnselected" style:highest "timeline_header_base" + +