diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Blender.py | 32 | ||||
-rwxr-xr-x | tools/btools.py | 30 |
2 files changed, 26 insertions, 36 deletions
diff --git a/tools/Blender.py b/tools/Blender.py index 9c978fccf49..bb82f9caa1d 100644 --- a/tools/Blender.py +++ b/tools/Blender.py @@ -14,6 +14,7 @@ to kill any code duplication """ +import os import os.path import string import glob @@ -99,9 +100,7 @@ def create_blender_liblist(lenv = None, libtype = None): sortlist.sort() for sk in sortlist: v = curlib[sk] - target = root_build_dir + 'lib/'+lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX'] - if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'): - target = '#'+target + target = os.path.abspath(os.getcwd() + os.sep + root_build_dir + 'lib' + os.sep +lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX']) lst.append(target) return lst @@ -120,32 +119,32 @@ def setup_staticlibs(lenv): 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_FFMPEG']: libincs += Split(lenv['BF_FFMPEG_LIBPATH']) - if lenv['WITH_BF_STATICCXX']: - statlibs += Split(lenv['BF_CXX_LIB_STATIC']) 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_INTERNATIONAL']: libincs += Split(lenv['BF_GETTEXT_LIBPATH']) - libincs += Split(lenv['BF_FREETYPE_LIBPATH']) 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['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross'): + if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): libincs += Split(lenv['BF_PTHREADS_LIBPATH']) return statlibs, libincs @@ -158,13 +157,13 @@ def setup_syslibs(lenv): lenv['BF_ZLIB_LIB'] ] + 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'): + if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc'): syslibs.append(lenv['BF_PYTHON_LIB']+'_d') else: syslibs.append(lenv['BF_PYTHON_LIB']) if lenv['WITH_BF_INTERNATIONAL']: - syslibs += Split(lenv['BF_FREETYPE_LIB']) syslibs += Split(lenv['BF_GETTEXT_LIB']) if lenv['WITH_BF_OPENAL']: if not lenv['WITH_BF_STATICOPENAL']: @@ -187,8 +186,11 @@ def setup_syslibs(lenv): 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'): + 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']) + syslibs += lenv['LLIBS'] @@ -354,6 +356,8 @@ def AppIt(target=None, source=None, env=None): commands.getoutput(cmd) cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/.blender/'%(bldroot,builddir,binary) commands.getoutput(cmd) + cmd = 'cp -R %s/release/ui %s/%s.app/Contents/MacOS/.blender/'%(bldroot,builddir,binary) + commands.getoutput(cmd) cmd = 'chmod +x %s/%s.app/Contents/MacOS/%s'%(builddir,binary, binary) commands.getoutput(cmd) cmd = 'find %s/%s.app -name .svn -prune -exec rm -rf {} \;'%(builddir, binary) @@ -391,7 +395,7 @@ class BlenderEnvironment(SConsEnvironment): 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'): + if self['OURPLATFORM'] not in ('win32-vc','win32-mingw','linuxcross', 'win64-vc'): print bc.FAIL+'BlenderRes is for windows only!'+bc.END self.Exit() @@ -456,8 +460,8 @@ class BlenderEnvironment(SConsEnvironment): def BlenderProg(self=None, builddir=None, progname=None, sources=None, includes=None, libs=None, libpath=None, binarykind=''): print bc.HEADER+'Configuring program '+bc.ENDC+bc.OKGREEN+progname+bc.ENDC lenv = self.Clone() - if lenv['OURPLATFORM'] in ['win32-vc', 'cygwin']: - lenv.Append(LINKFLAGS = Split(lenv['PLATFORM_LINKFLAGS'])) + if lenv['OURPLATFORM'] in ('win32-vc', 'cygwin', 'win64-vc'): + lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS']) if lenv['BF_DEBUG']: lenv.Prepend(LINKFLAGS = ['/DEBUG','/PDB:'+progname+'.pdb']) if lenv['OURPLATFORM']=='linux2': @@ -486,7 +490,7 @@ class BlenderEnvironment(SConsEnvironment): 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']=='win32-vc' and lenv['BF_BSC']: + 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) diff --git a/tools/btools.py b/tools/btools.py index dd04a366b1b..bbf8d0a232e 100755 --- a/tools/btools.py +++ b/tools/btools.py @@ -36,6 +36,8 @@ def validate_arguments(args, bc): 'WITH_BF_FFMPEG', 'BF_FFMPEG_LIB','BF_FFMPEG_EXTRA', 'BF_FFMPEG', 'BF_FFMPEG_INC', 'WITH_BF_OGG', 'BF_OGG', 'BF_OGG_LIB', 'WITH_BF_JPEG', 'BF_JPEG', 'BF_JPEG_INC', 'BF_JPEG_LIB', 'BF_JPEG_LIBPATH', + 'WITH_BF_OPENJPEG', 'BF_OPENJPEG', 'BF_OPENJPEG_INC', 'BF_OPENJPEG_LIB', 'BF_OPENJPEG_LIBPATH', + 'WITH_BF_REDCODE', 'BF_REDCODE', 'BF_REDCODE_INC', 'BF_REDCODE_LIB', 'BF_REDCODE_LIBPATH', 'WITH_BF_PNG', 'BF_PNG', 'BF_PNG_INC', 'BF_PNG_LIB', 'BF_PNG_LIBPATH', 'BF_TIFF', 'BF_TIFF_INC', 'BF_TIFF_LIB', 'BF_TIFF_LIBPATH', 'WITH_BF_ZLIB', 'BF_ZLIB', 'BF_ZLIB_INC', 'BF_ZLIB_LIB', 'BF_ZLIB_LIBPATH', @@ -45,18 +47,14 @@ def validate_arguments(args, bc): 'WITH_BF_ODE', 'BF_ODE', 'BF_ODE_INC', 'BF_ODE_LIB', 'WITH_BF_GAMEENGINE', 'WITH_BF_SOLID', 'WITH_BF_BULLET', 'BF_BULLET', 'BF_BULLET_INC', 'BF_BULLET_LIB', 'BF_SOLID', 'BF_SOLID_INC', 'BF_WINTAB', 'BF_WINTAB_INC', - 'WITH_BF_YAFRAY', 'WITH_BF_FREETYPE', 'BF_FREETYPE', 'BF_FREETYPE_INC', 'BF_FREETYPE_LIB', 'BF_FREETYPE_LIBPATH', 'WITH_BF_QUICKTIME', 'BF_QUICKTIME', 'BF_QUICKTIME_INC', 'BF_QUICKTIME_LIB', 'BF_QUICKTIME_LIBPATH', 'WITH_BF_STATICOPENGL', 'BF_OPENGL', 'BF_OPENGL_INC', 'BF_OPENGL_LIB', 'BF_OPENGL_LIBPATH', 'BF_OPENGL_LIB_STATIC', - 'WITH_BF_FTGL', 'BF_FTGL', 'BF_FTGL_INC', 'BF_FTGL_LIB', 'WITH_BF_PLAYER', 'WITH_BF_NOBLENDER', 'WITH_BF_BINRELOC', 'LCGDIR', 'BF_CXX', 'WITH_BF_STATICCXX', 'BF_CXX_LIB_STATIC', - 'WITH_BF_VERSE', 'BF_VERSE_INCLUDE', - 'VERSE_BUILD_BINARY', 'VERSE_BUILD_DIR', 'VERSE_REGEN_PROTO', 'BF_TWEAK_MODE', 'BF_SPLIT_SRC', 'WITHOUT_BF_INSTALL', 'WITH_BF_OPENMP', @@ -64,6 +62,7 @@ def validate_arguments(args, bc): 'BF_FANCY', 'BF_QUIET', 'BF_X264_CONFIG', 'BF_XVIDCORE_CONFIG', + 'WITH_BF_LCMS', 'BF_LCMS_LIB', 'WITH_BF_DOCS', 'BF_NUMJOBS', ] @@ -95,7 +94,7 @@ def validate_arguments(args, bc): if (k in opts_list) or (k in arg_list): okdict[k] = v elif k in opts_list_split: - okdict[k] = v.split() # "" have alredy been stripped + okdict[k] = v.split() # "" have already been stripped else: print '\t'+bc.WARNING+'Invalid argument: '+bc.ENDC+k+'='+v @@ -145,17 +144,7 @@ def SetupSpawn( env ): def read_opts(cfg, args): localopts = Variables.Variables(cfg, args) localopts.AddVariables( - ('VERSE_BUILD_BINARY', 'Build a release or debug binary.', 'release'), - ('VERSE_BUILD_DIR', 'Target directory for intermediate files.', "${BF_BUILDDIR}/extern/verse"), - ('VERSE_REGEN_PROTO', 'Whether to regenerate the protocol files', 'yes'), - (BoolVariable('WITH_BF_VERSE', 'Use VERSE if true', False)), - ('BF_VERSE_INCLUDE', 'verse include dir', '/usr/include'), ('LCGDIR', 'location of cvs lib dir'), - ('VERSE_BUILD_BINARY', 'Build a release or debug binary.', 'release'), - ('VERSE_BUILD_DIR', 'Target directory for intermediate files.', "${BF_BUILDDIR}/extern/verse"), - ('VERSE_REGEN_PROTO', 'Whether to regenerate the protocol files', 'yes'), - ('BF_DEBUG_LIBS', 'list of libraries to build with debug symbols'), - (BoolVariable('WITH_BF_PYTHON', 'Compile with python', True)), ('BF_PYTHON', 'base path for python', ''), ('BF_PYTHON_VERSION', 'Python version to use', ''), @@ -168,7 +157,6 @@ def read_opts(cfg, args): (BoolVariable('WITH_BF_STATICPYTHON', 'Staticly link to python', False)), (BoolVariable('BF_NO_ELBEEM', 'Disable Fluid Sim', False)), - (BoolVariable('WITH_BF_YAFRAY', 'Enable Yafray', True)), (BoolVariable('WITH_BF_OPENAL', 'Use OpenAL if true', False)), ('BF_OPENAL', 'base path for OpenAL', ''), @@ -247,7 +235,7 @@ def read_opts(cfg, args): ('BF_ZLIB_LIB', 'ZLib library', ''), ('BF_ZLIB_LIBPATH', 'ZLib library path', ''), - (BoolVariable('WITH_BF_INTERNATIONAL', 'Use Gettext and Freetype if true', True)), + (BoolVariable('WITH_BF_INTERNATIONAL', 'Use Gettext if true', True)), ('BF_GETTEXT', 'gettext base path', ''), ('BF_GETTEXT_INC', 'gettext include path', ''), @@ -320,11 +308,6 @@ def read_opts(cfg, args): ('BF_OPENGL_LIB_STATIC', 'OpenGL static libraries', ''), ('BF_OPENGL_LINKFLAGS', 'OpenGL link flags', ''), - (BoolVariable('WITH_BF_FTGL', 'Use FTGL if true', True)), - ('BF_FTGL', 'FTGL base path', ''), - ('BF_FTGL_INC', 'FTGL include path', ''), - ('BF_FTGL_LIB', 'FTGL libraries', ''), - (BoolVariable('WITH_BF_PLAYER', 'Build blenderplayer if true', False)), (BoolVariable('WITH_BF_NOBLENDER', 'Do not build blender if true', False)), @@ -371,6 +354,9 @@ def read_opts(cfg, args): (BoolVariable('BF_FANCY', 'Enable fancy output if true', True)), (BoolVariable('BF_QUIET', 'Enable silent output if true', True)), (BoolVariable('WITH_BF_BINRELOC', 'Enable relocatable binary (linux only)', False)), + + (BoolVariable('WITH_BF_LCMS', 'Enable color correction with lcms', False)), + ('BF_LCMS_LIB', 'LCMSlibrary', 'lcms'), ('BF_X264_CONFIG', 'configuration flags for x264', ''), ('BF_XVIDCORE_CONFIG', 'configuration flags for xvidcore', ''), |