From 6c113b54b3566966b5ab2b731a59fa39b79aacd2 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Sun, 29 Aug 2010 20:52:05 +0000 Subject: [PATCH] Finally change SConscript tabs to spaces. --- SConstruct | 640 ++++----- build_files/scons/tools/Blender.py | 1256 ++++++++--------- extern/SConscript | 4 +- extern/libopenjpeg/SConscript | 10 +- intern/audaspace/SConscript | 42 +- intern/ghost/SConscript | 74 +- source/SConscript | 10 +- source/blender/blenfont/SConscript | 4 +- source/blender/blenkernel/SConscript | 52 +- source/blender/blenpluginapi/SConscript | 4 +- source/blender/collada/SConscript | 6 +- source/blender/editors/SConscript | 70 +- source/blender/editors/interface/SConscript | 6 +- source/blender/editors/object/SConscript | 2 +- source/blender/editors/screen/SConscript | 6 +- .../blender/editors/sculpt_paint/SConscript | 4 +- .../blender/editors/space_console/SConscript | 22 +- source/blender/editors/space_file/SConscript | 4 +- source/blender/editors/space_image/SConscript | 8 +- source/blender/editors/space_logic/SConscript | 2 +- source/blender/editors/space_node/SConscript | 14 +- .../blender/editors/space_script/SConscript | 2 +- source/blender/editors/space_text/SConscript | 2 +- .../blender/editors/space_view3d/SConscript | 4 +- source/blender/imbuf/SConscript | 4 +- source/blender/imbuf/intern/dds/SConscript | 16 +- .../blender/imbuf/intern/openexr/SConscript | 14 +- source/blender/makesdna/intern/SConscript | 40 +- source/blender/makesrna/SConscript | 40 +- source/blender/makesrna/intern/SConscript | 94 +- source/blender/modifiers/SConscript | 2 +- source/blender/nodes/SConscript | 16 +- source/blender/python/SConscript | 4 +- source/blender/quicktime/SConscript | 30 +- source/blender/windowmanager/SConscript | 14 +- .../bad_level_call_stubs/SConscript | 2 +- source/creator/SConscript | 30 +- source/gameengine/BlenderRoutines/SConscript | 4 +- source/gameengine/Converter/SConscript | 10 +- source/gameengine/Expressions/SConscript | 4 +- source/gameengine/GameLogic/SConscript | 12 +- .../gameengine/GamePlayer/common/SConscript | 6 +- source/gameengine/GamePlayer/ghost/SConscript | 4 +- source/gameengine/Ketsji/KXNetwork/SConscript | 4 +- source/gameengine/Ketsji/SConscript | 14 +- source/gameengine/Physics/Bullet/SConscript | 4 +- source/gameengine/Rasterizer/SConscript | 4 +- source/gameengine/VideoTexture/SConscript | 8 +- source/icons/SConscript | 4 +- 49 files changed, 1316 insertions(+), 1316 deletions(-) diff --git a/SConstruct b/SConstruct index 811298cc851..11493511ffa 100644 --- a/SConstruct +++ b/SConstruct @@ -33,9 +33,9 @@ import platform as pltfrm # Need a better way to do this. Automagical maybe is not the best thing, maybe it is. if pltfrm.architecture()[0] == '64bit': - bitness = 64 + bitness = 64 else: - bitness = 32 + bitness = 32 import sys import os @@ -79,15 +79,15 @@ B.binarykind = ['blender' , 'blenderplayer'] # XX cheating for BF_FANCY, we check for BF_FANCY before args are validated use_color = ARGUMENTS.get('BF_FANCY', '1') if platform=='win32': - use_color = None + use_color = None if not use_color=='1': - B.bc.disable() - + B.bc.disable() + #on defaut white Os X terminal, some colors are totally unlegible if platform=='darwin': - B.bc.OKGREEN = '\033[34m' - B.bc.WARNING = '\033[36m' + B.bc.OKGREEN = '\033[34m' + B.bc.WARNING = '\033[36m' # arguments print B.bc.HEADER+'Command-line arguments'+B.bc.ENDC @@ -110,100 +110,100 @@ quickie = B.arguments.get('BF_QUICK', None) quickdebug = B.arguments.get('BF_QUICKDEBUG', None) if quickdebug: - B.quickdebug=string.split(quickdebug, ',') + B.quickdebug=string.split(quickdebug, ',') else: - B.quickdebug=[] + B.quickdebug=[] if quickie: - B.quickie=string.split(quickie,',') + B.quickie=string.split(quickie,',') else: - B.quickie=[] - + B.quickie=[] + toolset = B.arguments.get('BF_TOOLSET', None) if toolset: - print "Using " + toolset - if toolset=='mstoolkit': - env = BlenderEnvironment(ENV = os.environ) - env.Tool('mstoolkit', [toolpath]) - else: - env = BlenderEnvironment(tools=[toolset], ENV = os.environ) - # xxx commented out, as was supressing warnings under mingw.. - #if env: - # btools.SetupSpawn(env) + print "Using " + toolset + if toolset=='mstoolkit': + env = BlenderEnvironment(ENV = os.environ) + env.Tool('mstoolkit', [toolpath]) + else: + env = BlenderEnvironment(tools=[toolset], ENV = os.environ) + # xxx commented out, as was supressing warnings under mingw.. + #if env: + # btools.SetupSpawn(env) else: - if bitness==64 and platform=='win32': - env = BlenderEnvironment(ENV = os.environ, MSVS_ARCH='amd64') - else: - env = BlenderEnvironment(ENV = os.environ) + if bitness==64 and platform=='win32': + env = BlenderEnvironment(ENV = os.environ, MSVS_ARCH='amd64') + else: + env = BlenderEnvironment(ENV = os.environ) if not env: - print "Could not create a build environment" - Exit() + print "Could not create a build environment" + Exit() cc = B.arguments.get('CC', None) cxx = B.arguments.get('CXX', None) if cc: - env['CC'] = cc + env['CC'] = cc if cxx: - env['CXX'] = cxx + env['CXX'] = cxx if env['CC'] in ['cl', 'cl.exe'] and sys.platform=='win32': - if bitness == 64: - platform = 'win64-vc' - else: - platform = 'win32-vc' + if bitness == 64: + platform = 'win64-vc' + else: + platform = 'win32-vc' elif env['CC'] in ['gcc'] and sys.platform=='win32': - platform = 'win32-mingw' + platform = 'win32-mingw' env.SConscriptChdir(0) crossbuild = B.arguments.get('BF_CROSS', None) if crossbuild and platform not in ('win32-vc', 'win64-vc'): - platform = 'linuxcross' + platform = 'linuxcross' env['OURPLATFORM'] = platform configfile = os.path.join("build_files", "scons", "config", platform + "-config.py") if os.path.exists(configfile): - print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile + print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile else: - print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC + print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC if crossbuild and env['PLATFORM'] != 'win32': - print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC - env.Tool('crossmingw', [toolpath]) - # todo: determine proper libs/includes etc. - # Needed for gui programs, console programs should do without it + print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC + env.Tool('crossmingw', [toolpath]) + # todo: determine proper libs/includes etc. + # Needed for gui programs, console programs should do without it - # Now we don't need this option to have console window - # env.Append(LINKFLAGS=['-mwindows']) + # Now we don't need this option to have console window + # env.Append(LINKFLAGS=['-mwindows']) userconfig = B.arguments.get('BF_CONFIG', 'user-config.py') # first read platform config. B.arguments will override optfiles = [configfile] if os.path.exists(userconfig): - print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig - optfiles += [userconfig] + print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig + optfiles += [userconfig] else: - print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC + print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC opts = btools.read_opts(env, optfiles, B.arguments) opts.Update(env) if not env['BF_FANCY']: - B.bc.disable() + B.bc.disable() # remove install dir so old and new files are not mixed. # NOTE: only do the scripts directory for now, otherwise is too disruptive for developers # TODO: perhaps we need an option (off by default) to not do this altogether... if not env['WITHOUT_BF_INSTALL'] and not env['WITHOUT_BF_OVERWRITE_INSTALL']: - scriptsDir = os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts') - if os.path.isdir(scriptsDir): - print B.bc.OKGREEN + "Clearing installation directory%s: %s" % (B.bc.ENDC, os.path.abspath(scriptsDir)) - shutil.rmtree(scriptsDir) + scriptsDir = os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts') + if os.path.isdir(scriptsDir): + print B.bc.OKGREEN + "Clearing installation directory%s: %s" % (B.bc.ENDC, os.path.abspath(scriptsDir)) + shutil.rmtree(scriptsDir) SetOption('num_jobs', int(env['BF_NUMJOBS'])) @@ -211,158 +211,158 @@ print B.bc.OKGREEN + "Build with parallel jobs%s: %s" % (B.bc.ENDC, GetOption('n print B.bc.OKGREEN + "Build with debug symbols%s: %s" % (B.bc.ENDC, env['BF_DEBUG']) if 'blenderlite' in B.targets: - target_env_defs = {} - target_env_defs['WITH_BF_GAMEENGINE'] = False - target_env_defs['WITH_BF_OPENAL'] = False - target_env_defs['WITH_BF_OPENEXR'] = False - target_env_defs['WITH_BF_OPENMP'] = False - target_env_defs['WITH_BF_ICONV'] = False - target_env_defs['WITH_BF_INTERNATIONAL'] = False - target_env_defs['WITH_BF_OPENJPEG'] = False - target_env_defs['WITH_BF_FFMPEG'] = False - target_env_defs['WITH_BF_QUICKTIME'] = False - target_env_defs['WITH_BF_REDCODE'] = False - target_env_defs['WITH_BF_DDS'] = False - target_env_defs['WITH_BF_CINEON'] = False - target_env_defs['WITH_BF_HDR'] = False - target_env_defs['WITH_BF_ZLIB'] = False - target_env_defs['WITH_BF_SDL'] = False - target_env_defs['WITH_BF_JPEG'] = False - target_env_defs['WITH_BF_PNG'] = False - target_env_defs['WITH_BF_BULLET'] = False - target_env_defs['WITH_BF_BINRELOC'] = False - target_env_defs['BF_BUILDINFO'] = False - target_env_defs['BF_NO_ELBEEM'] = True - target_env_defs['WITH_BF_PYTHON'] = False - - # Merge blenderlite, let command line to override - for k,v in target_env_defs.iteritems(): - if k not in B.arguments: - env[k] = v + target_env_defs = {} + target_env_defs['WITH_BF_GAMEENGINE'] = False + target_env_defs['WITH_BF_OPENAL'] = False + target_env_defs['WITH_BF_OPENEXR'] = False + target_env_defs['WITH_BF_OPENMP'] = False + target_env_defs['WITH_BF_ICONV'] = False + target_env_defs['WITH_BF_INTERNATIONAL'] = False + target_env_defs['WITH_BF_OPENJPEG'] = False + target_env_defs['WITH_BF_FFMPEG'] = False + target_env_defs['WITH_BF_QUICKTIME'] = False + target_env_defs['WITH_BF_REDCODE'] = False + target_env_defs['WITH_BF_DDS'] = False + target_env_defs['WITH_BF_CINEON'] = False + target_env_defs['WITH_BF_HDR'] = False + target_env_defs['WITH_BF_ZLIB'] = False + target_env_defs['WITH_BF_SDL'] = False + target_env_defs['WITH_BF_JPEG'] = False + target_env_defs['WITH_BF_PNG'] = False + target_env_defs['WITH_BF_BULLET'] = False + target_env_defs['WITH_BF_BINRELOC'] = False + target_env_defs['BF_BUILDINFO'] = False + target_env_defs['BF_NO_ELBEEM'] = True + target_env_defs['WITH_BF_PYTHON'] = False + + # Merge blenderlite, let command line to override + for k,v in target_env_defs.iteritems(): + if k not in B.arguments: + env[k] = v if env['WITH_BF_OPENMP'] == 1: - if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): - env['CCFLAGS'].append('/openmp') - env['CPPFLAGS'].append('/openmp') - env['CXXFLAGS'].append('/openmp') - else: - if env['CC'].endswith('icc'): # to be able to handle CC=/opt/bla/icc case - env.Append(LINKFLAGS=['-openmp', '-static-intel']) - env['CCFLAGS'].append('-openmp') - env['CPPFLAGS'].append('-openmp') - env['CXXFLAGS'].append('-openmp') - else: - env.Append(CCFLAGS=['-fopenmp']) - env.Append(CPPFLAGS=['-fopenmp']) - env.Append(CXXFLAGS=['-fopenmp']) + if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): + env['CCFLAGS'].append('/openmp') + env['CPPFLAGS'].append('/openmp') + env['CXXFLAGS'].append('/openmp') + else: + if env['CC'].endswith('icc'): # to be able to handle CC=/opt/bla/icc case + env.Append(LINKFLAGS=['-openmp', '-static-intel']) + env['CCFLAGS'].append('-openmp') + env['CPPFLAGS'].append('-openmp') + env['CXXFLAGS'].append('-openmp') + else: + env.Append(CCFLAGS=['-fopenmp']) + env.Append(CPPFLAGS=['-fopenmp']) + env.Append(CXXFLAGS=['-fopenmp']) if env['WITH_GHOST_COCOA'] == True: - env.Append(CFLAGS=['-DGHOST_COCOA']) - env.Append(CXXFLAGS=['-DGHOST_COCOA']) - env.Append(CPPFLAGS=['-DGHOST_COCOA']) + env.Append(CFLAGS=['-DGHOST_COCOA']) + env.Append(CXXFLAGS=['-DGHOST_COCOA']) + env.Append(CPPFLAGS=['-DGHOST_COCOA']) if env['USE_QTKIT'] == True: - env.Append(CFLAGS=['-DUSE_QTKIT']) - env.Append(CXXFLAGS=['-DUSE_QTKIT']) - env.Append(CPPFLAGS=['-DUSE_QTKIT']) + env.Append(CFLAGS=['-DUSE_QTKIT']) + env.Append(CXXFLAGS=['-DUSE_QTKIT']) + env.Append(CPPFLAGS=['-DUSE_QTKIT']) #check for additional debug libnames if env.has_key('BF_DEBUG_LIBS'): - B.quickdebug += env['BF_DEBUG_LIBS'] + B.quickdebug += env['BF_DEBUG_LIBS'] printdebug = B.arguments.get('BF_LISTDEBUG', 0) if len(B.quickdebug) > 0 and printdebug != 0: - print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC - for l in B.quickdebug: - print "\t" + l + print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC + for l in B.quickdebug: + print "\t" + l # remove stdc++ from LLIBS if we are building a statc linked CXXFLAGS if env['WITH_BF_STATICCXX']: - if 'stdc++' in env['LLIBS']: - env['LLIBS'].remove('stdc++') - else: - print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform' + if 'stdc++' in env['LLIBS']: + env['LLIBS'].remove('stdc++') + else: + print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform' # check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline if 'blenderplayer' in B.targets: - env['WITH_BF_PLAYER'] = True + env['WITH_BF_PLAYER'] = True if 'blendernogame' in B.targets: - env['WITH_BF_GAMEENGINE'] = False + env['WITH_BF_GAMEENGINE'] = False # disable elbeem (fluidsim) compilation? if env['BF_NO_ELBEEM'] == 1: - env['CPPFLAGS'].append('-DDISABLE_ELBEEM') - env['CXXFLAGS'].append('-DDISABLE_ELBEEM') - env['CCFLAGS'].append('-DDISABLE_ELBEEM') + env['CPPFLAGS'].append('-DDISABLE_ELBEEM') + env['CXXFLAGS'].append('-DDISABLE_ELBEEM') + env['CCFLAGS'].append('-DDISABLE_ELBEEM') if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming', 'win64-vc'): - env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup') - env['PLATFORM_LINKFLAGS'].append('/ENTRY:main') + env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup') + env['PLATFORM_LINKFLAGS'].append('/ENTRY:main') # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir B.root_build_dir = env['BF_BUILDDIR'] B.doc_build_dir = os.path.join(env['BF_INSTALLDIR'], 'doc') if not B.root_build_dir[-1]==os.sep: - B.root_build_dir += os.sep + B.root_build_dir += os.sep if not B.doc_build_dir[-1]==os.sep: - B.doc_build_dir += os.sep - + B.doc_build_dir += os.sep + # We do a shortcut for clean when no quicklist is given: just delete # builddir without reading in SConscripts do_clean = None if 'clean' in B.targets: - do_clean = True + do_clean = True if not quickie and do_clean: - if os.path.exists(B.doc_build_dir): - print B.bc.HEADER+'Cleaning doc dir...'+B.bc.ENDC - dirs = os.listdir(B.doc_build_dir) - for entry in dirs: - if os.path.isdir(B.doc_build_dir + entry) == 1: - print "clean dir %s"%(B.doc_build_dir+entry) - shutil.rmtree(B.doc_build_dir+entry) - else: # remove file - print "remove file %s"%(B.doc_build_dir+entry) - os.remove(B.root_build_dir+entry) - if os.path.exists(B.root_build_dir): - print B.bc.HEADER+'Cleaning build dir...'+B.bc.ENDC - dirs = os.listdir(B.root_build_dir) - for entry in dirs: - if os.path.isdir(B.root_build_dir + entry) == 1: - print "clean dir %s"%(B.root_build_dir+entry) - shutil.rmtree(B.root_build_dir+entry) - else: # remove file - print "remove file %s"%(B.root_build_dir+entry) - os.remove(B.root_build_dir+entry) - for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak', - 'extern/xvidcore/build/generic/platform.inc', 'extern/ffmpeg/include']: - if os.path.exists(confile): - print "clean file %s"%confile - if os.path.isdir(confile): - for root, dirs, files in os.walk(confile): - for name in files: - os.remove(os.path.join(root, name)) - else: - os.remove(confile) - print B.bc.OKGREEN+'...done'+B.bc.ENDC - else: - print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC - Exit() + if os.path.exists(B.doc_build_dir): + print B.bc.HEADER+'Cleaning doc dir...'+B.bc.ENDC + dirs = os.listdir(B.doc_build_dir) + for entry in dirs: + if os.path.isdir(B.doc_build_dir + entry) == 1: + print "clean dir %s"%(B.doc_build_dir+entry) + shutil.rmtree(B.doc_build_dir+entry) + else: # remove file + print "remove file %s"%(B.doc_build_dir+entry) + os.remove(B.root_build_dir+entry) + if os.path.exists(B.root_build_dir): + print B.bc.HEADER+'Cleaning build dir...'+B.bc.ENDC + dirs = os.listdir(B.root_build_dir) + for entry in dirs: + if os.path.isdir(B.root_build_dir + entry) == 1: + print "clean dir %s"%(B.root_build_dir+entry) + shutil.rmtree(B.root_build_dir+entry) + else: # remove file + print "remove file %s"%(B.root_build_dir+entry) + os.remove(B.root_build_dir+entry) + for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak', + 'extern/xvidcore/build/generic/platform.inc', 'extern/ffmpeg/include']: + if os.path.exists(confile): + print "clean file %s"%confile + if os.path.isdir(confile): + for root, dirs, files in os.walk(confile): + for name in files: + os.remove(os.path.join(root, name)) + else: + os.remove(confile) + print B.bc.OKGREEN+'...done'+B.bc.ENDC + else: + print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC + Exit() if not os.path.isdir ( B.root_build_dir): - os.makedirs ( B.root_build_dir ) - os.makedirs ( B.root_build_dir + 'source' ) - os.makedirs ( B.root_build_dir + 'intern' ) - os.makedirs ( B.root_build_dir + 'extern' ) - os.makedirs ( B.root_build_dir + 'lib' ) - os.makedirs ( B.root_build_dir + 'bin' ) + os.makedirs ( B.root_build_dir ) + os.makedirs ( B.root_build_dir + 'source' ) + os.makedirs ( B.root_build_dir + 'intern' ) + os.makedirs ( B.root_build_dir + 'extern' ) + os.makedirs ( B.root_build_dir + 'lib' ) + os.makedirs ( B.root_build_dir + 'bin' ) # # Docs not working with epy anymore # if not os.path.isdir(B.doc_build_dir) and env['WITH_BF_DOCS']: -# os.makedirs ( B.doc_build_dir ) +# os.makedirs ( B.doc_build_dir ) Help(opts.GenerateHelpText(env)) @@ -370,10 +370,10 @@ Help(opts.GenerateHelpText(env)) # commands, do 'scons BF_QUIET=0' bf_quietoutput = B.arguments.get('BF_QUIET', '1') if env['BF_QUIET']: - B.set_quiet_output(env) + B.set_quiet_output(env) else: - if toolset=='msvc': - B.msvc_hack(env) + if toolset=='msvc': + B.msvc_hack(env) print B.bc.HEADER+'Building in: ' + B.bc.ENDC + os.path.abspath(B.root_build_dir) env.SConsignFile(B.root_build_dir+'scons-signatures') @@ -395,23 +395,23 @@ SConscript(B.root_build_dir+'/source/SConscript') # libraries to give as objects to linking phase mainlist = [] for tp in B.possible_types: - if not tp == 'player': - mainlist += B.create_blender_liblist(env, tp) + if not tp == 'player': + mainlist += B.create_blender_liblist(env, tp) if B.arguments.get('BF_PRIORITYLIST', '0')=='1': - B.propose_priorities() + B.propose_priorities() dobj = B.buildinfo(env, "dynamic") + B.resources thestatlibs, thelibincs = B.setup_staticlibs(env) thesyslibs = B.setup_syslibs(env) if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']: - env.BlenderProg(B.root_build_dir, "blender", mainlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender') + env.BlenderProg(B.root_build_dir, "blender", mainlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender') if env['WITH_BF_PLAYER']: - playerlist = B.create_blender_liblist(env, 'player') - playerlist += B.create_blender_liblist(env, 'intern') - playerlist += B.create_blender_liblist(env, 'extern') - env.BlenderProg(B.root_build_dir, "blenderplayer", playerlist, thestatlibs + dobj + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer') + playerlist = B.create_blender_liblist(env, 'player') + playerlist += B.create_blender_liblist(env, 'intern') + playerlist += B.create_blender_liblist(env, 'extern') + env.BlenderProg(B.root_build_dir, "blenderplayer", playerlist, thestatlibs + dobj + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer') ##### Now define some targets @@ -421,19 +421,19 @@ if env['WITH_BF_PLAYER']: #-- binaries blenderinstall = [] if env['OURPLATFORM']=='darwin': - for prg in B.program_list: - bundle = '%s.app' % prg[0] - bundledir = os.path.dirname(bundle) - for dp, dn, df in os.walk(bundle): - if '.svn' in dn: - dn.remove('.svn') - if '_svn' in dn: - dn.remove('_svn') - dir=env['BF_INSTALLDIR']+dp[len(bundledir):] - source=[dp+os.sep+f for f in df] - blenderinstall.append(env.Install(dir=dir,source=source)) + for prg in B.program_list: + bundle = '%s.app' % prg[0] + bundledir = os.path.dirname(bundle) + for dp, dn, df in os.walk(bundle): + if '.svn' in dn: + dn.remove('.svn') + if '_svn' in dn: + dn.remove('_svn') + dir=env['BF_INSTALLDIR']+dp[len(bundledir):] + source=[dp+os.sep+f for f in df] + blenderinstall.append(env.Install(dir=dir,source=source)) else: - blenderinstall = env.Install(dir=env['BF_INSTALLDIR'], source=B.program_list) + blenderinstall = env.Install(dir=env['BF_INSTALLDIR'], source=B.program_list) #-- local path = config files in install dir: installdir\VERSION #- dont do config and scripts for darwin, it is already in the bundle @@ -444,98 +444,98 @@ dottargetlist = [] scriptinstall = [] if env['OURPLATFORM']!='darwin': - for dp, dn, df in os.walk('bin/.blender'): - if '.svn' in dn: - dn.remove('.svn') - if '_svn' in dn: - dn.remove('_svn') - - for f in df: - if not env['WITH_BF_INTERNATIONAL']: - if 'locale' in dp: - continue - if f == '.Blanguages': - continue - if not env['WITH_BF_FREETYPE']: - if f.endswith('.ttf'): - continue - - if 'locale' in dp: - datafileslist.append(os.path.join(dp,f)) - dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['datafiles'] + dp.split(os.sep)[1:])) # skip bin - datafilestargetlist.append(dir + os.sep + f) + for dp, dn, df in os.walk('bin/.blender'): + if '.svn' in dn: + dn.remove('.svn') + if '_svn' in dn: + dn.remove('_svn') + + for f in df: + if not env['WITH_BF_INTERNATIONAL']: + if 'locale' in dp: + continue + if f == '.Blanguages': + continue + if not env['WITH_BF_FREETYPE']: + if f.endswith('.ttf'): + continue + + if 'locale' in dp: + datafileslist.append(os.path.join(dp,f)) + dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['datafiles'] + dp.split(os.sep)[1:])) # skip bin + datafilestargetlist.append(dir + os.sep + f) - else: - dotblendlist.append(os.path.join(dp, f)) - dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['config'] + dp.split(os.sep)[1:])) # skip bin - dottargetlist.append(dir + os.sep + f) - - dotblenderinstall = [] - for targetdir,srcfile in zip(dottargetlist, dotblendlist): - td, tf = os.path.split(targetdir) - dotblenderinstall.append(env.Install(dir=td, source=srcfile)) - for targetdir,srcfile in zip(datafilestargetlist, datafileslist): - td, tf = os.path.split(targetdir) - dotblenderinstall.append(env.Install(dir=td, source=srcfile)) - - if env['WITH_BF_PYTHON']: - #-- local/VERSION/scripts - scriptpaths=['release/scripts'] - for scriptpath in scriptpaths: - for dp, dn, df in os.walk(scriptpath): - if '.svn' in dn: - dn.remove('.svn') - if '_svn' in dn: - dn.remove('_svn') - - dir = os.path.join(env['BF_INSTALLDIR'], VERSION) - dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):] - - source=[os.path.join(dp, f) for f in df if f[-3:]!='pyc'] - scriptinstall.append(env.Install(dir=dir,source=source)) + else: + dotblendlist.append(os.path.join(dp, f)) + dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['config'] + dp.split(os.sep)[1:])) # skip bin + dottargetlist.append(dir + os.sep + f) + + dotblenderinstall = [] + for targetdir,srcfile in zip(dottargetlist, dotblendlist): + td, tf = os.path.split(targetdir) + dotblenderinstall.append(env.Install(dir=td, source=srcfile)) + for targetdir,srcfile in zip(datafilestargetlist, datafileslist): + td, tf = os.path.split(targetdir) + dotblenderinstall.append(env.Install(dir=td, source=srcfile)) + + if env['WITH_BF_PYTHON']: + #-- local/VERSION/scripts + scriptpaths=['release/scripts'] + for scriptpath in scriptpaths: + for dp, dn, df in os.walk(scriptpath): + if '.svn' in dn: + dn.remove('.svn') + if '_svn' in dn: + dn.remove('_svn') + + dir = os.path.join(env['BF_INSTALLDIR'], VERSION) + dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):] + + source=[os.path.join(dp, f) for f in df if f[-3:]!='pyc'] + scriptinstall.append(env.Install(dir=dir,source=source)) #-- icons if env['OURPLATFORM']=='linux2': - iconlist = [] - icontargetlist = [] + iconlist = [] + icontargetlist = [] - for tp, tn, tf in os.walk('release/freedesktop/icons'): - if '.svn' in tn: - tn.remove('.svn') - if '_svn' in tn: - tn.remove('_svn') - for f in tf: - iconlist.append(os.path.join(tp, f)) - icontargetlist.append( os.path.join(*([env['BF_INSTALLDIR']] + tp.split(os.sep)[2:] + [f])) ) + for tp, tn, tf in os.walk('release/freedesktop/icons'): + if '.svn' in tn: + tn.remove('.svn') + if '_svn' in tn: + tn.remove('_svn') + for f in tf: + iconlist.append(os.path.join(tp, f)) + icontargetlist.append( os.path.join(*([env['BF_INSTALLDIR']] + tp.split(os.sep)[2:] + [f])) ) - iconinstall = [] - for targetdir,srcfile in zip(icontargetlist, iconlist): - td, tf = os.path.split(targetdir) - iconinstall.append(env.Install(dir=td, source=srcfile)) + iconinstall = [] + for targetdir,srcfile in zip(icontargetlist, iconlist): + td, tf = os.path.split(targetdir) + iconinstall.append(env.Install(dir=td, source=srcfile)) # dlls for linuxcross # TODO - add more libs, for now this lets blenderlite run if env['OURPLATFORM']=='linuxcross': - dir=env['BF_INSTALLDIR'] - source = [] + dir=env['BF_INSTALLDIR'] + source = [] - if env['WITH_BF_OPENMP']: - source += ['../lib/windows/pthreads/lib/pthreadGC2.dll'] + if env['WITH_BF_OPENMP']: + source += ['../lib/windows/pthreads/lib/pthreadGC2.dll'] - scriptinstall.append(env.Install(dir=dir, source=source)) + scriptinstall.append(env.Install(dir=dir, source=source)) #-- plugins pluglist = [] plugtargetlist = [] for tp, tn, tf in os.walk('release/plugins'): - if '.svn' in tn: - tn.remove('.svn') - if '_svn' in tn: - tn.remove('_svn') - df = tp[8:] # remove 'release/' - for f in tf: - pluglist.append(os.path.join(tp, f)) - plugtargetlist.append( os.path.join(env['BF_INSTALLDIR'], df, f) ) + if '.svn' in tn: + tn.remove('.svn') + if '_svn' in tn: + tn.remove('_svn') + df = tp[8:] # remove 'release/' + for f in tf: + pluglist.append(os.path.join(tp, f)) + plugtargetlist.append( os.path.join(env['BF_INSTALLDIR'], df, f) ) # header files for plugins @@ -556,82 +556,82 @@ plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', ' plugininstall = [] for targetdir,srcfile in zip(plugtargetlist, pluglist): - td, tf = os.path.split(targetdir) - plugininstall.append(env.Install(dir=td, source=srcfile)) + td, tf = os.path.split(targetdir) + plugininstall.append(env.Install(dir=td, source=srcfile)) textlist = [] texttargetlist = [] for tp, tn, tf in os.walk('release/text'): - if '.svn' in tn: - tn.remove('.svn') - if '_svn' in tn: - tn.remove('_svn') - for f in tf: - textlist.append(tp+os.sep+f) + if '.svn' in tn: + tn.remove('.svn') + if '_svn' in tn: + tn.remove('_svn') + for f in tf: + textlist.append(tp+os.sep+f) textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist) if env['OURPLATFORM']=='darwin': - allinstall = [blenderinstall, plugininstall, textinstall] + allinstall = [blenderinstall, plugininstall, textinstall] elif env['OURPLATFORM']=='linux2': - allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall, iconinstall] + allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall, iconinstall] else: - allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall] + allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall] if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'): - dllsources = [] + dllsources = [] - if not env['OURPLATFORM'] in ('win32-mingw', 'win64-vc', 'linuxcross'): - # For MinGW and linuxcross static linking will be used - dllsources += ['${LCGDIR}/gettext/lib/gnu_gettext.dll'] + if not env['OURPLATFORM'] in ('win32-mingw', 'win64-vc', 'linuxcross'): + # For MinGW and linuxcross static linking will be used + dllsources += ['${LCGDIR}/gettext/lib/gnu_gettext.dll'] - #currently win64-vc doesn't appear to have libpng.dll - if env['OURPLATFORM'] != 'win64-vc': - dllsources += ['${BF_PNG_LIBPATH}/libpng.dll'] + #currently win64-vc doesn't appear to have libpng.dll + if env['OURPLATFORM'] != 'win64-vc': + dllsources += ['${BF_PNG_LIBPATH}/libpng.dll'] - dllsources += ['${BF_ZLIB_LIBPATH}/zlib.dll'] - # Used when linking to libtiff was dynamic - # keep it here until compilation on all platform would be ok - # dllsources += ['${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll'] + dllsources += ['${BF_ZLIB_LIBPATH}/zlib.dll'] + # Used when linking to libtiff was dynamic + # keep it here until compilation on all platform would be ok + # dllsources += ['${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll'] - if env['OURPLATFORM'] != 'linuxcross': - # pthreads library is already added - dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll'] + if env['OURPLATFORM'] != 'linuxcross': + # pthreads library is already added + dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll'] - if env['WITH_BF_SDL']: - if env['OURPLATFORM'] == 'win64-vc': - pass # we link statically already to SDL on win64 - else: - dllsources.append('${BF_SDL_LIBPATH}/SDL.dll') + if env['WITH_BF_SDL']: + if env['OURPLATFORM'] == 'win64-vc': + pass # we link statically already to SDL on win64 + else: + dllsources.append('${BF_SDL_LIBPATH}/SDL.dll') - if env['WITH_BF_PYTHON']: - if env['BF_DEBUG']: - dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll') - else: - dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll') + if env['WITH_BF_PYTHON']: + if env['BF_DEBUG']: + dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll') + else: + dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll') - if env['WITH_BF_ICONV']: - if env['OURPLATFORM'] == 'win64-vc': - pass # we link statically to iconv on win64 - elif not env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'): - #gettext for MinGW and cross-compilation is compiled staticly - dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll'] + if env['WITH_BF_ICONV']: + if env['OURPLATFORM'] == 'win64-vc': + pass # we link statically to iconv on win64 + elif not env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'): + #gettext for MinGW and cross-compilation is compiled staticly + dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll'] - if env['WITH_BF_OPENAL']: - dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll') - dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll') + if env['WITH_BF_OPENAL']: + dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll') + dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll') - if env['WITH_BF_SNDFILE']: - dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll') + if env['WITH_BF_SNDFILE']: + dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll') - if env['WITH_BF_FFMPEG']: - dllsources += ['${BF_FFMPEG_LIBPATH}/avcodec-52.dll', - '${BF_FFMPEG_LIBPATH}/avformat-52.dll', - '${BF_FFMPEG_LIBPATH}/avdevice-52.dll', - '${BF_FFMPEG_LIBPATH}/avutil-50.dll', - '${BF_FFMPEG_LIBPATH}/swscale-0.dll'] - windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources) - allinstall += windlls + if env['WITH_BF_FFMPEG']: + dllsources += ['${BF_FFMPEG_LIBPATH}/avcodec-52.dll', + '${BF_FFMPEG_LIBPATH}/avformat-52.dll', + '${BF_FFMPEG_LIBPATH}/avdevice-52.dll', + '${BF_FFMPEG_LIBPATH}/avutil-50.dll', + '${BF_FFMPEG_LIBPATH}/swscale-0.dll'] + windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources) + allinstall += windlls installtarget = env.Alias('install', allinstall) bininstalltarget = env.Alias('install-bin', blenderinstall) @@ -641,24 +641,24 @@ nsiscmd = env.Command('nsisinstaller', None, nsisaction) nsisalias = env.Alias('nsis', nsiscmd) if 'blender' in B.targets: - blenderexe= env.Alias('blender', B.program_list) - Depends(blenderexe,installtarget) + blenderexe= env.Alias('blender', B.program_list) + Depends(blenderexe,installtarget) if env['WITH_BF_PLAYER']: - blenderplayer = env.Alias('blenderplayer', B.program_list) - Depends(blenderplayer,installtarget) + blenderplayer = env.Alias('blenderplayer', B.program_list) + Depends(blenderplayer,installtarget) if not env['WITH_BF_GAMEENGINE']: - blendernogame = env.Alias('blendernogame', B.program_list) - Depends(blendernogame,installtarget) + blendernogame = env.Alias('blendernogame', B.program_list) + Depends(blendernogame,installtarget) if 'blenderlite' in B.targets: - blenderlite = env.Alias('blenderlite', B.program_list) - Depends(blenderlite,installtarget) + blenderlite = env.Alias('blenderlite', B.program_list) + Depends(blenderlite,installtarget) Depends(nsiscmd, allinstall) Default(B.program_list) if not env['WITHOUT_BF_INSTALL']: - Default(installtarget) + Default(installtarget) diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index 345590330cc..611d6afd0e0 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -60,745 +60,745 @@ libs = {} vcp = [] def getresources(): - return resources + return resources def init_lib_dict(): - for pt in possible_types: - libs[pt] = {} + for pt in possible_types: + libs[pt] = {} # helper func for add_lib_to_dict def internal_lib_to_dict(dict = None, libtype = None, libname = None, priority = 100): - if not libname in dict[libtype]: - done = None - while not done: - if dict[libtype].has_key(priority): - priority = priority + 1 - else: - done = True - dict[libtype][priority] = libname + if not libname in dict[libtype]: + done = None + while not done: + if dict[libtype].has_key(priority): + priority = priority + 1 + else: + done = True + dict[libtype][priority] = libname # libtype and priority can both be lists, for defining lib in multiple places def add_lib_to_dict(env, dict = None, libtype = None, libname = None, priority = 100): - if not dict or not libtype or not libname: - print "Passed wrong arg" - env.Exit() + if not dict or not libtype or not libname: + print "Passed wrong arg" + env.Exit() - if type(libtype) is str and type(priority) is int: - internal_lib_to_dict(dict, libtype, libname, priority) - elif type(libtype) is list and type(priority) is list: - if len(libtype)==len(priority): - for lt, p in zip(libtype, priority): - internal_lib_to_dict(dict, lt, libname, p) - else: - print "libtype and priority lists are unequal in length" - env.Exit() - else: - print "Wrong type combinations for libtype and priority. Only str and int or list and list" - env.Exit() + if type(libtype) is str and type(priority) is int: + internal_lib_to_dict(dict, libtype, libname, priority) + elif type(libtype) is list and type(priority) is list: + if len(libtype)==len(priority): + for lt, p in zip(libtype, priority): + internal_lib_to_dict(dict, lt, libname, p) + else: + print "libtype and priority lists are unequal in length" + env.Exit() + else: + print "Wrong type combinations for libtype and priority. Only str and int or list and list" + env.Exit() def create_blender_liblist(lenv = None, libtype = None): - if not lenv or not libtype: - print "missing arg" + if not lenv or not libtype: + print "missing arg" - lst = [] - if libtype in possible_types: - curlib = libs[libtype] - sortlist = curlib.keys() - sortlist.sort() - for sk in sortlist: - v = curlib[sk] - if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'): - target = os.path.abspath(os.getcwd() + os.sep + root_build_dir + 'lib' + os.sep +lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX']) - else: - target = os.path.abspath(root_build_dir + 'lib' + os.sep +lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX']) - lst.append(target) + lst = [] + if libtype in possible_types: + curlib = libs[libtype] + sortlist = curlib.keys() + sortlist.sort() + for sk in sortlist: + v = curlib[sk] + if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'): + target = os.path.abspath(os.getcwd() + os.sep + root_build_dir + 'lib' + os.sep +lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX']) + else: + target = os.path.abspath(root_build_dir + 'lib' + os.sep +lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX']) + lst.append(target) - return lst + return lst ## TODO: static linking def setup_staticlibs(lenv): - statlibs = [ - #here libs for static linking - ] + statlibs = [ + #here libs for static linking + ] - libincs = [] + libincs = [] - if lenv['WITH_BF_FFMPEG']: - libincs += Split(lenv['BF_FFMPEG_LIBPATH']) + if lenv['WITH_BF_FFMPEG']: + libincs += Split(lenv['BF_FFMPEG_LIBPATH']) - libincs.extend([ - lenv['BF_OPENGL_LIBPATH'], - lenv['BF_JPEG_LIBPATH'], - lenv['BF_PNG_LIBPATH'], - lenv['BF_ZLIB_LIBPATH'], - lenv['BF_LIBSAMPLERATE_LIBPATH'], - lenv['BF_ICONV_LIBPATH'] - ]) + libincs.extend([ + lenv['BF_OPENGL_LIBPATH'], + lenv['BF_JPEG_LIBPATH'], + lenv['BF_PNG_LIBPATH'], + lenv['BF_ZLIB_LIBPATH'], + lenv['BF_LIBSAMPLERATE_LIBPATH'], + lenv['BF_ICONV_LIBPATH'] + ]) - libincs += Split(lenv['BF_FREETYPE_LIBPATH']) - if lenv['WITH_BF_PYTHON']: - libincs += Split(lenv['BF_PYTHON_LIBPATH']) - if lenv['WITH_BF_SDL']: - libincs += Split(lenv['BF_SDL_LIBPATH']) - if lenv['WITH_BF_JACK']: - libincs += Split(lenv['BF_JACK_LIBPATH']) - if lenv['WITH_BF_SNDFILE']: - libincs += Split(lenv['BF_SNDFILE_LIBPATH']) - if lenv['WITH_BF_OPENEXR']: - libincs += Split(lenv['BF_OPENEXR_LIBPATH']) - if lenv['WITH_BF_STATICOPENEXR']: - statlibs += Split(lenv['BF_OPENEXR_LIB_STATIC']) - if lenv['WITH_BF_LCMS']: - libincs += Split(lenv['BF_LCMS_LIBPATH']) - if lenv['WITH_BF_TIFF']: - libincs += Split(lenv['BF_TIFF_LIBPATH']) - if lenv['WITH_BF_FFTW3']: - libincs += Split(lenv['BF_FFTW3_LIBPATH']) - if lenv['WITH_BF_FFMPEG'] and lenv['WITH_BF_STATICFFMPEG']: - statlibs += Split(lenv['BF_FFMPEG_LIB_STATIC']) - if lenv['WITH_BF_INTERNATIONAL']: - libincs += Split(lenv['BF_GETTEXT_LIBPATH']) - if lenv['WITH_BF_GETTEXT_STATIC']: - statlibs += Split(lenv['BF_GETTEXT_LIB_STATIC']) - if lenv['WITH_BF_FREETYPE_STATIC']: - statlibs += Split(lenv['BF_FREETYPE_LIB_STATIC']) - if lenv['WITH_BF_OPENAL']: - libincs += Split(lenv['BF_OPENAL_LIBPATH']) - if lenv['WITH_BF_STATICOPENAL']: - statlibs += Split(lenv['BF_OPENAL_LIB_STATIC']) - if lenv['WITH_BF_STATICOPENGL']: - statlibs += Split(lenv['BF_OPENGL_LIB_STATIC']) - if lenv['WITH_BF_STATICCXX']: - statlibs += Split(lenv['BF_CXX_LIB_STATIC']) + libincs += Split(lenv['BF_FREETYPE_LIBPATH']) + if lenv['WITH_BF_PYTHON']: + libincs += Split(lenv['BF_PYTHON_LIBPATH']) + if lenv['WITH_BF_SDL']: + libincs += Split(lenv['BF_SDL_LIBPATH']) + if lenv['WITH_BF_JACK']: + libincs += Split(lenv['BF_JACK_LIBPATH']) + if lenv['WITH_BF_SNDFILE']: + libincs += Split(lenv['BF_SNDFILE_LIBPATH']) + if lenv['WITH_BF_OPENEXR']: + libincs += Split(lenv['BF_OPENEXR_LIBPATH']) + if lenv['WITH_BF_STATICOPENEXR']: + statlibs += Split(lenv['BF_OPENEXR_LIB_STATIC']) + if lenv['WITH_BF_LCMS']: + libincs += Split(lenv['BF_LCMS_LIBPATH']) + if lenv['WITH_BF_TIFF']: + libincs += Split(lenv['BF_TIFF_LIBPATH']) + if lenv['WITH_BF_FFTW3']: + libincs += Split(lenv['BF_FFTW3_LIBPATH']) + if lenv['WITH_BF_FFMPEG'] and lenv['WITH_BF_STATICFFMPEG']: + statlibs += Split(lenv['BF_FFMPEG_LIB_STATIC']) + if lenv['WITH_BF_INTERNATIONAL']: + libincs += Split(lenv['BF_GETTEXT_LIBPATH']) + if lenv['WITH_BF_GETTEXT_STATIC']: + statlibs += Split(lenv['BF_GETTEXT_LIB_STATIC']) + if lenv['WITH_BF_FREETYPE_STATIC']: + statlibs += Split(lenv['BF_FREETYPE_LIB_STATIC']) + if lenv['WITH_BF_OPENAL']: + libincs += Split(lenv['BF_OPENAL_LIBPATH']) + if lenv['WITH_BF_STATICOPENAL']: + statlibs += Split(lenv['BF_OPENAL_LIB_STATIC']) + if lenv['WITH_BF_STATICOPENGL']: + statlibs += Split(lenv['BF_OPENGL_LIB_STATIC']) + if lenv['WITH_BF_STATICCXX']: + statlibs += Split(lenv['BF_CXX_LIB_STATIC']) - if lenv['WITH_BF_PYTHON'] and lenv['WITH_BF_STATICPYTHON']: - statlibs += Split(lenv['BF_PYTHON_LIB_STATIC']) + if lenv['WITH_BF_PYTHON'] and lenv['WITH_BF_STATICPYTHON']: + statlibs += Split(lenv['BF_PYTHON_LIB_STATIC']) - if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): - libincs += Split(lenv['BF_PTHREADS_LIBPATH']) + if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): + libincs += Split(lenv['BF_PTHREADS_LIBPATH']) - if lenv['WITH_BF_COLLADA']: - libincs += Split(lenv['BF_OPENCOLLADA_LIBPATH']) - if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): - libincs += Split(lenv['BF_PCRE_LIBPATH']) - libincs += Split(lenv['BF_EXPAT_LIBPATH']) + if lenv['WITH_BF_COLLADA']: + libincs += Split(lenv['BF_OPENCOLLADA_LIBPATH']) + if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): + libincs += Split(lenv['BF_PCRE_LIBPATH']) + libincs += Split(lenv['BF_EXPAT_LIBPATH']) - if lenv['WITH_BF_OPENMP']: - if lenv['OURPLATFORM'] == 'linuxcross': - libincs += Split(lenv['BF_OPENMP_LIBPATH']) + if lenv['WITH_BF_OPENMP']: + if lenv['OURPLATFORM'] == 'linuxcross': + libincs += Split(lenv['BF_OPENMP_LIBPATH']) - # setting this last so any overriding of manually libs could be handled - if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'): - libincs.append('/usr/lib') + # setting this last so any overriding of manually libs could be handled + if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'): + libincs.append('/usr/lib') - return statlibs, libincs + return statlibs, libincs def setup_syslibs(lenv): - syslibs = [ - - lenv['BF_JPEG_LIB'], - lenv['BF_PNG_LIB'], - lenv['BF_ZLIB_LIB'], - lenv['BF_LIBSAMPLERATE_LIB'] - ] + syslibs = [ + + lenv['BF_JPEG_LIB'], + lenv['BF_PNG_LIB'], + lenv['BF_ZLIB_LIB'], + lenv['BF_LIBSAMPLERATE_LIB'] + ] - if not lenv['WITH_BF_FREETYPE_STATIC']: - syslibs += Split(lenv['BF_FREETYPE_LIB']) - if lenv['WITH_BF_PYTHON'] and not lenv['WITH_BF_STATICPYTHON']: - if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'): - syslibs.append(lenv['BF_PYTHON_LIB']+'_d') - else: - syslibs.append(lenv['BF_PYTHON_LIB']) - if lenv['WITH_BF_INTERNATIONAL'] and not lenv['WITH_BF_GETTEXT_STATIC']: - syslibs += Split(lenv['BF_GETTEXT_LIB']) - if lenv['WITH_BF_OPENAL']: - if not lenv['WITH_BF_STATICOPENAL']: - syslibs += Split(lenv['BF_OPENAL_LIB']) - if lenv['WITH_BF_OPENMP'] and lenv['CC'] != 'icc': - if lenv['CC'] == 'cl.exe': - syslibs += ['vcomp'] - else: - syslibs += ['gomp'] - if lenv['WITH_BF_ICONV']: - syslibs += Split(lenv['BF_ICONV_LIB']) - if lenv['WITH_BF_OPENEXR']: - if not lenv['WITH_BF_STATICOPENEXR']: - syslibs += Split(lenv['BF_OPENEXR_LIB']) - if lenv['WITH_BF_TIFF']: - syslibs += Split(lenv['BF_TIFF_LIB']) - if lenv['WITH_BF_FFMPEG'] and not lenv['WITH_BF_STATICFFMPEG']: - syslibs += Split(lenv['BF_FFMPEG_LIB']) - if lenv['WITH_BF_OGG']: - syslibs += Split(lenv['BF_OGG_LIB']) - if lenv['WITH_BF_JACK']: - syslibs += Split(lenv['BF_JACK_LIB']) - if lenv['WITH_BF_SNDFILE']: - syslibs += Split(lenv['BF_SNDFILE_LIB']) - if lenv['WITH_BF_FFTW3']: - syslibs += Split(lenv['BF_FFTW3_LIB']) - if lenv['WITH_BF_SDL']: - syslibs += Split(lenv['BF_SDL_LIB']) - if not lenv['WITH_BF_STATICOPENGL']: - syslibs += Split(lenv['BF_OPENGL_LIB']) - if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw','linuxcross', 'win64-vc'): - syslibs += Split(lenv['BF_PTHREADS_LIB']) - if lenv['WITH_BF_LCMS']: - syslibs.append(lenv['BF_LCMS_LIB']) - if lenv['WITH_BF_COLLADA']: - syslibs.append(lenv['BF_PCRE_LIB']) - syslibs += Split(lenv['BF_OPENCOLLADA_LIB']) - syslibs.append(lenv['BF_EXPAT_LIB']) + if not lenv['WITH_BF_FREETYPE_STATIC']: + syslibs += Split(lenv['BF_FREETYPE_LIB']) + if lenv['WITH_BF_PYTHON'] and not lenv['WITH_BF_STATICPYTHON']: + if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'): + syslibs.append(lenv['BF_PYTHON_LIB']+'_d') + else: + syslibs.append(lenv['BF_PYTHON_LIB']) + if lenv['WITH_BF_INTERNATIONAL'] and not lenv['WITH_BF_GETTEXT_STATIC']: + syslibs += Split(lenv['BF_GETTEXT_LIB']) + if lenv['WITH_BF_OPENAL']: + if not lenv['WITH_BF_STATICOPENAL']: + syslibs += Split(lenv['BF_OPENAL_LIB']) + if lenv['WITH_BF_OPENMP'] and lenv['CC'] != 'icc': + if lenv['CC'] == 'cl.exe': + syslibs += ['vcomp'] + else: + syslibs += ['gomp'] + if lenv['WITH_BF_ICONV']: + syslibs += Split(lenv['BF_ICONV_LIB']) + if lenv['WITH_BF_OPENEXR']: + if not lenv['WITH_BF_STATICOPENEXR']: + syslibs += Split(lenv['BF_OPENEXR_LIB']) + if lenv['WITH_BF_TIFF']: + syslibs += Split(lenv['BF_TIFF_LIB']) + if lenv['WITH_BF_FFMPEG'] and not lenv['WITH_BF_STATICFFMPEG']: + syslibs += Split(lenv['BF_FFMPEG_LIB']) + if lenv['WITH_BF_OGG']: + syslibs += Split(lenv['BF_OGG_LIB']) + if lenv['WITH_BF_JACK']: + syslibs += Split(lenv['BF_JACK_LIB']) + if lenv['WITH_BF_SNDFILE']: + syslibs += Split(lenv['BF_SNDFILE_LIB']) + if lenv['WITH_BF_FFTW3']: + syslibs += Split(lenv['BF_FFTW3_LIB']) + if lenv['WITH_BF_SDL']: + syslibs += Split(lenv['BF_SDL_LIB']) + if not lenv['WITH_BF_STATICOPENGL']: + syslibs += Split(lenv['BF_OPENGL_LIB']) + if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw','linuxcross', 'win64-vc'): + syslibs += Split(lenv['BF_PTHREADS_LIB']) + if lenv['WITH_BF_LCMS']: + syslibs.append(lenv['BF_LCMS_LIB']) + if lenv['WITH_BF_COLLADA']: + syslibs.append(lenv['BF_PCRE_LIB']) + syslibs += Split(lenv['BF_OPENCOLLADA_LIB']) + syslibs.append(lenv['BF_EXPAT_LIB']) - syslibs += lenv['LLIBS'] + syslibs += lenv['LLIBS'] - return syslibs + return syslibs def propose_priorities(): - print bc.OKBLUE+"Priorities:"+bc.ENDC - for t in possible_types: - print bc.OKGREEN+"\t"+t+bc.ENDC - new_priority = 0 - curlib = libs[t] - sortlist = curlib.keys() - sortlist.sort() + print bc.OKBLUE+"Priorities:"+bc.ENDC + for t in possible_types: + print bc.OKGREEN+"\t"+t+bc.ENDC + new_priority = 0 + curlib = libs[t] + sortlist = curlib.keys() + sortlist.sort() - for sk in sortlist: - v = curlib[sk] - #for p,v in sorted(libs[t].iteritems()): - print "\t\t",new_priority, v - new_priority += 5 + for sk in sortlist: + v = curlib[sk] + #for p,v in sorted(libs[t].iteritems()): + print "\t\t",new_priority, v + new_priority += 5 ## TODO: see if this can be made in an emitter def buildinfo(lenv, build_type): - """ - Generate a buildinfo object - """ - build_date = time.strftime ("%Y-%m-%d") - build_time = time.strftime ("%H:%M:%S") - build_rev = os.popen('svnversion').read()[:-1] # remove \n - if lenv['BF_DEBUG']: - build_type = "Debug" - else: - build_type = "Release" + """ + Generate a buildinfo object + """ + build_date = time.strftime ("%Y-%m-%d") + build_time = time.strftime ("%H:%M:%S") + build_rev = os.popen('svnversion').read()[:-1] # remove \n + if lenv['BF_DEBUG']: + build_type = "Debug" + else: + build_type = "Release" - obj = [] - if lenv['BF_BUILDINFO']: - lenv.Append (CPPDEFINES = ['BUILD_TIME=\'"%s"\''%(build_time), - 'BUILD_DATE=\'"%s"\''%(build_date), - 'BUILD_TYPE=\'"%s"\''%(build_type), - 'BUILD_REV=\'"%s"\''%(build_rev), - 'NAN_BUILDINFO', - 'BUILD_PLATFORM=\'"%s %s"\''%(platform.system(), platform.architecture()[0])]) - obj = [lenv.Object (root_build_dir+'source/creator/%s_buildinfo'%build_type, - [root_build_dir+'source/creator/buildinfo.c'])] - return obj + obj = [] + if lenv['BF_BUILDINFO']: + lenv.Append (CPPDEFINES = ['BUILD_TIME=\'"%s"\''%(build_time), + 'BUILD_DATE=\'"%s"\''%(build_date), + 'BUILD_TYPE=\'"%s"\''%(build_type), + 'BUILD_REV=\'"%s"\''%(build_rev), + 'NAN_BUILDINFO', + 'BUILD_PLATFORM=\'"%s %s"\''%(platform.system(), platform.architecture()[0])]) + obj = [lenv.Object (root_build_dir+'source/creator/%s_buildinfo'%build_type, + [root_build_dir+'source/creator/buildinfo.c'])] + return obj ##### END LIB STUFF ############ ##### ACTION STUFF ############# def my_print_cmd_line(self, s, target, source, env): - sys.stdout.write(' ' * 70 + '\r') - sys.stdout.flush() - sys.stdout.write(s + "\r") - sys.stdout.flush() + sys.stdout.write(' ' * 70 + '\r') + sys.stdout.flush() + sys.stdout.write(s + "\r") + sys.stdout.flush() def my_compile_print(target, source, env): - a = '%s' % (source[0]) - d, f = os.path.split(a) - return bc.OKBLUE+"Compiling"+bc.ENDC +" ==> '"+bc.OKGREEN+"%s" % (f) + "'"+bc.ENDC + a = '%s' % (source[0]) + d, f = os.path.split(a) + return bc.OKBLUE+"Compiling"+bc.ENDC +" ==> '"+bc.OKGREEN+"%s" % (f) + "'"+bc.ENDC def my_moc_print(target, source, env): - a = '%s' % (source[0]) - d, f = os.path.split(a) - return bc.OKBLUE+"Creating MOC"+bc.ENDC+ " ==> '"+bc.OKGREEN+"%s" %(f) + "'"+bc.ENDC + a = '%s' % (source[0]) + d, f = os.path.split(a) + return bc.OKBLUE+"Creating MOC"+bc.ENDC+ " ==> '"+bc.OKGREEN+"%s" %(f) + "'"+bc.ENDC def my_linking_print(target, source, env): - t = '%s' % (target[0]) - d, f = os.path.split(t) - return bc.OKBLUE+"Linking library"+bc.ENDC +" ==> '"+bc.OKGREEN+"%s" % (f) + "'"+bc.ENDC + t = '%s' % (target[0]) + d, f = os.path.split(t) + return bc.OKBLUE+"Linking library"+bc.ENDC +" ==> '"+bc.OKGREEN+"%s" % (f) + "'"+bc.ENDC def my_program_print(target, source, env): - t = '%s' % (target[0]) - d, f = os.path.split(t) - return bc.OKBLUE+"Linking program"+bc.ENDC +" ==> '"+bc.OKGREEN+"%s" % (f) + "'"+bc.ENDC + t = '%s' % (target[0]) + d, f = os.path.split(t) + return bc.OKBLUE+"Linking program"+bc.ENDC +" ==> '"+bc.OKGREEN+"%s" % (f) + "'"+bc.ENDC def msvc_hack(env): - static_lib = SCons.Tool.createStaticLibBuilder(env) - program = SCons.Tool.createProgBuilder(env) - - env['BUILDERS']['Library'] = static_lib - env['BUILDERS']['StaticLibrary'] = static_lib - env['BUILDERS']['Program'] = program - + static_lib = SCons.Tool.createStaticLibBuilder(env) + program = SCons.Tool.createProgBuilder(env) + + env['BUILDERS']['Library'] = static_lib + env['BUILDERS']['StaticLibrary'] = static_lib + env['BUILDERS']['Program'] = program + def set_quiet_output(env): - mycaction = Action("$CCCOM", strfunction=my_compile_print) - myshcaction = Action("$SHCCCOM", strfunction=my_compile_print) - mycppaction = Action("$CXXCOM", strfunction=my_compile_print) - myshcppaction = Action("$SHCXXCOM", strfunction=my_compile_print) - mylibaction = Action("$ARCOM", strfunction=my_linking_print) - mylinkaction = Action("$LINKCOM", strfunction=my_program_print) + mycaction = Action("$CCCOM", strfunction=my_compile_print) + myshcaction = Action("$SHCCCOM", strfunction=my_compile_print) + mycppaction = Action("$CXXCOM", strfunction=my_compile_print) + myshcppaction = Action("$SHCXXCOM", strfunction=my_compile_print) + mylibaction = Action("$ARCOM", strfunction=my_linking_print) + mylinkaction = Action("$LINKCOM", strfunction=my_program_print) - static_ob, shared_ob = SCons.Tool.createObjBuilders(env) - static_ob.add_action('.c', mycaction) - static_ob.add_action('.cpp', mycppaction) - shared_ob.add_action('.c', myshcaction) - shared_ob.add_action('.cpp', myshcppaction) + static_ob, shared_ob = SCons.Tool.createObjBuilders(env) + static_ob.add_action('.c', mycaction) + static_ob.add_action('.cpp', mycppaction) + shared_ob.add_action('.c', myshcaction) + shared_ob.add_action('.cpp', myshcppaction) - static_lib = SCons.Builder.Builder(action = mylibaction, - emitter = '$LIBEMITTER', - prefix = '$LIBPREFIX', - suffix = '$LIBSUFFIX', - src_suffix = '$OBJSUFFIX', - src_builder = 'StaticObject') + static_lib = SCons.Builder.Builder(action = mylibaction, + emitter = '$LIBEMITTER', + prefix = '$LIBPREFIX', + suffix = '$LIBSUFFIX', + src_suffix = '$OBJSUFFIX', + src_builder = 'StaticObject') - program = SCons.Builder.Builder(action = mylinkaction, - emitter = '$PROGEMITTER', - prefix = '$PROGPREFIX', - suffix = '$PROGSUFFIX', - src_suffix = '$OBJSUFFIX', - src_builder = 'Object', - target_scanner = SCons.Defaults.ProgScan) + program = SCons.Builder.Builder(action = mylinkaction, + emitter = '$PROGEMITTER', + prefix = '$PROGPREFIX', + suffix = '$PROGSUFFIX', + src_suffix = '$OBJSUFFIX', + src_builder = 'Object', + target_scanner = SCons.Defaults.ProgScan) - env['BUILDERS']['Object'] = static_ob - env['BUILDERS']['StaticObject'] = static_ob - env['BUILDERS']['StaticLibrary'] = static_lib - env['BUILDERS']['Library'] = static_lib - env['BUILDERS']['Program'] = program - if env['BF_LINE_OVERWRITE']: - SCons.Action._ActionAction.print_cmd_line = my_print_cmd_line + env['BUILDERS']['Object'] = static_ob + env['BUILDERS']['StaticObject'] = static_ob + env['BUILDERS']['StaticLibrary'] = static_lib + env['BUILDERS']['Library'] = static_lib + env['BUILDERS']['Program'] = program + if env['BF_LINE_OVERWRITE']: + SCons.Action._ActionAction.print_cmd_line = my_print_cmd_line - + class CompZipFile(zipfile.ZipFile): - """Partial copy of python2.6's zipfile.ZipFile (see http://www.python.org) - to get a extractall() that works on py2.5 and probably earlier distributions.""" - def __init__(self, file, mode="r", compression=zipfile.ZIP_STORED, allowZip64=False): - if sys.version_info < (2, 6): - zipfile.ZipFile.__init__(self, file, mode, compression) - else: - zipfile.ZipFile.__init__(self, file, mode, compression, allowZip64) + """Partial copy of python2.6's zipfile.ZipFile (see http://www.python.org) + to get a extractall() that works on py2.5 and probably earlier distributions.""" + def __init__(self, file, mode="r", compression=zipfile.ZIP_STORED, allowZip64=False): + if sys.version_info < (2, 6): + zipfile.ZipFile.__init__(self, file, mode, compression) + else: + zipfile.ZipFile.__init__(self, file, mode, compression, allowZip64) - if not hasattr(self,"extractall"): # use our method - print "Debug: Using comp_extractall!" - self.extractall= self.comp_extractall + if not hasattr(self,"extractall"): # use our method + print "Debug: Using comp_extractall!" + self.extractall= self.comp_extractall - def comp_extractall(self, path=None, members=None, pwd=None): #renamed method - """Extract all members from the archive to the current working - directory. `path' specifies a different directory to extract to. - `members' is optional and must be a subset of the list returned - by namelist(). - """ - if members is None: - members = self.namelist() + def comp_extractall(self, path=None, members=None, pwd=None): #renamed method + """Extract all members from the archive to the current working + directory. `path' specifies a different directory to extract to. + `members' is optional and must be a subset of the list returned + by namelist(). + """ + if members is None: + members = self.namelist() - for zipinfo in members: - self.comp_extract(zipinfo, path, pwd) # use our method + for zipinfo in members: + self.comp_extract(zipinfo, path, pwd) # use our method - def comp_extract(self, member, path=None, pwd=None): #renamed method - """Extract a member from the archive to the current working directory, - using its full name. Its file information is extracted as accurately - as possible. `member' may be a filename or a ZipInfo object. You can - specify a different directory using `path'. - """ - if not isinstance(member, zipfile.ZipInfo): - member = self.getinfo(member) + def comp_extract(self, member, path=None, pwd=None): #renamed method + """Extract a member from the archive to the current working directory, + using its full name. Its file information is extracted as accurately + as possible. `member' may be a filename or a ZipInfo object. You can + specify a different directory using `path'. + """ + if not isinstance(member, zipfile.ZipInfo): + member = self.getinfo(member) - if path is None: - path = os.getcwd() + if path is None: + path = os.getcwd() - return self.comp_extract_member(member, path, pwd) # use our method + return self.comp_extract_member(member, path, pwd) # use our method - def comp_extract_member(self, member, targetpath, pwd): #renamed method - """Extract the ZipInfo object 'member' to a physical - file on the path targetpath. - """ - # build the destination pathname, replacing - # forward slashes to platform specific separators. - if targetpath[-1:] in (os.path.sep, os.path.altsep): - targetpath = targetpath[:-1] + def comp_extract_member(self, member, targetpath, pwd): #renamed method + """Extract the ZipInfo object 'member' to a physical + file on the path targetpath. + """ + # build the destination pathname, replacing + # forward slashes to platform specific separators. + if targetpath[-1:] in (os.path.sep, os.path.altsep): + targetpath = targetpath[:-1] - # don't include leading "/" from file name if present - if member.filename[0] == '/': - targetpath = os.path.join(targetpath, member.filename[1:]) - else: - targetpath = os.path.join(targetpath, member.filename) + # don't include leading "/" from file name if present + if member.filename[0] == '/': + targetpath = os.path.join(targetpath, member.filename[1:]) + else: + targetpath = os.path.join(targetpath, member.filename) - targetpath = os.path.normpath(targetpath) + targetpath = os.path.normpath(targetpath) - # Create all upper directories if necessary. - upperdirs = os.path.dirname(targetpath) - if upperdirs and not os.path.exists(upperdirs): - os.makedirs(upperdirs) + # Create all upper directories if necessary. + upperdirs = os.path.dirname(targetpath) + if upperdirs and not os.path.exists(upperdirs): + os.makedirs(upperdirs) - if member.filename[-1] == '/': - os.mkdir(targetpath) - return targetpath + if member.filename[-1] == '/': + os.mkdir(targetpath) + return targetpath - #use StrinIO instead so we don't have to reproduce more functionality. - source = cStringIO.StringIO(self.read(member.filename)) - target = file(targetpath, "wb") - shutil.copyfileobj(source, target) - source.close() - target.close() + #use StrinIO instead so we don't have to reproduce more functionality. + source = cStringIO.StringIO(self.read(member.filename)) + target = file(targetpath, "wb") + shutil.copyfileobj(source, target) + source.close() + target.close() - return targetpath + return targetpath def unzip_pybundle(from_zip,to_dir,exclude_re): - - zip= CompZipFile(from_zip, mode='r') - exclude_re= list(exclude_re) #single re object or list of re objects - debug= 0 #list files instead of unpacking - good= [] - if debug: print '\nFiles not being unpacked:\n' - for name in zip.namelist(): - is_bad= 0 - for r in exclude_re: - if r.match(name): - is_bad=1 - if debug: print name - break - if not is_bad: - good.append(name) - if debug: - print '\nFiles being unpacked:\n' - for g in good: - print g - else: - zip.extractall(to_dir, good) + + zip= CompZipFile(from_zip, mode='r') + exclude_re= list(exclude_re) #single re object or list of re objects + debug= 0 #list files instead of unpacking + good= [] + if debug: print '\nFiles not being unpacked:\n' + for name in zip.namelist(): + is_bad= 0 + for r in exclude_re: + if r.match(name): + is_bad=1 + if debug: print name + break + if not is_bad: + good.append(name) + if debug: + print '\nFiles being unpacked:\n' + for g in good: + print g + else: + zip.extractall(to_dir, good) def my_winpybundle_print(target, source, env): - pass + pass def WinPyBundle(target=None, source=None, env=None): - import re - py_zip= env.subst( env['LCGDIR'] ) - if py_zip[0]=='#': - py_zip= py_zip[1:] - if env['BF_DEBUG']: - py_zip+= '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '_d.zip' - else: - py_zip+= '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '.zip' + import re + py_zip= env.subst( env['LCGDIR'] ) + if py_zip[0]=='#': + py_zip= py_zip[1:] + if env['BF_DEBUG']: + py_zip+= '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '_d.zip' + else: + py_zip+= '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '.zip' - py_target = env.subst( env['BF_INSTALLDIR'] ) - if py_target[0]=='#': - py_target=py_target[1:] - py_target = os.path.join(py_target, VERSION, 'python', 'lib') - def printexception(func,path,ex): - if os.path.exists(path): #do not report if path does not exist. eg on a fresh build. - print str(func) + ' failed on ' + str(path) - print "Trying to remove existing py bundle." - shutil.rmtree(py_target, False, printexception) - exclude_re=[re.compile('.*/test/.*'), - re.compile('^config/.*'), - re.compile('^distutils/.*'), - re.compile('^idlelib/.*'), - re.compile('^lib2to3/.*'), - re.compile('^tkinter/.*')] - print "Unpacking '" + py_zip + "' to '" + py_target + "'" - unzip_pybundle(py_zip,py_target,exclude_re) + py_target = env.subst( env['BF_INSTALLDIR'] ) + if py_target[0]=='#': + py_target=py_target[1:] + py_target = os.path.join(py_target, VERSION, 'python', 'lib') + def printexception(func,path,ex): + if os.path.exists(path): #do not report if path does not exist. eg on a fresh build. + print str(func) + ' failed on ' + str(path) + print "Trying to remove existing py bundle." + shutil.rmtree(py_target, False, printexception) + exclude_re=[re.compile('.*/test/.*'), + re.compile('^config/.*'), + re.compile('^distutils/.*'), + re.compile('^idlelib/.*'), + re.compile('^lib2to3/.*'), + re.compile('^tkinter/.*')] + print "Unpacking '" + py_zip + "' to '" + py_target + "'" + unzip_pybundle(py_zip,py_target,exclude_re) def my_appit_print(target, source, env): - a = '%s' % (target[0]) - d, f = os.path.split(a) - return "making bundle for " + f + a = '%s' % (target[0]) + d, f = os.path.split(a) + return "making bundle for " + f def AppIt(target=None, source=None, env=None): - import shutil - import commands - import os.path - - - a = '%s' % (target[0]) - builddir, b = os.path.split(a) - libdir = env['LCGDIR'][1:] - osxarch = env['MACOSX_ARCHITECTURE'] - installdir = env['BF_INSTALLDIR'] - print("compiled architecture: %s"%(osxarch)) - print("Installing to %s"%(installdir)) - python_zip = 'python_' + osxarch + '.zip' # set specific python_arch.zip - print("unzipping to app-bundle: %s"%(python_zip)) - bldroot = env.Dir('.').abspath - binary = env['BINARYKIND'] - - if b=='verse': - print bc.OKBLUE+"no bundle for verse"+bc.ENDC - return 0 - - sourcedir = bldroot + '/source/darwin/%s.app'%binary - sourceinfo = bldroot + "/source/darwin/%s.app/Contents/Info.plist"%binary - targetinfo = installdir +'/' + "%s.app/Contents/Info.plist"%binary - cmd = installdir + '/' +'%s.app'%binary - - if os.path.isdir(cmd): - shutil.rmtree(cmd) - shutil.copytree(sourcedir, cmd) - cmd = "cat %s | sed s/VERSION/`cat release/VERSION`/ | sed s/DATE/`date +'%%Y-%%b-%%d'`/ > %s"%(sourceinfo,targetinfo) - commands.getoutput(cmd) - cmd = 'cp %s/%s %s/%s.app/Contents/MacOS/%s'%(builddir, binary,installdir, binary, binary) - commands.getoutput(cmd) - cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/'%(installdir, binary, VERSION) -# print cmd - commands.getoutput(cmd) - cmd = installdir + '/%s.app/Contents/MacOS/%s'%(binary,VERSION) - shutil.copy(bldroot + '/release/bin/.blender/.bfont.ttf', cmd) - shutil.copy(bldroot + '/release/bin/.blender/.Blanguages', cmd) - cmd = 'cp -R %s/release/bin/%s/locale %s/%s.app/Contents/Resources/'%(bldroot,VERSION,installdir,binary) - commands.getoutput(cmd) - cmd = 'cp -R %s/release/bin/%s/locale %s/%s.app/Contents/MacOS/%s/'%(bldroot,VERSION,installdir,binary,VERSION) - commands.getoutput(cmd) - cmd = 'cp %s/release/bin/%s/.Blanguages %s/%s.app/Contents/Resources/'%(bldroot,VERSION,installdir,binary) - commands.getoutput(cmd) - cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(installdir,binary, VERSION) - commands.getoutput(cmd) - cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,installdir,binary,VERSION) - commands.getoutput(cmd) - cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION) - commands.getoutput(cmd) - cmd = 'cp -R %s/release/ui %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION) - commands.getoutput(cmd) - cmd = 'cp -R %s/release/io %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION) - commands.getoutput(cmd) - cmd = 'chmod +x %s/%s.app/Contents/MacOS/%s'%(installdir,binary, binary) - commands.getoutput(cmd) - cmd = 'find %s/%s.app -name .svn -prune -exec rm -rf {} \;'%(installdir, binary) - commands.getoutput(cmd) - cmd = 'find %s/%s.app -name .DS_Store -exec rm -rf {} \;'%(installdir, binary) - commands.getoutput(cmd) - cmd = 'find %s/%s.app -name __MACOSX -exec rm -rf {} \;'%(installdir, binary) - commands.getoutput(cmd) + import shutil + import commands + import os.path + + + a = '%s' % (target[0]) + builddir, b = os.path.split(a) + libdir = env['LCGDIR'][1:] + osxarch = env['MACOSX_ARCHITECTURE'] + installdir = env['BF_INSTALLDIR'] + print("compiled architecture: %s"%(osxarch)) + print("Installing to %s"%(installdir)) + python_zip = 'python_' + osxarch + '.zip' # set specific python_arch.zip + print("unzipping to app-bundle: %s"%(python_zip)) + bldroot = env.Dir('.').abspath + binary = env['BINARYKIND'] + + if b=='verse': + print bc.OKBLUE+"no bundle for verse"+bc.ENDC + return 0 + + sourcedir = bldroot + '/source/darwin/%s.app'%binary + sourceinfo = bldroot + "/source/darwin/%s.app/Contents/Info.plist"%binary + targetinfo = installdir +'/' + "%s.app/Contents/Info.plist"%binary + cmd = installdir + '/' +'%s.app'%binary + + if os.path.isdir(cmd): + shutil.rmtree(cmd) + shutil.copytree(sourcedir, cmd) + cmd = "cat %s | sed s/VERSION/`cat release/VERSION`/ | sed s/DATE/`date +'%%Y-%%b-%%d'`/ > %s"%(sourceinfo,targetinfo) + commands.getoutput(cmd) + cmd = 'cp %s/%s %s/%s.app/Contents/MacOS/%s'%(builddir, binary,installdir, binary, binary) + commands.getoutput(cmd) + cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/'%(installdir, binary, VERSION) +# print cmd + commands.getoutput(cmd) + cmd = installdir + '/%s.app/Contents/MacOS/%s'%(binary,VERSION) + shutil.copy(bldroot + '/release/bin/.blender/.bfont.ttf', cmd) + shutil.copy(bldroot + '/release/bin/.blender/.Blanguages', cmd) + cmd = 'cp -R %s/release/bin/%s/locale %s/%s.app/Contents/Resources/'%(bldroot,VERSION,installdir,binary) + commands.getoutput(cmd) + cmd = 'cp -R %s/release/bin/%s/locale %s/%s.app/Contents/MacOS/%s/'%(bldroot,VERSION,installdir,binary,VERSION) + commands.getoutput(cmd) + cmd = 'cp %s/release/bin/%s/.Blanguages %s/%s.app/Contents/Resources/'%(bldroot,VERSION,installdir,binary) + commands.getoutput(cmd) + cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(installdir,binary, VERSION) + commands.getoutput(cmd) + cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,installdir,binary,VERSION) + commands.getoutput(cmd) + cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION) + commands.getoutput(cmd) + cmd = 'cp -R %s/release/ui %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION) + commands.getoutput(cmd) + cmd = 'cp -R %s/release/io %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION) + commands.getoutput(cmd) + cmd = 'chmod +x %s/%s.app/Contents/MacOS/%s'%(installdir,binary, binary) + commands.getoutput(cmd) + cmd = 'find %s/%s.app -name .svn -prune -exec rm -rf {} \;'%(installdir, binary) + commands.getoutput(cmd) + cmd = 'find %s/%s.app -name .DS_Store -exec rm -rf {} \;'%(installdir, binary) + commands.getoutput(cmd) + cmd = 'find %s/%s.app -name __MACOSX -exec rm -rf {} \;'%(installdir, binary) + commands.getoutput(cmd) # extract copy system python, be sure to update other build systems # when making changes to the files that are copied. def my_unixpybundle_print(target, source, env): - pass + pass def UnixPyBundle(target=None, source=None, env=None): - # Any Unix except osx - #-- VERSION/python/lib/python3.1 - - import commands - - def run(cmd): - print 'Install command:', cmd - commands.getoutput(cmd) + # Any Unix except osx + #-- VERSION/python/lib/python3.1 + + import commands + + def run(cmd): + print 'Install command:', cmd + commands.getoutput(cmd) - dir = os.path.join(env['BF_INSTALLDIR'], VERSION) + dir = os.path.join(env['BF_INSTALLDIR'], VERSION) - py_src = env.subst( env['BF_PYTHON_LIBPATH'] + '/python'+env['BF_PYTHON_VERSION'] ) - py_target = env.subst( dir + '/python/lib/python'+env['BF_PYTHON_VERSION'] ) - - # This is a bit weak, but dont install if its been installed before, makes rebuilds quite slow. - if os.path.exists(py_target): - print 'Using existing python from:' - print '\t"%s"' % py_target - print '\t(skipping copy)\n' - return - - - # Copied from source/creator/CMakeLists.txt, keep in sync. - print 'Install python from:' - print '\t"%s" into...' % py_src - print '\t"%s"\n' % py_target - - run('rm -rf "%s"' % py_target) - try: os.makedirs(os.path.dirname(py_target)) # the final part is copied - except:pass - - run('cp -R "%s" "%s"' % (py_src, os.path.dirname(py_target))) - run('rm -rf "%s/distutils"' % py_target) - run('rm -rf "%s/lib2to3"' % py_target) - run('rm -rf "%s/idlelib"' % py_target) - run('rm -rf "%s/tkinter"' % py_target) - run('rm -rf "%s/config"' % py_target) + py_src = env.subst( env['BF_PYTHON_LIBPATH'] + '/python'+env['BF_PYTHON_VERSION'] ) + py_target = env.subst( dir + '/python/lib/python'+env['BF_PYTHON_VERSION'] ) + + # This is a bit weak, but dont install if its been installed before, makes rebuilds quite slow. + if os.path.exists(py_target): + print 'Using existing python from:' + print '\t"%s"' % py_target + print '\t(skipping copy)\n' + return + + + # Copied from source/creator/CMakeLists.txt, keep in sync. + print 'Install python from:' + print '\t"%s" into...' % py_src + print '\t"%s"\n' % py_target + + run('rm -rf "%s"' % py_target) + try: os.makedirs(os.path.dirname(py_target)) # the final part is copied + except:pass + + run('cp -R "%s" "%s"' % (py_src, os.path.dirname(py_target))) + run('rm -rf "%s/distutils"' % py_target) + run('rm -rf "%s/lib2to3"' % py_target) + run('rm -rf "%s/idlelib"' % py_target) + run('rm -rf "%s/tkinter"' % py_target) + run('rm -rf "%s/config"' % py_target) - run('rm -rf "%s/site-packages"' % py_target) - run('mkdir "%s/site-packages"' % py_target) # python needs it.' + run('rm -rf "%s/site-packages"' % py_target) + run('mkdir "%s/site-packages"' % py_target) # python needs it.' - run('rm -f "%s/lib-dynload/_tkinter.so"' % py_target) - run('find "%s" -name "test" -prune -exec rm -rf {} \;' % py_target) - run('find "%s" -name "*.py?" -exec rm -rf {} \;' % py_target) - run('find "%s" -name "*.so"-exec strip -s {} \;' % py_target) + run('rm -f "%s/lib-dynload/_tkinter.so"' % py_target) + run('find "%s" -name "test" -prune -exec rm -rf {} \;' % py_target) + run('find "%s" -name "*.py?" -exec rm -rf {} \;' % py_target) + run('find "%s" -name "*.so"-exec strip -s {} \;' % py_target) #### END ACTION STUFF ######### def bsc(env, target, source): - - bd = os.path.dirname(target[0].abspath) - bscfile = '\"'+target[0].abspath+'\"' - bscpathcollect = '\"'+bd + os.sep + '*.sbr\"' - bscpathtmp = '\"'+bd + os.sep + 'bscmake.tmp\"' + + bd = os.path.dirname(target[0].abspath) + bscfile = '\"'+target[0].abspath+'\"' + bscpathcollect = '\"'+bd + os.sep + '*.sbr\"' + bscpathtmp = '\"'+bd + os.sep + 'bscmake.tmp\"' - os.system('dir /b/s '+bscpathcollect+' >'+bscpathtmp) + os.system('dir /b/s '+bscpathcollect+' >'+bscpathtmp) - myfile = open(bscpathtmp[1:-1], 'r') - lines = myfile.readlines() - myfile.close() + myfile = open(bscpathtmp[1:-1], 'r') + lines = myfile.readlines() + myfile.close() - newfile = open(bscpathtmp[1:-1], 'w') - for l in lines: - newfile.write('\"'+l[:-1]+'\"\n') - newfile.close() - - os.system('bscmake /nologo /n /o'+bscfile+' @'+bscpathtmp) - os.system('del '+bscpathtmp) + newfile = open(bscpathtmp[1:-1], 'w') + for l in lines: + newfile.write('\"'+l[:-1]+'\"\n') + newfile.close() + + os.system('bscmake /nologo /n /o'+bscfile+' @'+bscpathtmp) + os.system('del '+bscpathtmp) class BlenderEnvironment(SConsEnvironment): - def BlenderRes(self=None, libname=None, source=None, libtype=['core'], priority=[100]): - global libs - if not self or not libname or not source: - print bc.FAIL+'Cannot continue. Missing argument for BlenderRes '+libname+bc.ENDC - self.Exit() - if self['OURPLATFORM'] not in ('win32-vc','win32-mingw','linuxcross', 'win64-vc'): - print bc.FAIL+'BlenderRes is for windows only!'+bc.END - self.Exit() - - print bc.HEADER+'Configuring resource '+bc.ENDC+bc.OKGREEN+libname+bc.ENDC - lenv = self.Clone() - if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'): - res = lenv.RES('#'+root_build_dir+'lib/'+libname, source) - else: - res = lenv.RES(root_build_dir+'lib/'+libname, source) + def BlenderRes(self=None, libname=None, source=None, libtype=['core'], priority=[100]): + global libs + if not self or not libname or not source: + print bc.FAIL+'Cannot continue. Missing argument for BlenderRes '+libname+bc.ENDC + self.Exit() + if self['OURPLATFORM'] not in ('win32-vc','win32-mingw','linuxcross', 'win64-vc'): + print bc.FAIL+'BlenderRes is for windows only!'+bc.END + self.Exit() + + print bc.HEADER+'Configuring resource '+bc.ENDC+bc.OKGREEN+libname+bc.ENDC + lenv = self.Clone() + if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'): + res = lenv.RES('#'+root_build_dir+'lib/'+libname, source) + else: + res = lenv.RES(root_build_dir+'lib/'+libname, source) - - SConsEnvironment.Default(self, res) - resources.append(res) + + SConsEnvironment.Default(self, res) + resources.append(res) - def BlenderLib(self=None, libname=None, sources=None, includes=[], defines=[], libtype='common', priority = 100, compileflags=None, cc_compileflags=None, cxx_compileflags=None): - global vcp - if not self or not libname or not sources: - print bc.FAIL+'Cannot continue. Missing argument for BuildBlenderLib '+libname+bc.ENDC - self.Exit() + def BlenderLib(self=None, libname=None, sources=None, includes=[], defines=[], libtype='common', priority = 100, compileflags=None, cc_compileflags=None, cxx_compileflags=None): + global vcp + if not self or not libname or not sources: + print bc.FAIL+'Cannot continue. Missing argument for BuildBlenderLib '+libname+bc.ENDC + self.Exit() - def list_substring(quickie, libname): - for q in quickie: - if libname.find(q) != -1: - return True - return False + def list_substring(quickie, libname): + for q in quickie: + if libname.find(q) != -1: + return True + return False - if list_substring(quickie, libname) or len(quickie)==0: - if list_substring(quickdebug, libname): - print bc.HEADER+'Configuring library '+bc.ENDC+bc.OKGREEN+libname +bc.ENDC+bc.OKBLUE+ " (debug mode)" + bc.ENDC - else: - print bc.HEADER+'Configuring library '+bc.ENDC+bc.OKGREEN+libname + bc.ENDC - lenv = self.Clone() - lenv.Append(CPPPATH=includes) - lenv.Append(CPPDEFINES=defines) - if lenv['BF_DEBUG'] or (libname in quickdebug): - lenv.Append(CFLAGS = lenv['BF_DEBUG_CFLAGS']) - lenv.Append(CCFLAGS = lenv['BF_DEBUG_CCFLAGS']) - lenv.Append(CXXFLAGS = lenv['BF_DEBUG_CXXFLAGS']) - else: - lenv.Append(CFLAGS = lenv['REL_CFLAGS']) - lenv.Append(CCFLAGS = lenv['REL_CCFLAGS']) - lenv.Append(CXXFLAGS = lenv['REL_CXXFLAGS']) - if lenv['BF_PROFILE']: - lenv.Append(CFLAGS = lenv['BF_PROFILE_CFLAGS']) - lenv.Append(CCFLAGS = lenv['BF_PROFILE_CCFLAGS']) - lenv.Append(CXXFLAGS = lenv['BF_PROFILE_CXXFLAGS']) - if compileflags: - lenv.Replace(CFLAGS = compileflags) - if cc_compileflags: - lenv.Replace(CCFLAGS = cc_compileflags) - if cxx_compileflags: - lenv.Replace(CXXFLAGS = cxx_compileflags) - lenv.Append(CFLAGS = lenv['C_WARN']) - lenv.Append(CCFLAGS = lenv['CC_WARN']) - lenv.Append(CXXFLAGS = lenv['CXX_WARN']) + if list_substring(quickie, libname) or len(quickie)==0: + if list_substring(quickdebug, libname): + print bc.HEADER+'Configuring library '+bc.ENDC+bc.OKGREEN+libname +bc.ENDC+bc.OKBLUE+ " (debug mode)" + bc.ENDC + else: + print bc.HEADER+'Configuring library '+bc.ENDC+bc.OKGREEN+libname + bc.ENDC + lenv = self.Clone() + lenv.Append(CPPPATH=includes) + lenv.Append(CPPDEFINES=defines) + if lenv['BF_DEBUG'] or (libname in quickdebug): + lenv.Append(CFLAGS = lenv['BF_DEBUG_CFLAGS']) + lenv.Append(CCFLAGS = lenv['BF_DEBUG_CCFLAGS']) + lenv.Append(CXXFLAGS = lenv['BF_DEBUG_CXXFLAGS']) + else: + lenv.Append(CFLAGS = lenv['REL_CFLAGS']) + lenv.Append(CCFLAGS = lenv['REL_CCFLAGS']) + lenv.Append(CXXFLAGS = lenv['REL_CXXFLAGS']) + if lenv['BF_PROFILE']: + lenv.Append(CFLAGS = lenv['BF_PROFILE_CFLAGS']) + lenv.Append(CCFLAGS = lenv['BF_PROFILE_CCFLAGS']) + lenv.Append(CXXFLAGS = lenv['BF_PROFILE_CXXFLAGS']) + if compileflags: + lenv.Replace(CFLAGS = compileflags) + if cc_compileflags: + lenv.Replace(CCFLAGS = cc_compileflags) + if cxx_compileflags: + lenv.Replace(CXXFLAGS = cxx_compileflags) + lenv.Append(CFLAGS = lenv['C_WARN']) + lenv.Append(CCFLAGS = lenv['CC_WARN']) + lenv.Append(CXXFLAGS = lenv['CXX_WARN']) - if lenv['OURPLATFORM'] == 'win64-vc': - lenv.Append(LINKFLAGS = ['/MACHINE:X64']) + if lenv['OURPLATFORM'] == 'win64-vc': + lenv.Append(LINKFLAGS = ['/MACHINE:X64']) - if lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc'): - if lenv['BF_DEBUG']: - lenv.Append(CCFLAGS = ['/MTd']) - else: - lenv.Append(CCFLAGS = ['/MT']) - - targetdir = root_build_dir+'lib/' + libname - if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'): - targetdir = '#'+targetdir - lib = lenv.Library(target= targetdir, source=sources) - SConsEnvironment.Default(self, lib) # we add to default target, because this way we get some kind of progress info during build - if self['BF_MSVS'] and self['OURPLATFORM'] in ('win32-vc', 'win64-vc'): - #if targetdir[0] == '#': - # targetdir = targetdir[1:-1] - print "! ",targetdir+ '.vcproj' # + self['MSVSPROJECTSUFFIX'] - vcproject = self.MSVSProject(target = targetdir + '.vcproj', # + self['MSVSPROJECTSUFFIX'], - srcs = sources, - buildtarget = lib, - variant = 'Release', - auto_build_solution=0) - vcp.append(vcproject) - SConsEnvironment.Default(self, vcproject) - else: - print bc.WARNING+'Not building '+bc.ENDC+bc.OKGREEN+libname+bc.ENDC+' for '+bc.OKBLUE+'BF_QUICK'+bc.ENDC - # note: libs is a global - add_lib_to_dict(self, libs, libtype, libname, priority) + if lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc'): + if lenv['BF_DEBUG']: + lenv.Append(CCFLAGS = ['/MTd']) + else: + lenv.Append(CCFLAGS = ['/MT']) + + targetdir = root_build_dir+'lib/' + libname + if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'): + targetdir = '#'+targetdir + lib = lenv.Library(target= targetdir, source=sources) + SConsEnvironment.Default(self, lib) # we add to default target, because this way we get some kind of progress info during build + if self['BF_MSVS'] and self['OURPLATFORM'] in ('win32-vc', 'win64-vc'): + #if targetdir[0] == '#': + # targetdir = targetdir[1:-1] + print "! ",targetdir+ '.vcproj' # + self['MSVSPROJECTSUFFIX'] + vcproject = self.MSVSProject(target = targetdir + '.vcproj', # + self['MSVSPROJECTSUFFIX'], + srcs = sources, + buildtarget = lib, + variant = 'Release', + auto_build_solution=0) + vcp.append(vcproject) + SConsEnvironment.Default(self, vcproject) + else: + print bc.WARNING+'Not building '+bc.ENDC+bc.OKGREEN+libname+bc.ENDC+' for '+bc.OKBLUE+'BF_QUICK'+bc.ENDC + # note: libs is a global + add_lib_to_dict(self, libs, libtype, libname, priority) - def BlenderProg(self=None, builddir=None, progname=None, sources=None, libs=None, libpath=None, binarykind=''): - global vcp - print bc.HEADER+'Configuring program '+bc.ENDC+bc.OKGREEN+progname+bc.ENDC - lenv = self.Clone() - if lenv['OURPLATFORM'] in ('win32-vc', 'cygwin', 'win64-vc'): - lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS']) - lenv.Append(LINKFLAGS = ['/FORCE:MULTIPLE']) - if lenv['BF_DEBUG']: - lenv.Prepend(LINKFLAGS = ['/DEBUG','/PDB:'+progname+'.pdb']) - if lenv['OURPLATFORM']=='linux2': - lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS']) - if lenv['WITH_BF_PYTHON']: - lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS']) - if lenv['OURPLATFORM']=='sunos5': - lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS']) - if lenv['WITH_BF_PYTHON']: - lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS']) - if lenv['CXX'].endswith('CC'): - lenv.Replace(LINK = '$CXX') - if lenv['OURPLATFORM']=='darwin': - lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS']) - if lenv['WITH_BF_PYTHON']: - lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS']) - lenv.Append(LINKFLAGS = lenv['BF_OPENGL_LINKFLAGS']) - if lenv['BF_PROFILE']: - lenv.Append(LINKFLAGS = lenv['BF_PROFILE_LINKFLAGS']) - if root_build_dir[0]==os.sep or root_build_dir[1]==':': - lenv.Append(LIBPATH=root_build_dir + '/lib') - lenv.Append(LIBPATH=libpath) - lenv.Append(LIBS=libs) - if lenv['WITH_BF_QUICKTIME']: - lenv.Append(LIBS = lenv['BF_QUICKTIME_LIB']) - lenv.Append(LIBPATH = lenv['BF_QUICKTIME_LIBPATH']) - prog = lenv.Program(target=builddir+'bin/'+progname, source=sources) - if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc') and lenv['BF_BSC']: - f = lenv.File(progname + '.bsc', builddir) - brs = lenv.Command(f, prog, [bsc]) - SConsEnvironment.Default(self, brs) - SConsEnvironment.Default(self, prog) - if self['BF_MSVS'] and self['OURPLATFORM'] in ('win32-vc', 'win64-vc') and progname == 'blender': - print "! ",builddir + "/" + progname + '.sln' - sln = self.MSVSProject(target = builddir + "/" + progname + '.sln', - projects= vcp, - variant = 'Release') - SConsEnvironment.Default(self, sln) - program_list.append(prog) - if lenv['OURPLATFORM']=='darwin': - lenv['BINARYKIND'] = binarykind - lenv.AddPostAction(prog,Action(AppIt,strfunction=my_appit_print)) - elif os.sep == '/' and lenv['OURPLATFORM'] != 'linuxcross': # any unix (except cross-compilation) - if lenv['WITH_BF_PYTHON']: - if not lenv['WITHOUT_BF_INSTALL'] and not lenv['WITHOUT_BF_PYTHON_INSTALL']: - lenv.AddPostAction(prog,Action(UnixPyBundle,strfunction=my_unixpybundle_print)) - elif lenv['OURPLATFORM'].startswith('win') or lenv['OURPLATFORM'] == 'linuxcross': # windows or cross-compilation - if lenv['WITH_BF_PYTHON']: - if not lenv['WITHOUT_BF_PYTHON_INSTALL']: - lenv.AddPostAction(prog,Action(WinPyBundle,strfunction=my_winpybundle_print)) - return prog + def BlenderProg(self=None, builddir=None, progname=None, sources=None, libs=None, libpath=None, binarykind=''): + global vcp + print bc.HEADER+'Configuring program '+bc.ENDC+bc.OKGREEN+progname+bc.ENDC + lenv = self.Clone() + if lenv['OURPLATFORM'] in ('win32-vc', 'cygwin', 'win64-vc'): + lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS']) + lenv.Append(LINKFLAGS = ['/FORCE:MULTIPLE']) + if lenv['BF_DEBUG']: + lenv.Prepend(LINKFLAGS = ['/DEBUG','/PDB:'+progname+'.pdb']) + if lenv['OURPLATFORM']=='linux2': + lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS']) + if lenv['WITH_BF_PYTHON']: + lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS']) + if lenv['OURPLATFORM']=='sunos5': + lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS']) + if lenv['WITH_BF_PYTHON']: + lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS']) + if lenv['CXX'].endswith('CC'): + lenv.Replace(LINK = '$CXX') + if lenv['OURPLATFORM']=='darwin': + lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS']) + if lenv['WITH_BF_PYTHON']: + lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS']) + lenv.Append(LINKFLAGS = lenv['BF_OPENGL_LINKFLAGS']) + if lenv['BF_PROFILE']: + lenv.Append(LINKFLAGS = lenv['BF_PROFILE_LINKFLAGS']) + if root_build_dir[0]==os.sep or root_build_dir[1]==':': + lenv.Append(LIBPATH=root_build_dir + '/lib') + lenv.Append(LIBPATH=libpath) + lenv.Append(LIBS=libs) + if lenv['WITH_BF_QUICKTIME']: + lenv.Append(LIBS = lenv['BF_QUICKTIME_LIB']) + lenv.Append(LIBPATH = lenv['BF_QUICKTIME_LIBPATH']) + prog = lenv.Program(target=builddir+'bin/'+progname, source=sources) + if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc') and lenv['BF_BSC']: + f = lenv.File(progname + '.bsc', builddir) + brs = lenv.Command(f, prog, [bsc]) + SConsEnvironment.Default(self, brs) + SConsEnvironment.Default(self, prog) + if self['BF_MSVS'] and self['OURPLATFORM'] in ('win32-vc', 'win64-vc') and progname == 'blender': + print "! ",builddir + "/" + progname + '.sln' + sln = self.MSVSProject(target = builddir + "/" + progname + '.sln', + projects= vcp, + variant = 'Release') + SConsEnvironment.Default(self, sln) + program_list.append(prog) + if lenv['OURPLATFORM']=='darwin': + lenv['BINARYKIND'] = binarykind + lenv.AddPostAction(prog,Action(AppIt,strfunction=my_appit_print)) + elif os.sep == '/' and lenv['OURPLATFORM'] != 'linuxcross': # any unix (except cross-compilation) + if lenv['WITH_BF_PYTHON']: + if not lenv['WITHOUT_BF_INSTALL'] and not lenv['WITHOUT_BF_PYTHON_INSTALL']: + lenv.AddPostAction(prog,Action(UnixPyBundle,strfunction=my_unixpybundle_print)) + elif lenv['OURPLATFORM'].startswith('win') or lenv['OURPLATFORM'] == 'linuxcross': # windows or cross-compilation + if lenv['WITH_BF_PYTHON']: + if not lenv['WITHOUT_BF_PYTHON_INSTALL']: + lenv.AddPostAction(prog,Action(WinPyBundle,strfunction=my_winpybundle_print)) + return prog - def Glob(lenv, pattern): - path = string.replace(GetBuildPath(lenv,'SConscript'),'SConscript', '') - files = [] - for i in glob.glob(path + pattern): - files.append(string.replace(i, path, '')) - return files + def Glob(lenv, pattern): + path = string.replace(GetBuildPath(lenv,'SConscript'),'SConscript', '') + files = [] + for i in glob.glob(path + pattern): + files.append(string.replace(i, path, '')) + return files diff --git a/extern/SConscript b/extern/SConscript index e91fafbeaf7..22c7dc23dce 100644 --- a/extern/SConscript +++ b/extern/SConscript @@ -17,7 +17,7 @@ if env['OURPLATFORM'] == 'linux2': SConscript(['binreloc/SConscript']); if env['WITH_BF_LZO']: - SConscript(['lzo/SConscript']) + SConscript(['lzo/SConscript']) if env['WITH_BF_LZMA']: - SConscript(['lzma/SConscript']) + SConscript(['lzma/SConscript']) diff --git a/extern/libopenjpeg/SConscript b/extern/libopenjpeg/SConscript index da661739783..f5c1f4f48ba 100644 --- a/extern/libopenjpeg/SConscript +++ b/extern/libopenjpeg/SConscript @@ -11,15 +11,15 @@ flags = [] defs = [] if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): - flags = [] - defs.append('OPJ_STATIC') + flags = [] + defs.append('OPJ_STATIC') else: - flags = ['-Wall', '-O3', '-ffast-math', '-std=c99'] + flags = ['-Wall', '-O3', '-ffast-math', '-std=c99'] oj_env = env.Clone() if not env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): - oj_env.Replace(CCFLAGS = '') - oj_env.Replace(BF_DEBUG_FLAGS = '') + oj_env.Replace(CCFLAGS = '') + oj_env.Replace(BF_DEBUG_FLAGS = '') oj_env.BlenderLib ( libname='extern_openjpeg', sources=sources, includes=Split(incs), diff --git a/intern/audaspace/SConscript b/intern/audaspace/SConscript index 045ae5dc83b..7230bffebdc 100644 --- a/intern/audaspace/SConscript +++ b/intern/audaspace/SConscript @@ -7,40 +7,40 @@ incs = '. intern FX SRC ' + env['BF_PTHREADS_INC'] + ' ' + env['BF_LIBSAMPLERATE defs = [] if env['WITH_BF_FFMPEG']: - sources += env.Glob('ffmpeg/*.cpp') - incs += ' ffmpeg ' + env['BF_FFMPEG_INC'] - defs.append('WITH_FFMPEG') + sources += env.Glob('ffmpeg/*.cpp') + incs += ' ffmpeg ' + env['BF_FFMPEG_INC'] + defs.append('WITH_FFMPEG') if env['WITH_BF_SDL']: - sources += env.Glob('SDL/*.cpp') - incs += ' SDL ' + env['BF_SDL_INC'] - defs.append('WITH_SDL') + sources += env.Glob('SDL/*.cpp') + incs += ' SDL ' + env['BF_SDL_INC'] + defs.append('WITH_SDL') if env['WITH_BF_OPENAL']: - sources += env.Glob('OpenAL/*.cpp') - incs += ' OpenAL ' + env['BF_OPENAL_INC'] - defs.append('WITH_OPENAL') + sources += env.Glob('OpenAL/*.cpp') + incs += ' OpenAL ' + env['BF_OPENAL_INC'] + defs.append('WITH_OPENAL') if env['WITH_BF_JACK']: - sources += env.Glob('jack/*.cpp') - incs += ' jack ' + env['BF_JACK_INC'] - defs.append('WITH_JACK') + sources += env.Glob('jack/*.cpp') + incs += ' jack ' + env['BF_JACK_INC'] + defs.append('WITH_JACK') if env['WITH_BF_SNDFILE']: - sources += env.Glob('sndfile/*.cpp') - incs += ' sndfile ' + env['BF_SNDFILE_INC'] - defs.append('WITH_SNDFILE') + sources += env.Glob('sndfile/*.cpp') + incs += ' sndfile ' + env['BF_SNDFILE_INC'] + defs.append('WITH_SNDFILE') #if env['WITH_BF_FFTW3']: -# sources += env.Glob('fftw/*.cpp') -# incs += ' fftw ' + env['BF_FFTW3_INC'] -# defs.append('WITH_FFTW3') +# sources += env.Glob('fftw/*.cpp') +# incs += ' fftw ' + env['BF_FFTW3_INC'] +# defs.append('WITH_FFTW3') if env['WITH_BF_PYTHON']: - sources += env.Glob('Python/*.cpp') - incs += ' Python ' + env['BF_PYTHON_INC'] + sources += env.Glob('Python/*.cpp') + incs += ' Python ' + env['BF_PYTHON_INC'] else: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): incs += ' ' + env['BF_PTHREADS_INC'] diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript index 2e2e19bf01f..93c8ebb5202 100644 --- a/intern/ghost/SConscript +++ b/intern/ghost/SConscript @@ -8,56 +8,56 @@ window_system = env['OURPLATFORM'] sources = env.Glob('intern/*.cpp') if window_system == 'darwin': - sources += env.Glob('intern/*.mm') + sources += env.Glob('intern/*.mm') pf = ['GHOST_DisplayManager', 'GHOST_System', 'GHOST_Window', 'GHOST_DropTarget'] defs=['_USE_MATH_DEFINES'] if window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'freebsd9', 'irix6', 'aix4', 'aix5'): - for f in pf: - try: - sources.remove('intern' + os.sep + f + 'Win32.cpp') - sources.remove('intern' + os.sep + f + 'Carbon.cpp') - except ValueError: - pass + for f in pf: + try: + sources.remove('intern' + os.sep + f + 'Win32.cpp') + sources.remove('intern' + os.sep + f + 'Carbon.cpp') + except ValueError: + pass elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'): - for f in pf: - try: - sources.remove('intern' + os.sep + f + 'X11.cpp') - sources.remove('intern' + os.sep + f + 'Carbon.cpp') - except ValueError: - pass + for f in pf: + try: + sources.remove('intern' + os.sep + f + 'X11.cpp') + sources.remove('intern' + os.sep + f + 'Carbon.cpp') + except ValueError: + pass elif window_system == 'darwin': - if env['WITH_GHOST_COCOA']: - if env['WITH_BF_QUICKTIME']: - defs.append('WITH_QUICKTIME') - if env['USE_QTKIT']: - defs.append('USE_QTKIT') - for f in pf: - try: - sources.remove('intern' + os.sep + f + 'Win32.cpp') - sources.remove('intern' + os.sep + f + 'X11.cpp') - sources.remove('intern' + os.sep + f + 'Carbon.cpp') - except ValueError: - pass - else: - for f in pf: - try: - sources.remove('intern' + os.sep + f + 'Win32.cpp') - sources.remove('intern' + os.sep + f + 'X11.cpp') - sources.remove('intern' + os.sep + f + 'Cocoa.mm') - except ValueError: - pass + if env['WITH_GHOST_COCOA']: + if env['WITH_BF_QUICKTIME']: + defs.append('WITH_QUICKTIME') + if env['USE_QTKIT']: + defs.append('USE_QTKIT') + for f in pf: + try: + sources.remove('intern' + os.sep + f + 'Win32.cpp') + sources.remove('intern' + os.sep + f + 'X11.cpp') + sources.remove('intern' + os.sep + f + 'Carbon.cpp') + except ValueError: + pass + else: + for f in pf: + try: + sources.remove('intern' + os.sep + f + 'Win32.cpp') + sources.remove('intern' + os.sep + f + 'X11.cpp') + sources.remove('intern' + os.sep + f + 'Cocoa.mm') + except ValueError: + pass else: - print "Unknown window system specified." - Exit() + print "Unknown window system specified." + Exit() if env['BF_GHOST_DEBUG']: - defs.append('BF_GHOST_DEBUG') + defs.append('BF_GHOST_DEBUG') incs = '. ../string #extern/glew/include #source/blender/imbuf #source/blender/makesdna ' + env['BF_OPENGL_INC'] if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'): - incs = env['BF_WINTAB_INC'] + ' ' + incs + incs = env['BF_WINTAB_INC'] + ' ' + incs env.BlenderLib ('bf_intern_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15] ) \ No newline at end of file diff --git a/source/SConscript b/source/SConscript index 3944a3c6df5..c452f21b8e2 100644 --- a/source/SConscript +++ b/source/SConscript @@ -2,13 +2,13 @@ Import ('env') SConscript(['blender/SConscript', - 'kernel/SConscript', - 'creator/SConscript']) + 'kernel/SConscript', + 'creator/SConscript']) if env['WITH_BF_GAMEENGINE']: - SConscript (['gameengine/SConscript']) + SConscript (['gameengine/SConscript']) if env['WITH_BF_PLAYER']: - SConscript (['blenderplayer/bad_level_call_stubs/SConscript']) + SConscript (['blenderplayer/bad_level_call_stubs/SConscript']) if env['OURPLATFORM'] in ('win64-vc', 'win32-vc', 'win32-mingw', 'linuxcross'): - SConscript (['icons/SConscript']) + SConscript (['icons/SConscript']) diff --git a/source/blender/blenfont/SConscript b/source/blender/blenfont/SConscript index 34ffaa71c76..2763bea0da0 100644 --- a/source/blender/blenfont/SConscript +++ b/source/blender/blenfont/SConscript @@ -12,8 +12,8 @@ incs += ' ' + env['BF_GETTEXT_INC'] defs = [] if sys.platform == 'win32' or env['OURPLATFORM'] == 'linuxcross': - defs.append('_WIN32') - defs.append('USE_GETTEXT_DLL') + defs.append('_WIN32') + defs.append('USE_GETTEXT_DLL') if env['WITH_BF_INTERNATIONAL']: defs.append('INTERNATIONAL') diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript index 9f5027f801d..1e48f94f14d 100644 --- a/source/blender/blenkernel/SConscript +++ b/source/blender/blenkernel/SConscript @@ -20,68 +20,68 @@ incs += ' ' + env['BF_ZLIB_INC'] defs = [ 'GLEW_STATIC' ] if not env['WITH_BF_PYTHON']: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') else: - incs += ' ../python' - incs += ' ' + env['BF_PYTHON_INC'] - if env['BF_DEBUG']: - defs.append('_DEBUG') + incs += ' ../python' + incs += ' ' + env['BF_PYTHON_INC'] + if env['BF_DEBUG']: + defs.append('_DEBUG') if env['WITH_BF_QUICKTIME']: - incs += ' ../quicktime' + incs += ' ../quicktime' if env['WITH_BF_SDL']: - incs += ' ' + env['BF_SDL_INC'] + incs += ' ' + env['BF_SDL_INC'] else: - defs.append('DISABLE_SDL') + defs.append('DISABLE_SDL') if env['WITH_BF_OPENEXR']: - defs.append('WITH_OPENEXR') + defs.append('WITH_OPENEXR') if env['WITH_BF_TIFF']: - defs.append('WITH_TIFF') + defs.append('WITH_TIFF') if env['WITH_BF_OPENJPEG']: - defs.append('WITH_OPENJPEG') + defs.append('WITH_OPENJPEG') if env['WITH_BF_DDS']: - defs.append('WITH_DDS') + defs.append('WITH_DDS') if env['WITH_BF_CINEON']: - defs.append('WITH_CINEON') + defs.append('WITH_CINEON') if env['WITH_BF_HDR']: - defs.append('WITH_HDR') + defs.append('WITH_HDR') if env['WITH_BF_FFMPEG']: - defs.append('WITH_FFMPEG') - incs += ' ' + env['BF_FFMPEG_INC'] + defs.append('WITH_FFMPEG') + incs += ' ' + env['BF_FFMPEG_INC'] if env['WITH_BF_QUICKTIME']: - defs.append('WITH_QUICKTIME') - incs += ' ' + env['BF_QUICKTIME_INC'] + defs.append('WITH_QUICKTIME') + incs += ' ' + env['BF_QUICKTIME_INC'] if env['WITH_BF_BULLET']: - defs.append('USE_BULLET') + defs.append('USE_BULLET') if env['OURPLATFORM'] == 'darwin': if env['WITH_BF_OPENMP']: defs.append('PARALLEL=1') if env['BF_NO_ELBEEM']: - defs.append('DISABLE_ELBEEM') + defs.append('DISABLE_ELBEEM') if env['WITH_BF_LCMS']: - defs.append('WITH_LCMS') - incs += ' ' + env['BF_LCMS_INC'] + defs.append('WITH_LCMS') + incs += ' ' + env['BF_LCMS_INC'] if env['WITH_BF_LZO']: - incs += ' #/extern/lzo/minilzo' - defs.append('WITH_LZO') + incs += ' #/extern/lzo/minilzo' + defs.append('WITH_LZO') if env['WITH_BF_LZMA']: - incs += ' #/extern/lzma' - defs.append('WITH_LZMA') + incs += ' #/extern/lzma' + defs.append('WITH_LZMA') if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): incs += ' ' + env['BF_PTHREADS_INC'] diff --git a/source/blender/blenpluginapi/SConscript b/source/blender/blenpluginapi/SConscript index b310bcb95ec..680ae79f461 100644 --- a/source/blender/blenpluginapi/SConscript +++ b/source/blender/blenpluginapi/SConscript @@ -8,8 +8,8 @@ incs = '. .. #/intern/guardedalloc ../blenlib ../imbuf ../makesdna' defs = [] if env['WITH_BF_QUICKTIME']: - defs.append('WITH_QUICKTIME') - incs += ' ' + env['BF_QUICKTIME_INC'] + defs.append('WITH_QUICKTIME') + incs += ' ' + env['BF_QUICKTIME_INC'] if env['OURPLATFORM'] == 'linux2': cflags='-pthread' diff --git a/source/blender/collada/SConscript b/source/blender/collada/SConscript index 09402dcda64..e026f2fb022 100644 --- a/source/blender/collada/SConscript +++ b/source/blender/collada/SConscript @@ -32,11 +32,11 @@ defs = [] # relative paths to include dirs, space-separated, string if env['OURPLATFORM']=='darwin': - incs = '../blenlib ../blenkernel ../windowmanager ../makesdna ../makesrna ../editors/include ../../../intern/guardedalloc [OPENCOLLADA]/COLLADAStreamWriter [OPENCOLLADA]/COLLADABaseUtils [OPENCOLLADA]/COLLADAFramework [OPENCOLLADA]/COLLADASaxFrameworkLoader '.replace('[OPENCOLLADA]', env['BF_OPENCOLLADA_INC']) + incs = '../blenlib ../blenkernel ../windowmanager ../makesdna ../makesrna ../editors/include ../../../intern/guardedalloc [OPENCOLLADA]/COLLADAStreamWriter [OPENCOLLADA]/COLLADABaseUtils [OPENCOLLADA]/COLLADAFramework [OPENCOLLADA]/COLLADASaxFrameworkLoader '.replace('[OPENCOLLADA]', env['BF_OPENCOLLADA_INC']) else: - incs = '../blenlib ../blenkernel ../windowmanager ../makesdna ../makesrna ../editors/include ../../../intern/guardedalloc [OPENCOLLADA]/COLLADAStreamWriter/include [OPENCOLLADA]/COLLADABaseUtils/include [OPENCOLLADA]/COLLADAFramework/include [OPENCOLLADA]/COLLADASaxFrameworkLoader/include '.replace('[OPENCOLLADA]', env['BF_OPENCOLLADA_INC']) + incs = '../blenlib ../blenkernel ../windowmanager ../makesdna ../makesrna ../editors/include ../../../intern/guardedalloc [OPENCOLLADA]/COLLADAStreamWriter/include [OPENCOLLADA]/COLLADABaseUtils/include [OPENCOLLADA]/COLLADAFramework/include [OPENCOLLADA]/COLLADASaxFrameworkLoader/include '.replace('[OPENCOLLADA]', env['BF_OPENCOLLADA_INC']) if env['BF_BUILDINFO']: - defs.append('NAN_BUILDINFO') + defs.append('NAN_BUILDINFO') env.BlenderLib ('bf_collada', sources, Split(incs), defs, libtype='core', priority=200 ) diff --git a/source/blender/editors/SConscript b/source/blender/editors/SConscript index 226e9247f91..e8159bdf03f 100644 --- a/source/blender/editors/SConscript +++ b/source/blender/editors/SConscript @@ -3,38 +3,38 @@ Import ('env') SConscript(['datafiles/SConscript', - 'space_api/SConscript', - 'util/SConscript', - 'interface/SConscript', - 'animation/SConscript', - 'armature/SConscript', - 'mesh/SConscript', - 'metaball/SConscript', - 'object/SConscript', - 'curve/SConscript', - 'gpencil/SConscript', - 'physics/SConscript', - 'render/SConscript', - 'sound/SConscript', - 'space_buttons/SConscript', - 'space_file/SConscript', - 'space_image/SConscript', - 'space_info/SConscript', - 'space_graph/SConscript', - 'space_node/SConscript', - 'space_outliner/SConscript', - 'space_time/SConscript', - 'space_view3d/SConscript', - 'space_sound/SConscript', - 'space_action/SConscript', - 'space_nla/SConscript', - 'space_script/SConscript', - 'space_text/SConscript', - 'space_sequencer/SConscript', - 'space_logic/SConscript', - 'space_console/SConscript', - 'space_userpref/SConscript', - 'transform/SConscript', - 'screen/SConscript', - 'sculpt_paint/SConscript', - 'uvedit/SConscript']) + 'space_api/SConscript', + 'util/SConscript', + 'interface/SConscript', + 'animation/SConscript', + 'armature/SConscript', + 'mesh/SConscript', + 'metaball/SConscript', + 'object/SConscript', + 'curve/SConscript', + 'gpencil/SConscript', + 'physics/SConscript', + 'render/SConscript', + 'sound/SConscript', + 'space_buttons/SConscript', + 'space_file/SConscript', + 'space_image/SConscript', + 'space_info/SConscript', + 'space_graph/SConscript', + 'space_node/SConscript', + 'space_outliner/SConscript', + 'space_time/SConscript', + 'space_view3d/SConscript', + 'space_sound/SConscript', + 'space_action/SConscript', + 'space_nla/SConscript', + 'space_script/SConscript', + 'space_text/SConscript', + 'space_sequencer/SConscript', + 'space_logic/SConscript', + 'space_console/SConscript', + 'space_userpref/SConscript', + 'transform/SConscript', + 'screen/SConscript', + 'sculpt_paint/SConscript', + 'uvedit/SConscript']) diff --git a/source/blender/editors/interface/SConscript b/source/blender/editors/interface/SConscript index 09868345fc4..81964a661a4 100644 --- a/source/blender/editors/interface/SConscript +++ b/source/blender/editors/interface/SConscript @@ -4,7 +4,7 @@ Import ('env') sources = env.Glob('*.c') for source in env.Glob('*_api.c'): - sources.remove(source) + sources.remove(source) incs = '../include ../../blenlib ../../blenfont ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../makesrna ../../windowmanager #/intern/guardedalloc ../../gpu' @@ -17,6 +17,6 @@ if env['WITH_BF_INTERNATIONAL']: defs.append('INTERNATIONAL') if not env['WITH_BF_PYTHON']: - defs.append('DISABLE_PYTHON') - + defs.append('DISABLE_PYTHON') + env.BlenderLib ( 'bf_editors_interface', sources, Split(incs), defs, libtype=['core'], priority=[110] ) diff --git a/source/blender/editors/object/SConscript b/source/blender/editors/object/SConscript index 0a94de255cb..98085dd2fe5 100644 --- a/source/blender/editors/object/SConscript +++ b/source/blender/editors/object/SConscript @@ -18,6 +18,6 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): incs += ' ' + env['BF_PTHREADS_INC'] if not env['WITH_BF_PYTHON']: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') env.BlenderLib ( 'bf_editors_object', sources, Split(incs), defs, libtype=['core'], priority=[35] ) diff --git a/source/blender/editors/screen/SConscript b/source/blender/editors/screen/SConscript index 6efb2617a18..9049ac876df 100644 --- a/source/blender/editors/screen/SConscript +++ b/source/blender/editors/screen/SConscript @@ -11,10 +11,10 @@ incs += ' #/intern/guardedalloc #/extern/glew/include' defs = '' if env['OURPLATFORM'] == 'linux2': - cflags='-pthread' - incs += ' ../../../extern/binreloc/include' + cflags='-pthread' + incs += ' ../../../extern/binreloc/include' if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): - incs += ' ' + env['BF_PTHREADS_INC'] + incs += ' ' + env['BF_PTHREADS_INC'] env.BlenderLib ( 'bf_editors_screen', sources, Split(incs), Split(defs), libtype=['core'], priority=[105] ) diff --git a/source/blender/editors/sculpt_paint/SConscript b/source/blender/editors/sculpt_paint/SConscript index 3d9a5144c93..c694e826817 100644 --- a/source/blender/editors/sculpt_paint/SConscript +++ b/source/blender/editors/sculpt_paint/SConscript @@ -11,8 +11,8 @@ incs += ' ../../render/extern/include' incs += ' ../../gpu ../../makesrna' if env['OURPLATFORM'] == 'linux2': - cflags='-pthread' - incs += ' ../../../extern/binreloc/include' + cflags='-pthread' + incs += ' ../../../extern/binreloc/include' if env['OURPLATFORM'] == 'linuxcross': if env['WITH_BF_OPENMP']: diff --git a/source/blender/editors/space_console/SConscript b/source/blender/editors/space_console/SConscript index d50902446ba..087090a7740 100644 --- a/source/blender/editors/space_console/SConscript +++ b/source/blender/editors/space_console/SConscript @@ -5,19 +5,19 @@ sources = env.Glob('*.c') defs = [] incs = [ - '../include', - '#extern/glew/include', - '#/intern/guardedalloc', - '../../makesdna', - '../../makesrna', - '../../blenkernel', - '../../blenlib', - '../../windowmanager', - '../../blenfont', - '../../blenloader', + '../include', + '#extern/glew/include', + '#/intern/guardedalloc', + '../../makesdna', + '../../makesrna', + '../../blenkernel', + '../../blenlib', + '../../windowmanager', + '../../blenfont', + '../../blenloader', ] if not env['WITH_BF_PYTHON']: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') env.BlenderLib ( 'bf_editors_space_console', sources, incs, defs, libtype=['core'], priority=[95] ) diff --git a/source/blender/editors/space_file/SConscript b/source/blender/editors/space_file/SConscript index 9de705e99d3..7c55b40e816 100644 --- a/source/blender/editors/space_file/SConscript +++ b/source/blender/editors/space_file/SConscript @@ -14,10 +14,10 @@ if env['WITH_BF_OPENJPEG']: defs.append('WITH_OPENJPEG') if env['WITH_BF_OPENEXR']: - defs.append('WITH_OPENEXR') + defs.append('WITH_OPENEXR') if env['WITH_BF_TIFF']: - defs.append('WITH_TIFF') + defs.append('WITH_TIFF') if env['OURPLATFORM'] == 'linux2': cflags='-pthread' diff --git a/source/blender/editors/space_image/SConscript b/source/blender/editors/space_image/SConscript index 4e1918bc327..c7c31352185 100644 --- a/source/blender/editors/space_image/SConscript +++ b/source/blender/editors/space_image/SConscript @@ -10,12 +10,12 @@ incs += ' ../../render/extern/include ../../makesrna' defs = [] if env['WITH_BF_LCMS']: - defs.append('WITH_LCMS') - incs += ' ' + env['BF_LCMS_INC'] + defs.append('WITH_LCMS') + incs += ' ' + env['BF_LCMS_INC'] if env['WITH_BF_OPENEXR']: - defs.append('WITH_OPENEXR') + defs.append('WITH_OPENEXR') if env['WITH_BF_TIFF']: - defs.append('WITH_TIFF') + defs.append('WITH_TIFF') if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): incs += ' ' + env['BF_PTHREADS_INC'] diff --git a/source/blender/editors/space_logic/SConscript b/source/blender/editors/space_logic/SConscript index 307d229fb3f..0ce2eee575e 100644 --- a/source/blender/editors/space_logic/SConscript +++ b/source/blender/editors/space_logic/SConscript @@ -10,6 +10,6 @@ incs += ' ../../makesrna ../interface' defs = [] if env['WITH_BF_GAMEENGINE']: - defs.append('GAMEBLENDER=1') + defs.append('GAMEBLENDER=1') env.BlenderLib ( 'bf_editors_space_game', sources, Split(incs), defs, libtype=['core'], priority=[120] ) diff --git a/source/blender/editors/space_node/SConscript b/source/blender/editors/space_node/SConscript index fd0dfe83852..636b247d44c 100644 --- a/source/blender/editors/space_node/SConscript +++ b/source/blender/editors/space_node/SConscript @@ -9,17 +9,17 @@ incs += ' ../../windowmanager #intern/guardedalloc #extern/glew/include' defs = [] cf = [] if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): - #cf.append('/WX') - pass + #cf.append('/WX') + pass if env['CC'] == 'gcc': - #cf.append('-Werror') - pass + #cf.append('-Werror') + pass if env['OURPLATFORM'] == 'linux2': - cflags='-pthread' - incs += ' ../../../extern/binreloc/include' + cflags='-pthread' + incs += ' ../../../extern/binreloc/include' if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): - incs += ' ' + env['BF_PTHREADS_INC'] + incs += ' ' + env['BF_PTHREADS_INC'] env.BlenderLib ( 'bf_editors_space_node', sources, Split(incs), defs, libtype=['core'], priority=[55], compileflags=cf ) diff --git a/source/blender/editors/space_script/SConscript b/source/blender/editors/space_script/SConscript index a78f1a66762..f187df19117 100644 --- a/source/blender/editors/space_script/SConscript +++ b/source/blender/editors/space_script/SConscript @@ -11,6 +11,6 @@ incs += ' ../../python' defs = [] if not env['WITH_BF_PYTHON']: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') env.BlenderLib ( 'bf_editors_space_script', sources, Split(incs), defs, libtype=['core'], priority=[90] ) diff --git a/source/blender/editors/space_text/SConscript b/source/blender/editors/space_text/SConscript index 09ba961bfce..bd87a799756 100644 --- a/source/blender/editors/space_text/SConscript +++ b/source/blender/editors/space_text/SConscript @@ -8,6 +8,6 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../python ../../makesrna ../../blenfont' if not env['WITH_BF_PYTHON']: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') env.BlenderLib ( 'bf_editors_space_text', sources, Split(incs), defs, libtype=['core'], priority=[95] ) diff --git a/source/blender/editors/space_view3d/SConscript b/source/blender/editors/space_view3d/SConscript index 1d8e01f2b1b..d9074113ba9 100644 --- a/source/blender/editors/space_view3d/SConscript +++ b/source/blender/editors/space_view3d/SConscript @@ -12,8 +12,8 @@ incs += ' #/intern/smoke/extern' incs += ' #source/kernel/gen_system' if env['WITH_BF_GAMEENGINE']: - defs.append('GAMEBLENDER=1') + defs.append('GAMEBLENDER=1') if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): - incs += ' ' + env['BF_PTHREADS_INC'] + incs += ' ' + env['BF_PTHREADS_INC'] env.BlenderLib ( 'bf_editors_space_view3d', sources, Split(incs), defines = defs, libtype=['core'], priority=[40] ) diff --git a/source/blender/imbuf/SConscript b/source/blender/imbuf/SConscript index 6b3360a16c5..c5c08a2856a 100644 --- a/source/blender/imbuf/SConscript +++ b/source/blender/imbuf/SConscript @@ -45,7 +45,7 @@ if env['WITH_BF_REDCODE']: incs += ' ' + env['BF_REDCODE_INC'] if env['WITH_BF_QUICKTIME']: - incs += ' ../quicktime ' + env['BF_QUICKTIME_INC'] - defs.append('WITH_QUICKTIME') + incs += ' ../quicktime ' + env['BF_QUICKTIME_INC'] + defs.append('WITH_QUICKTIME') env.BlenderLib ( libname = 'bf_imbuf', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [185,115] ) diff --git a/source/blender/imbuf/intern/dds/SConscript b/source/blender/imbuf/intern/dds/SConscript index 0b7fd50e317..59509c88f03 100644 --- a/source/blender/imbuf/intern/dds/SConscript +++ b/source/blender/imbuf/intern/dds/SConscript @@ -4,14 +4,14 @@ Import ('env') source_files = ['dds_api.cpp', 'DirectDrawSurface.cpp', 'Stream.cpp', 'BlockDXT.cpp', 'ColorBlock.cpp', 'Image.cpp'] incs = ['.', - '../../', - '../..', - '..', - '../../../makesdna', - '../../../blenkernel', - '../../../blenlib', - 'intern/include', - '#/intern/guardedalloc'] + '../../', + '../..', + '..', + '../../../makesdna', + '../../../blenkernel', + '../../../blenlib', + 'intern/include', + '#/intern/guardedalloc'] defs = ['WITH_DDS'] diff --git a/source/blender/imbuf/intern/openexr/SConscript b/source/blender/imbuf/intern/openexr/SConscript index f504c503109..47f83868baa 100644 --- a/source/blender/imbuf/intern/openexr/SConscript +++ b/source/blender/imbuf/intern/openexr/SConscript @@ -4,13 +4,13 @@ Import ('env') source_files = ['openexr_api.cpp'] incs = ['.', - '../../../blenkernel', - '../../', - '..', - '../../../blenlib', - 'intern/include', - '#/intern/guardedalloc', - '../../../makesdna'] + '../../../blenkernel', + '../../', + '..', + '../../../blenlib', + 'intern/include', + '#/intern/guardedalloc', + '../../../makesdna'] incs += Split(env['BF_OPENEXR_INC']) defs = ['WITH_OPENEXR'] diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript index 78f5fcaba69..d4836631104 100644 --- a/source/blender/makesdna/intern/SConscript +++ b/source/blender/makesdna/intern/SConscript @@ -3,7 +3,7 @@ import sys import os def normpath(path): - return os.path.abspath(os.path.normpath(path)) + return os.path.abspath(os.path.normpath(path)) Import ('env') cflags = '' @@ -18,21 +18,21 @@ dna = env.Clone() makesdna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesdna/\\"" ') makesdna_tool.Append (CPPPATH = ['#/intern/guardedalloc', - '../../makesdna']) + '../../makesdna']) if env['OURPLATFORM'] == 'linuxcross': - USE_WINE = True # when cross compiling on linux 64bit this is useful + USE_WINE = True # when cross compiling on linux 64bit this is useful else: - USE_WINE = False + USE_WINE = False if not USE_WINE: - if env['OURPLATFORM'] == 'linuxcross': - makesdna_tool.Replace(CC='gcc') - makesdna_tool.Replace(AR='ar') - makesdna_tool.Replace(LINK='gcc') + if env['OURPLATFORM'] == 'linuxcross': + makesdna_tool.Replace(CC='gcc') + makesdna_tool.Replace(AR='ar') + makesdna_tool.Replace(LINK='gcc') if sys.platform != 'cygwin': - makesdna_tool.Append (CCFLAGS = cflags) + makesdna_tool.Append (CCFLAGS = cflags) makesdna_tool.Append (CPPDEFINES = defines) makesdna_tool.Append( CFLAGS = env['CFLAGS']) makesdna_tool.Append( CCFLAGS = env['CCFLAGS']) @@ -40,15 +40,15 @@ makesdna_tool.Append( LINKFLAGS = env['PLATFORM_LINKFLAGS']) targetdir = normpath(root_build_dir+'/lib') if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'): - targetdir = '#'+targetdir + targetdir = '#'+targetdir makesdna_tool.Append (LIBPATH = targetdir) if env['BF_PROFILE']: - makesdna_tool.Append (LINKFLAGS = env['BF_PROFILE_LINKFLAGS']) + makesdna_tool.Append (LINKFLAGS = env['BF_PROFILE_LINKFLAGS']) targetdir = normpath(root_build_dir + '/makesdna') if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'): - targetdir = '#' + targetdir + targetdir = '#' + targetdir makesdna = makesdna_tool.Program (target = targetdir, source = source_files, LIBS=['bf_intern_guardedalloc', 'bf_blenlib']) @@ -57,15 +57,15 @@ dna.Depends ('dna.c', makesdna) dna.Depends ('dna.c', header_files) if env['OURPLATFORM'] != 'linuxcross': - if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'): - dna.Command ('dna.c', '', "\"" + root_build_dir+os.sep+"makesdna\" $TARGET") - else: - dna.Command ('dna.c', '', "\"" + root_build_dir+os.sep+"makesdna\" $TARGET") + if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'): + dna.Command ('dna.c', '', "\"" + root_build_dir+os.sep+"makesdna\" $TARGET") + else: + dna.Command ('dna.c', '', "\"" + root_build_dir+os.sep+"makesdna\" $TARGET") else: - if USE_WINE: - dna.Command ('dna.c', '', 'wine ' + root_build_dir+os.sep+"makesdna $TARGET") - else: - dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET") + if USE_WINE: + dna.Command ('dna.c', '', 'wine ' + root_build_dir+os.sep+"makesdna $TARGET") + else: + dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET") obj = ['intern/dna.c', 'intern/dna_genfile.c'] Return ('obj') diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript index 7ac76c4d107..674aeb264c3 100644 --- a/source/blender/makesrna/SConscript +++ b/source/blender/makesrna/SConscript @@ -13,52 +13,52 @@ incs += ' ../render/extern/include' defs = [] if env['WITH_BF_OPENEXR']: - defs.append('WITH_OPENEXR') + defs.append('WITH_OPENEXR') if env['WITH_BF_TIFF']: - defs.append('WITH_TIFF') + defs.append('WITH_TIFF') if env['WITH_BF_OPENJPEG']: - defs.append('WITH_OPENJPEG') + defs.append('WITH_OPENJPEG') if env['WITH_BF_DDS']: - defs.append('WITH_DDS') + defs.append('WITH_DDS') if env['WITH_BF_CINEON']: - defs.append('WITH_CINEON') + defs.append('WITH_CINEON') if env['WITH_BF_HDR']: - defs.append('WITH_HDR') + defs.append('WITH_HDR') if env['WITH_BF_FFMPEG']: - defs.append('WITH_FFMPEG') - incs += ' ' + env['BF_FFMPEG_INC'] + defs.append('WITH_FFMPEG') + incs += ' ' + env['BF_FFMPEG_INC'] if env['WITH_BF_OGG']: - defs.append('WITH_OGG') + defs.append('WITH_OGG') if env['WITH_BF_QUICKTIME']: - defs.append('WITH_QUICKTIME') - incs += ' ../quicktime' + defs.append('WITH_QUICKTIME') + incs += ' ../quicktime' if env['WITH_BF_LCMS']: - defs.append('WITH_LCMS') - incs += ' ' + env['BF_LCMS_INC'] - + defs.append('WITH_LCMS') + incs += ' ' + env['BF_LCMS_INC'] + if env['WITH_BF_GAMEENGINE']: - defs.append('GAMEBLENDER=1') + defs.append('GAMEBLENDER=1') if env['BF_UNIT_TEST']: - defs.append('UNIT_TEST') + defs.append('UNIT_TEST') if not env['WITH_BF_PYTHON']: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') if env['OURPLATFORM'] == 'linux2': - cflags='-pthread' - incs += ' ../../../extern/binreloc/include' + cflags='-pthread' + incs += ' ../../../extern/binreloc/include' if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): - incs += ' ' + env['BF_PTHREADS_INC'] + incs += ' ' + env['BF_PTHREADS_INC'] env.BlenderLib ( 'bf_rna', objs, Split(incs), defines=defs, libtype=['core','player'], priority = [165,20] ) diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript index 32ff64e609f..ecee3f94796 100644 --- a/source/blender/makesrna/intern/SConscript +++ b/source/blender/makesrna/intern/SConscript @@ -3,7 +3,7 @@ import sys import os def normpath(path): - return os.path.abspath(os.path.normpath(path)) + return os.path.abspath(os.path.normpath(path)) Import ('env') cflags = ['-Wall'] @@ -36,40 +36,40 @@ incs += ' ../../render/extern/include' incs += ' #/intern/audaspace/intern ' if env['WITH_BF_OPENEXR']: - defs.append('WITH_OPENEXR') + defs.append('WITH_OPENEXR') if env['WITH_BF_TIFF']: defs.append('WITH_TIFF') if env['WITH_BF_OPENJPEG']: - defs.append('WITH_OPENJPEG') + defs.append('WITH_OPENJPEG') if env['WITH_BF_DDS']: - defs.append('WITH_DDS') + defs.append('WITH_DDS') if env['WITH_BF_CINEON']: - defs.append('WITH_CINEON') + defs.append('WITH_CINEON') if env['WITH_BF_HDR']: - defs.append('WITH_HDR') + defs.append('WITH_HDR') if env['WITH_BF_FFMPEG']: - defs.append('WITH_FFMPEG') - incs += ' ' + env['BF_FFMPEG_INC'] + defs.append('WITH_FFMPEG') + incs += ' ' + env['BF_FFMPEG_INC'] if env['WITH_BF_OGG']: - defs.append('WITH_OGG') + defs.append('WITH_OGG') if env['WITH_BF_QUICKTIME']: - defs.append('WITH_QUICKTIME') - incs += ' ../../quicktime' + defs.append('WITH_QUICKTIME') + incs += ' ../../quicktime' if env['WITH_BF_LCMS']: - defs.append('WITH_LCMS') + defs.append('WITH_LCMS') if env['WITH_BF_GAMEENGINE']: - defs.append('GAMEBLENDER=1') - + defs.append('GAMEBLENDER=1') + if env['WITH_BF_FFTW3']: defs.append('FFTW3=1') @@ -83,40 +83,40 @@ if env['WITH_BF_JACK']: defs.append('WITH_JACK') if env['BF_UNIT_TEST']: - defs.append('UNIT_TEST') + defs.append('UNIT_TEST') if not env['WITH_BF_PYTHON']: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') if env['OURPLATFORM'] == 'linux2': - cflags='-pthread' - incs += ' ../../../extern/binreloc/include' + cflags='-pthread' + incs += ' ../../../extern/binreloc/include' if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): - incs += ' ' + env['BF_PTHREADS_INC'] + incs += ' ' + env['BF_PTHREADS_INC'] makesrna_tool.Append(CPPDEFINES=defs) makesrna_tool.Append (CPPPATH = Split(incs)) if env['OURPLATFORM'] == 'linuxcross': - USE_WINE = True # when cross compiling on linux 64bit this is useful + USE_WINE = True # when cross compiling on linux 64bit this is useful else: - USE_WINE = False + USE_WINE = False if not USE_WINE: - if env['OURPLATFORM'] == 'linuxcross': - makesdna_tool.Replace(CC='gcc') - makesdna_tool.Replace(AR='ar') - makesdna_tool.Replace(LINK='gcc') + if env['OURPLATFORM'] == 'linuxcross': + makesdna_tool.Replace(CC='gcc') + makesdna_tool.Replace(AR='ar') + makesdna_tool.Replace(LINK='gcc') if sys.platform != 'cygwin': - makesrna_tool.Append (CCFLAGS = cflags) + makesrna_tool.Append (CCFLAGS = cflags) makesrna_tool.Append (CPPDEFINES = defines) libdir = root_build_dir+'/lib' if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'): - libdir = '#' + libdir + libdir = '#' + libdir makesrna_tool.Append (LIBPATH = libdir) @@ -125,46 +125,46 @@ makesrna_tool.Append( CCFLAGS = env['CCFLAGS']) makesrna_tool.Append( LINKFLAGS = env['PLATFORM_LINKFLAGS']) if env['BF_PROFILE']: - makesrna_tool.Append (LINKFLAGS = env['BF_PROFILE_FLAGS']) + makesrna_tool.Append (LINKFLAGS = env['BF_PROFILE_FLAGS']) if env['BF_DEBUG']: - makesrna_tool.Append(CFLAGS = env['BF_DEBUG_CFLAGS']) - makesrna_tool.Append(CCFLAGS = env['BF_DEBUG_CCFLAGS']) - if env['OURPLATFORM'] in ('win32-vc','win64-vc'): - makesrna_tool.Append(LINKFLAGS = ['/DEBUG','/PDB:makesrna.pdb']) + makesrna_tool.Append(CFLAGS = env['BF_DEBUG_CFLAGS']) + makesrna_tool.Append(CCFLAGS = env['BF_DEBUG_CCFLAGS']) + if env['OURPLATFORM'] in ('win32-vc','win64-vc'): + makesrna_tool.Append(LINKFLAGS = ['/DEBUG','/PDB:makesrna.pdb']) targetpath = root_build_dir+'/makesrna' if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'): - targetpath = '#' + targetpath + targetpath = '#' + targetpath if env['OURPLATFORM'] == 'linux2' and root_build_dir[0]==os.sep: - makesrna = makesrna_tool.Program (target = targetpath, source = source_files, LIBS=['bf_intern_guardedalloc', 'bf_dna', 'bf_blenlib']) + makesrna = makesrna_tool.Program (target = targetpath, source = source_files, LIBS=['bf_intern_guardedalloc', 'bf_dna', 'bf_blenlib']) else: - makesrna = makesrna_tool.Program (target = targetpath, source = source_files, LIBS=['bf_intern_guardedalloc', 'bf_dna', 'bf_blenlib']) + makesrna = makesrna_tool.Program (target = targetpath, source = source_files, LIBS=['bf_intern_guardedalloc', 'bf_dna', 'bf_blenlib']) rna_dict = rna.Dictionary() rna.Depends (generated_files, makesrna) # this seems bad, how to retrieve it from scons? build_dir = root_build_dir + os.sep +'source' + os.sep + 'blender' + os.sep + 'makesrna' + os.sep + 'intern' + os.sep - + if env['OURPLATFORM'] != 'linuxcross': - if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'): - rna.Command (generated_files, '', "\"" + root_build_dir+os.sep+"makesrna.exe\" \"" + build_dir ) - else: - rna.Command (generated_files, '', "\"" + root_build_dir+os.sep+"makesrna\" \"" + build_dir + '"' ) + if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'): + rna.Command (generated_files, '', "\"" + root_build_dir+os.sep+"makesrna.exe\" \"" + build_dir ) + else: + rna.Command (generated_files, '', "\"" + root_build_dir+os.sep+"makesrna\" \"" + build_dir + '"' ) else: - rna.Command (generated_files, '', root_build_dir+os.sep+"makesrna.exe " + build_dir) - - if USE_WINE: - rna.Command (generated_files, '', 'wine ' + root_build_dir+os.sep+"makesrna.exe " + build_dir) - else: - rna.Command (generated_files, '', root_build_dir+os.sep+"makesrna.exe " + build_dir) + rna.Command (generated_files, '', root_build_dir+os.sep+"makesrna.exe " + build_dir) + + if USE_WINE: + rna.Command (generated_files, '', 'wine ' + root_build_dir+os.sep+"makesrna.exe " + build_dir) + else: + rna.Command (generated_files, '', root_build_dir+os.sep+"makesrna.exe " + build_dir) obj = ['intern/rna_access.c'] for generated_file in generated_files: - obj += ['intern/' + generated_file] + obj += ['intern/' + generated_file] Return ('obj') diff --git a/source/blender/modifiers/SConscript b/source/blender/modifiers/SConscript index 78ee16a3690..7aa198f51f0 100644 --- a/source/blender/modifiers/SConscript +++ b/source/blender/modifiers/SConscript @@ -13,7 +13,7 @@ incs += ' ' + env['BF_ZLIB_INC'] defs = [] if env['BF_NO_ELBEEM']: - defs.append('DISABLE_ELBEEM') + defs.append('DISABLE_ELBEEM') env.BlenderLib ( libname = 'bf_modifiers', sources = sources, includes = Split(incs), defines=defs, diff --git a/source/blender/nodes/SConscript b/source/blender/nodes/SConscript index 548f4973574..284c92bcf81 100644 --- a/source/blender/nodes/SConscript +++ b/source/blender/nodes/SConscript @@ -20,19 +20,19 @@ incs += ' ' + env['BF_ZLIB_INC'] defs = [] if env['WITH_BF_PYTHON']: - incs += ' ' + env['BF_PYTHON_INC'] - incs += ' ../python' - if env['BF_DEBUG']: - defs.append('_DEBUG') + incs += ' ' + env['BF_PYTHON_INC'] + incs += ' ../python' + if env['BF_DEBUG']: + defs.append('_DEBUG') else: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') if env['OURPLATFORM'] == 'linux2': - cflags='-pthread' - incs += ' ../../../extern/binreloc/include' + cflags='-pthread' + incs += ' ../../../extern/binreloc/include' if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): - incs += ' ' + env['BF_PTHREADS_INC'] + incs += ' ' + env['BF_PTHREADS_INC'] env.BlenderLib ( libname = 'bf_nodes', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [190,105] ) env.BlenderLib ( libname = 'bf_cmpnodes', sources = cmpsources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [175,101] ) diff --git a/source/blender/python/SConscript b/source/blender/python/SConscript index 097f69155d5..315fc5ca9a3 100644 --- a/source/blender/python/SConscript +++ b/source/blender/python/SConscript @@ -11,10 +11,10 @@ incs += ' #intern/audaspace/intern ' + env['BF_PYTHON_INC'] defs = [] if env['BF_BUILDINFO']: - defs.append('BUILD_DATE') + defs.append('BUILD_DATE') if env['OURPLATFORM'] in ('win32-mingw', 'win32-vc','win64-vc') and env['BF_DEBUG']: - defs.append('_DEBUG') + defs.append('_DEBUG') env.BlenderLib( libname = 'bf_python', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core','player'], priority = [361,160]) diff --git a/source/blender/quicktime/SConscript b/source/blender/quicktime/SConscript index c8aeb70aa57..24dfab13fd9 100644 --- a/source/blender/quicktime/SConscript +++ b/source/blender/quicktime/SConscript @@ -11,20 +11,20 @@ else: incs = ['.', - '../quicktime', - '../makesdna', - '../makesrna', - '../windowmanager', - '#/intern/guardedalloc', - '../blenlib', - '../blenkernel', - '../avi', - '../imbuf', - '../imbuf/intern', - '../blenloader', - '../render/extern/include', - '../editors/include', - '#/intern/audaspace/intern'] + '../quicktime', + '../makesdna', + '../makesrna', + '../windowmanager', + '#/intern/guardedalloc', + '../blenlib', + '../blenkernel', + '../avi', + '../imbuf', + '../imbuf/intern', + '../blenloader', + '../render/extern/include', + '../editors/include', + '#/intern/audaspace/intern'] incs.append(env['BF_QUICKTIME_INC']) @@ -34,6 +34,6 @@ priorities = [200,235] defs=['WITH_QUICKTIME'] if env['WITH_GHOST_COCOA']: - defs.append('GHOST_COCOA') + defs.append('GHOST_COCOA') env.BlenderLib ('bf_quicktime', sources=source_files, includes=incs, defines=defs, libtype=types, priority=priorities) diff --git a/source/blender/windowmanager/SConscript b/source/blender/windowmanager/SConscript index 179b1ddc998..51168d7a9d3 100644 --- a/source/blender/windowmanager/SConscript +++ b/source/blender/windowmanager/SConscript @@ -17,22 +17,22 @@ incs += ' #/intern/elbeem #/extern/glew/include' defs = [ 'GLEW_STATIC' ] if not env['WITH_BF_PYTHON']: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') if env['WITH_BF_COLLADA']: - defs.append('WITH_COLLADA') + defs.append('WITH_COLLADA') if env['OURPLATFORM'] == 'linux2': - cflags='-pthread' - incs += ' ../../../extern/binreloc/include' + cflags='-pthread' + incs += ' ../../../extern/binreloc/include' if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): - incs += ' ' + env['BF_PTHREADS_INC'] + incs += ' ' + env['BF_PTHREADS_INC'] if env['WITH_GHOST_COCOA']: - sources.remove('intern/wm_apple.c') + sources.remove('intern/wm_apple.c') if env['BF_BUILDINFO']: - defs.append('NAN_BUILDINFO') + defs.append('NAN_BUILDINFO') env.BlenderLib ( 'bf_windowmanager', sources, Split(incs), defines=defs, libtype=['core'], priority=[5] ) diff --git a/source/blenderplayer/bad_level_call_stubs/SConscript b/source/blenderplayer/bad_level_call_stubs/SConscript index aa84b88932e..aec5bb58ef7 100644 --- a/source/blenderplayer/bad_level_call_stubs/SConscript +++ b/source/blenderplayer/bad_level_call_stubs/SConscript @@ -11,6 +11,6 @@ if env['WITH_BF_INTERNATIONAL']: defs += 'WITH_FREETYPE2' if env['WITH_BF_GAMEENGINE']: - defs += ' GAMEBLENDER=1' + defs += ' GAMEBLENDER=1' env.BlenderLib ('blenkernel_blc', sources = Split(sources), includes=Split(incs), defines=Split(defs), libtype=['player'],priority=[220] ) diff --git a/source/creator/SConscript b/source/creator/SConscript index 01e62d33269..6ee9aea29a5 100644 --- a/source/creator/SConscript +++ b/source/creator/SConscript @@ -13,37 +13,37 @@ incs += ' ' + env['BF_OPENGL_INC'] defs = [] if env['WITH_BF_QUICKTIME']: - incs += ' ' + env['BF_QUICKTIME_INC'] - defs.append('WITH_QUICKTIME') + incs += ' ' + env['BF_QUICKTIME_INC'] + defs.append('WITH_QUICKTIME') if env['WITH_BF_BINRELOC']: - incs += ' ../../extern/binreloc/include' - defs.append('WITH_BINRELOC') + incs += ' ../../extern/binreloc/include' + defs.append('WITH_BINRELOC') if env['WITH_BF_OPENEXR']: - defs.append('WITH_OPENEXR') + defs.append('WITH_OPENEXR') if env['WITH_BF_TIFF']: - defs.append('WITH_TIFF') + defs.append('WITH_TIFF') if not env['WITH_BF_SDL']: - defs.append('DISABLE_SDL') + defs.append('DISABLE_SDL') if env['WITH_BF_PYTHON']: - incs += ' ../blender/python' - if env['BF_DEBUG']: - defs.append('_DEBUG') + incs += ' ../blender/python' + if env['BF_DEBUG']: + defs.append('_DEBUG') else: - defs.append('DISABLE_PYTHON') - + defs.append('DISABLE_PYTHON') + if env['BF_BUILDINFO']: - defs.append('BUILD_DATE') - defs.append('NAN_BUILDINFO') + defs.append('BUILD_DATE') + defs.append('NAN_BUILDINFO') if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): incs += ' ' + env['BF_PTHREADS_INC'] if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): - incs += ' ' + env['BF_PTHREADS_INC'] + incs += ' ' + env['BF_PTHREADS_INC'] env.BlenderLib ( libname = 'bf_creator', sources = Split(sources), includes = Split(incs), defines = defs, libtype='core', priority = 0 ) diff --git a/source/gameengine/BlenderRoutines/SConscript b/source/gameengine/BlenderRoutines/SConscript index e5b263ad930..f53fc509c6d 100644 --- a/source/gameengine/BlenderRoutines/SConscript +++ b/source/gameengine/BlenderRoutines/SConscript @@ -26,9 +26,9 @@ if env['WITH_BF_FFMPEG']: defs.append('WITH_FFMPEG') if env['WITH_BF_PYTHON']: - incs += ' ' + env['BF_PYTHON_INC'] + incs += ' ' + env['BF_PYTHON_INC'] else: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') incs += ' ' + env['BF_BULLET_INC'] incs += ' ' + env['BF_OPENGL_INC'] diff --git a/source/gameengine/Converter/SConscript b/source/gameengine/Converter/SConscript index 616c205732c..ab1d7574d89 100644 --- a/source/gameengine/Converter/SConscript +++ b/source/gameengine/Converter/SConscript @@ -24,12 +24,12 @@ incs += ' #source/blender/ikplugin' incs += ' ' + env['BF_BULLET_INC'] if env['BF_DEBUG']: - if env['OURPLATFORM'] in ('win32-mingw', 'win32-vc', 'win64-vc'): - defs.append('_DEBUG') - + if env['OURPLATFORM'] in ('win32-mingw', 'win32-vc', 'win64-vc'): + defs.append('_DEBUG') + if env['WITH_BF_PYTHON']: - incs += ' ' + env['BF_PYTHON_INC'] + incs += ' ' + env['BF_PYTHON_INC'] else: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') env.BlenderLib ( 'bf_converter', sources, Split(incs), defs, libtype=['core','player'], priority=[305,40], cxx_compileflags=env['BGE_CXXFLAGS']) diff --git a/source/gameengine/Expressions/SConscript b/source/gameengine/Expressions/SConscript index 94af9dcfec8..007d6373c77 100644 --- a/source/gameengine/Expressions/SConscript +++ b/source/gameengine/Expressions/SConscript @@ -8,8 +8,8 @@ incs ='. #source/kernel/gen_system #intern/guardedalloc #intern/string #intern/m defs = [] if env['WITH_BF_PYTHON']: - incs += ' ' + env['BF_PYTHON_INC'] + incs += ' ' + env['BF_PYTHON_INC'] else: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') env.BlenderLib ( 'bf_expressions', sources, Split(incs), defs, libtype=['core','player'], priority = [360,80], cxx_compileflags=env['BGE_CXXFLAGS']) diff --git a/source/gameengine/GameLogic/SConscript b/source/gameengine/GameLogic/SConscript index 3840754ed06..507bb7f0bdd 100644 --- a/source/gameengine/GameLogic/SConscript +++ b/source/gameengine/GameLogic/SConscript @@ -10,17 +10,17 @@ incs += ' #/source/gameengine/Rasterizer #/source/gameengine/SceneGraph' defs = [] if env['WITH_BF_SDL']: - incs += ' ' + env['BF_SDL_INC'] + incs += ' ' + env['BF_SDL_INC'] else: - defs.append('DISABLE_SDL') + defs.append('DISABLE_SDL') if env['WITH_BF_PYTHON']: - incs += ' ' + env['BF_PYTHON_INC'] + incs += ' ' + env['BF_PYTHON_INC'] else: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): - if env['BF_DEBUG']: - defs.append('_DEBUG') + if env['BF_DEBUG']: + defs.append('_DEBUG') env.BlenderLib ( 'bf_logic', sources, Split(incs), defs, libtype=['core','player'], priority=[330,65], cxx_compileflags=env['BGE_CXXFLAGS']) diff --git a/source/gameengine/GamePlayer/common/SConscript b/source/gameengine/GamePlayer/common/SConscript index b66d644f9f5..7a16e950b36 100644 --- a/source/gameengine/GamePlayer/common/SConscript +++ b/source/gameengine/GamePlayer/common/SConscript @@ -42,7 +42,7 @@ incs = ['.', '#source/blender/misc', '#source/blender/blenloader', '#source/blender/gpu', - '#extern/glew/include'] + '#extern/glew/include'] #This is all plugin stuff! #if sys.platform=='win32': @@ -61,9 +61,9 @@ incs = ['.', defs = [ 'GLEW_STATIC' ] if env['WITH_BF_PYTHON']: - incs += Split(env['BF_PYTHON_INC']) + incs += Split(env['BF_PYTHON_INC']) else: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') incs += Split(env['BF_PNG_INC']) incs += Split(env['BF_ZLIB_INC']) diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript index 2269b6400e3..41520a06c66 100644 --- a/source/gameengine/GamePlayer/ghost/SConscript +++ b/source/gameengine/GamePlayer/ghost/SConscript @@ -43,9 +43,9 @@ incs = ['.', defs = [ 'GLEW_STATIC' ] if env['WITH_BF_PYTHON']: - incs += Split(env['BF_PYTHON_INC']) + incs += Split(env['BF_PYTHON_INC']) else: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') if env['WITH_BF_FFMPEG']: defs.append('WITH_FFMPEG') diff --git a/source/gameengine/Ketsji/KXNetwork/SConscript b/source/gameengine/Ketsji/KXNetwork/SConscript index 64d00489c89..e7f98ff5850 100644 --- a/source/gameengine/Ketsji/KXNetwork/SConscript +++ b/source/gameengine/Ketsji/KXNetwork/SConscript @@ -10,8 +10,8 @@ incs += ' #source/gameengine/Network #source/gameengine/SceneGraph' defs = [] if env['WITH_BF_PYTHON']: - incs += ' ' + env['BF_PYTHON_INC'] + incs += ' ' + env['BF_PYTHON_INC'] else: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') env.BlenderLib ( 'bf_network', Split(sources), Split(incs), defines=defs,libtype=['core','player'], priority=[400,125], cxx_compileflags=env['BGE_CXXFLAGS']) diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript index 58dc8a314bf..8d54452be0d 100644 --- a/source/gameengine/Ketsji/SConscript +++ b/source/gameengine/Ketsji/SConscript @@ -26,18 +26,18 @@ incs += ' ' + env['BF_OPENGL_INC'] if env['WITH_BF_SDL']: incs += ' ' + env['BF_SDL_INC'] else: - defs.append('DISABLE_SDL') + defs.append('DISABLE_SDL') if env['WITH_BF_PYTHON']: - incs += ' ' + env['BF_PYTHON_INC'] + incs += ' ' + env['BF_PYTHON_INC'] else: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') if env['WITH_BF_FFMPEG']: - defs.append('WITH_FFMPEG') - + defs.append('WITH_FFMPEG') + if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'): - if env['BF_DEBUG']: - defs.append('_DEBUG') # for Python + if env['BF_DEBUG']: + defs.append('_DEBUG') # for Python env.BlenderLib ( 'bf_ketsji', sources, Split(incs), defs, libtype=['core','player'], priority=[320,45], cxx_compileflags=env['BGE_CXXFLAGS']) diff --git a/source/gameengine/Physics/Bullet/SConscript b/source/gameengine/Physics/Bullet/SConscript index 976c6825351..f58085ab354 100644 --- a/source/gameengine/Physics/Bullet/SConscript +++ b/source/gameengine/Physics/Bullet/SConscript @@ -23,8 +23,8 @@ incs += ' ' + env['BF_BULLET_INC'] defs = [] if env['WITH_BF_PYTHON']: - incs += ' ' + env['BF_PYTHON_INC'] + incs += ' ' + env['BF_PYTHON_INC'] else: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') env.BlenderLib ( 'bf_bullet', Split(sources), Split(incs), defs, libtype=['core','player'], priority=[350,50], cxx_compileflags=env['BGE_CXXFLAGS']) diff --git a/source/gameengine/Rasterizer/SConscript b/source/gameengine/Rasterizer/SConscript index 8bc99f1596e..a78a0289d98 100644 --- a/source/gameengine/Rasterizer/SConscript +++ b/source/gameengine/Rasterizer/SConscript @@ -9,8 +9,8 @@ incs = '. #intern/guardedalloc #source/kernel/gen_system #intern/string #intern/ defs = [ 'GLEW_STATIC' ] if env['WITH_BF_PYTHON']: - incs += ' ' + env['BF_PYTHON_INC'] + incs += ' ' + env['BF_PYTHON_INC'] else: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') env.BlenderLib ( 'bf_rasterizer', sources, Split(incs), defs, libtype=['core','player'], priority=[350,70], cxx_compileflags=env['BGE_CXXFLAGS']) diff --git a/source/gameengine/VideoTexture/SConscript b/source/gameengine/VideoTexture/SConscript index 70c7dfc6d3a..21a5f8ce3fe 100644 --- a/source/gameengine/VideoTexture/SConscript +++ b/source/gameengine/VideoTexture/SConscript @@ -16,13 +16,13 @@ incs += ' #intern/guardedalloc #extern/glew/include' defs = [] if env['OURPLATFORM'] in ('win32-vc', 'win64-vc','win32-mingw'): - if env['BF_DEBUG']: - defs.append('_DEBUG') + if env['BF_DEBUG']: + defs.append('_DEBUG') if env['WITH_BF_PYTHON']: - incs += ' ' + env['BF_PYTHON_INC'] + incs += ' ' + env['BF_PYTHON_INC'] else: - defs.append('DISABLE_PYTHON') + defs.append('DISABLE_PYTHON') if env['WITH_BF_FFMPEG']: defs.append('WITH_FFMPEG') diff --git a/source/icons/SConscript b/source/icons/SConscript index 5abb36aafea..ca6308781e9 100644 --- a/source/icons/SConscript +++ b/source/icons/SConscript @@ -2,8 +2,8 @@ Import ('env') if env['OURPLATFORM'] == 'linuxcross': - source = 'linuxcrossblender.rcscons' + source = 'linuxcrossblender.rcscons' else: - source = 'winblender.rcscons' + source = 'winblender.rcscons' env.BlenderRes('winresource', source, ['core'], priority=[95])