diff --git a/.gitignore b/.gitignore index 13ccda24c..ed690f89c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,9 @@ /wiki/backups/* *~ -a.out -semantic.cache -aclocal.m4 -Makefile -Makefile.in -autom4te* -config.* -configure *.tar.* -build/* +.sconf_temp +.sconf_temp/* +.sconsign.dblite +Buildhelper.pyc +optcache + diff --git a/Buildhelper.py b/Buildhelper.py index d4c1a3a52..282fdb6dc 100644 --- a/Buildhelper.py +++ b/Buildhelper.py @@ -2,7 +2,6 @@ ## ## Buildhelper.py - helpers, custom builders, for SConstruct ## -from fnmatch import fnmatch # Copyright (C) CinelerraCV # 2007, Hermann Vosseler @@ -29,6 +28,7 @@ import re import tarfile + # # Common Helper Functions # @@ -136,7 +136,7 @@ def getTarName(location, defaultName): if not os.path.isdir(head): print 'Target dir "%s" for Tar doesn\'t exist.' % head Exit(1) - mat = re.match(r'([\w\.\-])\.((tar)|(tar\.gz)|(tgz))', tail) + mat = re.match(r'([\w\.\-\+:\~]+)\.((tar)|(tar\.gz)|(tgz))', tail) if mat: name = mat.group(1) ext = '.'+mat.group(2) diff --git a/SConstruct b/SConstruct index a9609ce49..f5447b317 100644 --- a/SConstruct +++ b/SConstruct @@ -22,7 +22,6 @@ ##################################################################### import os - from Buildhelper import * #-----------------------------------Configuration @@ -30,9 +29,13 @@ OPTIONSCACHEFILE = 'optcache' CUSTOPTIONSFILE = 'custom-options' SRCDIR = 'src' BINDIR = 'src/bin' -VERSION = '3.alpha.1' +VERSION = '3+alpha.01' #-----------------------------------Configuration +# NOTE: scons -h for help. +# Read more about the SCons build system at: http://www.scons.org +# Basically, this script just /defines/ the components and how they +# fit together. SCons will derive the necessary build steps. @@ -42,6 +45,9 @@ VERSION = '3.alpha.1' def setupBasicEnvironment(): ''' define cmdline options, build type decisions ''' + EnsurePythonVersion(2,3) + EnsureSConsVersion(0,96,90) + opts = defineCmdlineOptions() env = Environment(options=opts) @@ -61,11 +67,11 @@ def setupBasicEnvironment(): def appendCppDefine(env,var,cppVar): if env[var]: - env.Append(CPPDEFINES={cppVar: env[var]}) + env.Append(CPPDEFINES = {cppVar: env[var]}) def appendVal(env,var,targetVar,val=None): if env[var]: - env.Append(**{targetVar: val or env[var]}) + env.Append( **{targetVar: val or env[var]}) @@ -156,7 +162,8 @@ def definePackagingTargets(env, artifacts): def defineBuildTargets(env, artifacts): ''' define the source file/dirs comprising each artifact to be built. - setup sub-environments with special build options if necessary + setup sub-environments with special build options if necessary. + We use a custom function to declare a whole tree of srcfiles. ''' cinobj = ( srcSubtree(env,'backend') + srcSubtree(env,'proc') @@ -167,7 +174,7 @@ def defineBuildTargets(env, artifacts): artifacts['cinelerra'] = env.Program('$BINDIR/cinelerra', cinobj) artifacts['plugins'] = env.SharedLibrary('$BINDIR/cinelerra-plugin', plugobj) - # call subdir SConscript(s) + # call subdir SConscript(s) for independent components SConscript(dirs=[SRCDIR+'/tool'], exports='env artifacts') @@ -197,8 +204,6 @@ def defineInstallTargets(env, artifacts): ### === MAIN === #################################################### -# NOTE: the following code /defines/ what and how to build -# it doesn't "do" the build. SCons will do the "doing" env = setupBasicEnvironment() diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 000000000..382a2e953 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,31 @@ +/* + main.cpp - start the Cinelerra Application + + Copyright (C) CinelerraCV + 2007, Christian Thaeter + 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 + +int main(int argc, char* argv[]) + { + printf("hello cinelerra again\n"); + return 0; + } diff --git a/src/plugin/helloplugin.c b/src/plugin/helloplugin.c new file mode 100644 index 000000000..62a033f4e --- /dev/null +++ b/src/plugin/helloplugin.c @@ -0,0 +1,12 @@ +/* + * hello.c - demonstrates how to build a standalone tool (C source) + * integrated into the SCons based build system of Cinelerra + */ + +#include + +int main(int argc, char* argv[]) + { + printf("hello cinelerra world"); + return 0; + }