=== SCons ===
* merge the recent scons changes from trunk, so this means that the same rules now apply: - scons-local available - platform default configs updated - check your user-config.py if you have made a full copy of default config Note: BGE and blenderplayer still not working, but that is normal ;) (so turn them off!)
This commit is contained in:
42
SConstruct
42
SConstruct
@@ -42,6 +42,8 @@ import tools.Blender
|
||||
import tools.btools
|
||||
import tools.bcolors
|
||||
|
||||
EnsureSConsVersion(1,0,0)
|
||||
|
||||
BlenderEnvironment = tools.Blender.BlenderEnvironment
|
||||
btools = tools.btools
|
||||
B = tools.Blender
|
||||
@@ -122,6 +124,7 @@ if not env:
|
||||
print "Could not create a build environment"
|
||||
Exit()
|
||||
|
||||
|
||||
cc = B.arguments.get('CC', None)
|
||||
cxx = B.arguments.get('CXX', None)
|
||||
if cc:
|
||||
@@ -136,8 +139,6 @@ elif env['CC'] in ['gcc'] and sys.platform=='win32':
|
||||
|
||||
env.SConscriptChdir(0)
|
||||
|
||||
btools.MainEnv = env
|
||||
|
||||
crossbuild = B.arguments.get('BF_CROSS', None)
|
||||
if crossbuild and platform!='win32':
|
||||
platform = 'linuxcross'
|
||||
@@ -173,6 +174,9 @@ opts.Update(env)
|
||||
if not env['BF_FANCY']:
|
||||
B.bc.disable()
|
||||
|
||||
SetOption('num_jobs', int(env['BF_NUMJOBS']))
|
||||
print "Build with %d parallel jobs" % (GetOption('num_jobs'))
|
||||
|
||||
# disable elbeem (fluidsim) compilation?
|
||||
if env['BF_NO_ELBEEM'] == 1:
|
||||
env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
|
||||
@@ -223,7 +227,7 @@ if env['OURPLATFORM'] == 'linux2' :
|
||||
context.Result(result)
|
||||
return result
|
||||
|
||||
env2 = env.Copy( LIBPATH = env['BF_OPENAL'] )
|
||||
env2 = env.Clone( LIBPATH = env['BF_OPENAL'] )
|
||||
sconf_temp = mkdtemp()
|
||||
conf = Configure( env2, {'CheckFreeAlut' : CheckFreeAlut}, sconf_temp, '/dev/null' )
|
||||
if conf.CheckFreeAlut( env2 ):
|
||||
@@ -278,15 +282,16 @@ if 'blenderlite' in B.targets:
|
||||
env['WITH_BF_BINRELOC'] = False
|
||||
env['BF_BUILDINFO'] = False
|
||||
env['BF_NO_ELBEEM'] = True
|
||||
|
||||
|
||||
env['WITH_BF_PYTHON'] = False
|
||||
|
||||
# lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
|
||||
#B.root_build_dir = B.arguments.get('BF_BUILDDIR', '..'+os.sep+'build'+os.sep+platform+os.sep)
|
||||
B.root_build_dir = env['BF_BUILDDIR']
|
||||
env['BUILDDIR'] = B.root_build_dir
|
||||
B.doc_build_dir = env['BF_DOCDIR']
|
||||
if not B.root_build_dir[-1]==os.sep:
|
||||
B.root_build_dir += os.sep
|
||||
if not B.doc_build_dir[-1]==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
|
||||
@@ -295,8 +300,18 @@ if 'clean' in B.targets:
|
||||
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...'+B.bc.ENDC
|
||||
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:
|
||||
@@ -322,6 +337,8 @@ if not os.path.isdir ( B.root_build_dir):
|
||||
os.makedirs ( B.root_build_dir + 'extern' )
|
||||
os.makedirs ( B.root_build_dir + 'lib' )
|
||||
os.makedirs ( B.root_build_dir + 'bin' )
|
||||
if not os.path.isdir(B.doc_build_dir):
|
||||
os.makedirs ( B.doc_build_dir )
|
||||
|
||||
Help(opts.GenerateHelpText(env))
|
||||
|
||||
@@ -364,7 +381,8 @@ dobj = B.buildinfo(env, "dynamic") + B.resources
|
||||
thestatlibs, thelibincs = B.setup_staticlibs(env)
|
||||
thesyslibs = B.setup_syslibs(env)
|
||||
|
||||
env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
|
||||
if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
|
||||
env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
|
||||
if env['WITH_BF_PLAYER']:
|
||||
playerlist = B.create_blender_liblist(env, 'player')
|
||||
env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
|
||||
@@ -535,6 +553,10 @@ nsisaction = env.Action(btools.NSIS_Installer, btools.NSIS_print)
|
||||
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)
|
||||
|
||||
if env['WITH_BF_PLAYER']:
|
||||
blenderplayer = env.Alias('blenderplayer', B.program_list)
|
||||
Depends(blenderplayer,installtarget)
|
||||
@@ -561,5 +583,7 @@ if not env['WITHOUT_BF_INSTALL']:
|
||||
# TODO: build stubs and link into blenderplayer
|
||||
|
||||
#------------ EPYDOC
|
||||
# TODO: run epydoc
|
||||
if env['WITH_BF_DOCS']:
|
||||
SConscript('source/blender/python/api2_2x/doc/SConscript')
|
||||
SConscript('source/gameengine/PyDoc/SConscript')
|
||||
|
||||
|
@@ -1,21 +1,63 @@
|
||||
LCGDIR = '#../lib/darwin-6.1-powerpc'
|
||||
#
|
||||
# Note : if you want to alter this file
|
||||
# copy it as a whole in the upper folder
|
||||
# as user-config.py
|
||||
# dont create a new file with only some
|
||||
# vars changed.
|
||||
|
||||
import commands
|
||||
|
||||
# IMPORTANT NOTE : OFFICIAL BUILDS SHOULD BE DONE WITH SDKs
|
||||
USE_SDK=True
|
||||
|
||||
BF_PYTHON_VERSION = '2.3'
|
||||
|
||||
cmd = 'uname -p'
|
||||
MAC_PROC=commands.getoutput(cmd)
|
||||
cmd = 'uname -r'
|
||||
cmd_res=commands.getoutput(cmd)
|
||||
if cmd_res[0]=='7':
|
||||
MAC_CUR_VER='10.3'
|
||||
elif cmd_res[0]=='8':
|
||||
MAC_CUR_VER='10.4'
|
||||
else:
|
||||
MAC_CUR_VER='10.5'
|
||||
|
||||
if MAC_PROC == 'powerpc':
|
||||
LCGDIR = '#../lib/darwin-6.1-powerpc'
|
||||
else :
|
||||
LCGDIR = '#../lib/darwin-8.x.i386'
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = 'true' # -DWITH_FFMPEG
|
||||
BF_FFMPEG = LIBDIR +'/ffmpeg'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB = 'avformat.a avcodec.a avutil.a'
|
||||
if MAC_PROC== 'powerpc' and BF_PYTHON_VERSION == '2.3':
|
||||
MAC_MIN_VERS = '10.3'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.3.9.sdk'
|
||||
else:
|
||||
MAC_MIN_VERS = '10.4'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.4u.sdk'
|
||||
|
||||
WITH_BF_VERSE = 'false'
|
||||
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
|
||||
BF_FFMPEG = "#extern/ffmpeg"
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
|
||||
if USE_SDK==True:
|
||||
BF_FFMPEG_EXTRA = '-isysroot '+MACOSX_SDK+' -mmacosx-version-min='+MAC_MIN_VERS
|
||||
#BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
#BF_FFMPEG_LIB = 'avformat.a avcodec.a avutil.a'
|
||||
|
||||
WITH_BF_VERSE = False
|
||||
BF_VERSE = "#extern/verse/dist"
|
||||
BF_VERSE_LIBPATH = "${BF_BUILDDIR}/extern/verse/dist"
|
||||
BF_VERSE_INCLUDE = BF_VERSE
|
||||
BF_VERSE_LIBS = "libverse"
|
||||
|
||||
# python.org libs install in /library
|
||||
BF_PYTHON_VERSION = '2.3'
|
||||
# python.org libs install in /library we want to use that for 2.5
|
||||
#
|
||||
# if you want py2.5 on leopard without installing
|
||||
# change value to BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
|
||||
# BEWARE: in that case it will work only on leopard
|
||||
|
||||
if BF_PYTHON_VERSION=='2.3':
|
||||
BF_PYTHON = '/System/Library/Frameworks/Python.framework/Versions/'
|
||||
else:
|
||||
@@ -25,43 +67,66 @@ BF_PYTHON_INC = '${BF_PYTHON}${BF_PYTHON_VERSION}/include/python${BF_PYTHON_VERS
|
||||
BF_PYTHON_BINARY = '${BF_PYTHON}${BF_PYTHON_VERSION}/bin/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_LIB = ''
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}${BF_PYTHON_VERSION}/lib/python${BF_PYTHON_VERSION}/config'
|
||||
BF_PYTHON_LINKFLAGS = '-u __dummy -u _PyMac_Error -framework System -framework Python'
|
||||
BF_PYTHON_LINKFLAGS = '-u _PyMac_Error -framework System -framework Python'
|
||||
if MAC_CUR_VER=='10.3' or MAC_CUR_VER=='10.4':
|
||||
BF_PYTHON_LINKFLAGS ='-u __dummy '+BF_PYTHON_LINKFLAGS
|
||||
|
||||
BF_QUIET = '1'
|
||||
WITH_BF_OPENMP = '0'
|
||||
|
||||
WITH_BF_OPENAL = 'true'
|
||||
# Note : should be true, but openal simply dont work on intel
|
||||
if MAC_PROC == 'i386':
|
||||
WITH_BF_OPENAL = False
|
||||
else:
|
||||
WITH_BF_OPENAL = True
|
||||
#different lib must be used following version of gcc
|
||||
# for gcc 3.3
|
||||
#BF_OPENAL = LIBDIR + '/openal'
|
||||
# for gcc 3.4
|
||||
BF_OPENAL = '#../lib/darwin-8.0.0-powerpc/openal'
|
||||
# for gcc 3.4 and ulterior
|
||||
if MAC_PROC == 'powerpc':
|
||||
BF_OPENAL = '#../lib/darwin-8.0.0-powerpc/openal'
|
||||
else :
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
|
||||
WITH_BF_STATICOPENAL = False
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include'
|
||||
BF_OPENAL_LIB = 'openal'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
||||
|
||||
WITH_BF_SDL = 'true'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_CXX = '/usr'
|
||||
WITH_BF_STATICCXX = False
|
||||
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl' #$(shell sdl-config --prefix)
|
||||
BF_SDL_INC = '${BF_SDL}/include' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
WITH_BF_FMOD = 'false'
|
||||
WITH_BF_FMOD = False
|
||||
BF_FMOD = LIBDIR + '/fmod'
|
||||
|
||||
WITH_BF_OPENEXR = 'true'
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = '${LCGDIR}/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread'
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
WITH_BF_DDS = 'true'
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = 'true'
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = 'true'
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
@@ -70,32 +135,32 @@ BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
BF_TIFF = LIBDIR + '/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
|
||||
WITH_BF_ZLIB = 'true'
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = '/usr'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'z'
|
||||
|
||||
WITH_BF_INTERNATIONAL = 'true'
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
BF_GETTEXT = LIBDIR + '/gettext'
|
||||
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
|
||||
BF_GETTEXT_LIB = 'intl'
|
||||
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
|
||||
|
||||
WITH_BF_FTGL = 'true'
|
||||
WITH_BF_FTGL = True
|
||||
BF_FTGL = '#extern/bFTGL'
|
||||
BF_FTGL_INC = '${BF_FTGL}/include'
|
||||
BF_FTGL_LIB = 'extern_ftgl'
|
||||
|
||||
WITH_BF_GAMEENGINE='true'
|
||||
WITH_BF_PLAYER='true'
|
||||
WITH_BF_GAMEENGINE=True
|
||||
WITH_BF_PLAYER=True
|
||||
|
||||
WITH_BF_ODE = 'false'
|
||||
WITH_BF_ODE = False
|
||||
BF_ODE = LIBDIR + '/ode'
|
||||
BF_ODE_INC = '${BF_ODE}/include'
|
||||
BF_ODE_LIB = '${BF_ODE}/lib/libode.a'
|
||||
|
||||
WITH_BF_BULLET = 'true'
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
@@ -104,9 +169,9 @@ BF_SOLID = '#extern/solid'
|
||||
BF_SOLID_INC = '${BF_SOLID}'
|
||||
BF_SOLID_LIB = 'extern_solid'
|
||||
|
||||
WITH_BF_YAFRAY = 'true'
|
||||
WITH_BF_YAFRAY = True
|
||||
|
||||
#WITH_BF_NSPR = 'true'
|
||||
#WITH_BF_NSPR = True
|
||||
#BF_NSPR = $(LIBDIR)/nspr
|
||||
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
|
||||
#BF_NSPR_LIB =
|
||||
@@ -121,7 +186,7 @@ WITH_BF_YAFRAY = 'true'
|
||||
# if this is not set.
|
||||
#
|
||||
# Be paranoid regarding library creation (do not update archives)
|
||||
#BF_PARANOID = 'true'
|
||||
#BF_PARANOID = True
|
||||
|
||||
# enable freetype2 support for text objects
|
||||
BF_FREETYPE = LIBDIR + '/freetype'
|
||||
@@ -129,35 +194,56 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_QUICKTIME = 'true' # -DWITH_QUICKTIME
|
||||
WITH_BF_QUICKTIME = True # -DWITH_QUICKTIME
|
||||
|
||||
WITH_BF_ICONV = 'false'
|
||||
WITH_BF_ICONV = True
|
||||
BF_ICONV = LIBDIR + "/iconv"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
#BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = 'true'
|
||||
WITH_BF_STATICOPENGL = True
|
||||
BF_OPENGL_LIB = 'GL GLU'
|
||||
BF_OPENGL_LIBPATH = '/System/Library/Frameworks/OpenGL.framework/Libraries'
|
||||
BF_OPENGL_LINKFLAGS = '-framework OpenGL'
|
||||
|
||||
##
|
||||
##CC = gcc
|
||||
##CCC = g++
|
||||
##ifeq ($CPU),alpha)
|
||||
## CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -mieee
|
||||
|
||||
CFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
|
||||
CFLAGS = ['-pipe','-fPIC','-funsigned-char']
|
||||
|
||||
CPPFLAGS = ['-fpascal-strings']
|
||||
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing', '-fpascal-strings']
|
||||
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing', '-fpascal-strings']
|
||||
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fpascal-strings']
|
||||
CXXFLAGS = [ '-pipe','-fPIC','-funsigned-char', '-fpascal-strings']
|
||||
PLATFORM_LINKFLAGS = '-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime'
|
||||
REL_CFLAGS = ['-O2']
|
||||
REL_CCFLAGS = ['-O2']
|
||||
##BF_DEPEND = 'true'
|
||||
|
||||
#note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4
|
||||
LLIBS = 'stdc++ SystemStubs'
|
||||
|
||||
# some flags shuffling for different Os versions
|
||||
if MAC_MIN_VERS == '10.3':
|
||||
CFLAGS = ['-fuse-cxa-atexit']+CFLAGS
|
||||
CXXFLAGS = ['-fuse-cxa-atexit']+CXXFLAGS
|
||||
PLATFORM_LINKFLAGS = '-fuse-cxa-atexit '+PLATFORM_LINKFLAGS
|
||||
LLIBS = LLIBS + ' crt3.o'
|
||||
|
||||
if USE_SDK==True:
|
||||
SDK_FLAGS=['-isysroot', MACOSX_SDK,'-mmacosx-version-min='+MAC_MIN_VERS]
|
||||
PLATFORM_LINKFLAGS = '-mmacosx-version-min='+MAC_MIN_VERS+ ' -Wl,-syslibroot,' + MACOSX_SDK+" "+PLATFORM_LINKFLAGS
|
||||
CCFLAGS=SDK_FLAGS+CCFLAGS
|
||||
CXXFLAGS=SDK_FLAGS+CXXFLAGS
|
||||
|
||||
# you can add -mssse3 if gcc >= 4.2
|
||||
if MAC_PROC == 'i386':
|
||||
REL_CFLAGS = ['-O2','-ftree-vectorize','-msse','-msse2','-msse3']
|
||||
REL_CCFLAGS = ['-O2','-ftree-vectorize','-msse','-msse2','-msse3']
|
||||
else:
|
||||
CFLAGS = CFLAGS+['-fno-strict-aliasing']
|
||||
CCFLAGS = CCFLAGS+['-fno-strict-aliasing']
|
||||
CXXFLAGS = CXXFLAGS+['-fno-strict-aliasing']
|
||||
|
||||
REL_CFLAGS = ['-O2']
|
||||
REL_CCFLAGS = ['-O2']
|
||||
|
||||
##BF_DEPEND = True
|
||||
##
|
||||
##AR = ar
|
||||
##ARFLAGS = ruv
|
||||
@@ -165,21 +251,21 @@ REL_CCFLAGS = ['-O2']
|
||||
##
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
C_WARN = ' -Wall -Wno-long-double -Wdeclaration-after-statement '
|
||||
C_WARN = ['-Wdeclaration-after-statement']
|
||||
|
||||
CC_WARN = ' -Wall -Wno-long-double'
|
||||
CC_WARN = ['-Wall', '-Wno-long-double']
|
||||
|
||||
##FIX_STUBS_WARNINGS = -Wno-unused
|
||||
|
||||
LLIBS = 'stdc++ SystemStubs'
|
||||
##LOPTS = --dynamic
|
||||
##DYNLDFLAGS = -shared $(LDFLAGS)
|
||||
|
||||
BF_PROFILE_FLAGS = ' -pg -g '
|
||||
BF_PROFILE = 'false'
|
||||
BF_PROFILE_CCFLAGS = ['-pg', '-g ']
|
||||
BF_PROFILE = False
|
||||
|
||||
BF_DEBUG = 'true'
|
||||
BF_DEBUG_FLAGS = '-g'
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS = ['-g']
|
||||
|
||||
BF_BUILDDIR='../build/darwin'
|
||||
BF_INSTALLDIR='../install/darwin'
|
||||
BF_DOCDIR='../install/doc'
|
||||
|
@@ -1,45 +1,62 @@
|
||||
LCGDIR = '../lib/linux2'
|
||||
LIBDIR = "${LCGDIR}"
|
||||
|
||||
WITH_BF_VERSE = 'false'
|
||||
WITH_BF_VERSE = False
|
||||
BF_VERSE_INCLUDE = "#extern/verse/dist"
|
||||
|
||||
BF_PYTHON = '/usr'
|
||||
BF_PYTHON_VERSION = '2.5'
|
||||
WITH_BF_STATICPYTHON = False
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
|
||||
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
|
||||
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}.a'
|
||||
|
||||
WITH_BF_OPENAL = 'true'
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = False
|
||||
BF_OPENAL = '/usr'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include'
|
||||
BF_OPENAL_LIB = 'openal'
|
||||
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
||||
|
||||
# some distros have a separate libalut
|
||||
# if you get linker complaints, you need to uncomment the line below
|
||||
# BF_OPENAL_LIB = 'openal alut'
|
||||
# BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a ${BF_OPENAL}/lib/libalut.a'
|
||||
|
||||
WITH_BF_SDL = 'true'
|
||||
BF_CXX = '/usr'
|
||||
WITH_BF_STATICCXX = False
|
||||
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = '/usr' #$(shell sdl-config --prefix)
|
||||
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
|
||||
WITH_BF_FMOD = 'false'
|
||||
WITH_BF_FMOD = False
|
||||
BF_FMOD = LIBDIR + '/fmod'
|
||||
|
||||
WITH_BF_OPENEXR = 'true'
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = '/usr'
|
||||
# when compiling with your own openexr lib you might need to set...
|
||||
# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
|
||||
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
|
||||
WITH_BF_DDS = 'true'
|
||||
|
||||
WITH_BF_JPEG = 'true'
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = '/usr'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
|
||||
WITH_BF_PNG = 'true'
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = '/usr'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
@@ -47,31 +64,31 @@ BF_PNG_LIB = 'png'
|
||||
BF_TIFF = '/usr'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
|
||||
WITH_BF_ZLIB = 'true'
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = '/usr'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'z'
|
||||
|
||||
WITH_BF_INTERNATIONAL = 'true'
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
BF_GETTEXT = '/usr'
|
||||
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
|
||||
BF_GETTEXT_LIB = 'gettextlib'
|
||||
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
|
||||
|
||||
WITH_BF_FTGL = 'true'
|
||||
WITH_BF_FTGL = True
|
||||
BF_FTGL = '#extern/bFTGL'
|
||||
BF_FTGL_INC = '${BF_FTGL}/include'
|
||||
BF_FTGL_LIB = 'extern_ftgl'
|
||||
|
||||
WITH_BF_GAMEENGINE='false'
|
||||
WITH_BF_GAMEENGINE=False
|
||||
|
||||
WITH_BF_ODE = 'false'
|
||||
WITH_BF_ODE = False
|
||||
BF_ODE = LIBDIR + '/ode'
|
||||
BF_ODE_INC = BF_ODE + '/include'
|
||||
BF_ODE_LIB = BF_ODE + '/lib/libode.a'
|
||||
|
||||
WITH_BF_BULLET = 'true'
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
@@ -80,9 +97,9 @@ BF_SOLID = '#extern/solid'
|
||||
BF_SOLID_INC = '${BF_SOLID}'
|
||||
BF_SOLID_LIB = 'extern_solid'
|
||||
|
||||
WITH_BF_YAFRAY = 'true'
|
||||
WITH_BF_YAFRAY = True
|
||||
|
||||
#WITH_BF_NSPR = 'true'
|
||||
#WITH_BF_NSPR = True
|
||||
#BF_NSPR = $(LIBDIR)/nspr
|
||||
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
|
||||
#BF_NSPR_LIB =
|
||||
@@ -97,25 +114,27 @@ WITH_BF_YAFRAY = 'true'
|
||||
# if this is not set.
|
||||
#
|
||||
# Be paranoid regarding library creation (do not update archives)
|
||||
#BF_PARANOID = 'true'
|
||||
#BF_PARANOID = True
|
||||
|
||||
# enable freetype2 support for text objects
|
||||
BF_FREETYPE = '/usr'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
|
||||
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
|
||||
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
|
||||
BF_QUICKTIME = '/usr/local'
|
||||
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
|
||||
|
||||
WITH_BF_ICONV = 'false'
|
||||
WITH_BF_ICONV = False
|
||||
BF_ICONV = LIBDIR + "/iconv"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
WITH_BF_BINRELOC = True
|
||||
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = 'true' # -DWITH_FFMPEG
|
||||
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
|
||||
BF_FFMPEG = '#extern/ffmpeg'
|
||||
BF_FFMPEG_LIB = ''
|
||||
# Uncomment the following two lines to use system's ffmpeg
|
||||
@@ -124,13 +143,31 @@ BF_FFMPEG_LIB = ''
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
|
||||
# enable ogg, vorbis and theora in ffmpeg
|
||||
WITH_BF_OGG = False # -DWITH_OGG
|
||||
BF_OGG = '/usr'
|
||||
BF_OGG_INC = '${BF_OGG}/include'
|
||||
BF_OGG_LIB = 'ogg vorbis theoraenc theoradec'
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}/include'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_REDCODE = False
|
||||
BF_REDCODE = '#extern/libredcode'
|
||||
BF_REDCODE_LIB = ''
|
||||
BF_REDCODE_INC = '${BF_REDCODE}/include'
|
||||
BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = 'false'
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL = '/usr'
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIB = 'GL GLU X11 Xi'
|
||||
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
|
||||
BF_OPENGL_LIB_STATIC = '${BF_OPENGL}/libGL.a ${BF_OPENGL}/libGLU.a ${BF_OPENGL}/libXxf86vm.a ${BF_OPENGL}/libX11.a ${BF_OPENGL}/libXi.a ${BF_OPENGL}/libXext.a ${BF_OPENGL}/libXxf86vm.a'
|
||||
BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
|
||||
|
||||
##
|
||||
CC = 'gcc'
|
||||
@@ -144,15 +181,15 @@ CPPFLAGS = ['-DXP_UNIX']
|
||||
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
|
||||
REL_CFLAGS = ['-O2']
|
||||
REL_CCFLAGS = ['-O2']
|
||||
##BF_DEPEND = 'true'
|
||||
##BF_DEPEND = True
|
||||
##
|
||||
##AR = ar
|
||||
##ARFLAGS = ruv
|
||||
##ARFLAGSQUIET = ru
|
||||
##
|
||||
C_WARN = '-Wall -Wno-char-subscripts -Wdeclaration-after-statement'
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement']
|
||||
|
||||
CC_WARN = '-Wall'
|
||||
CC_WARN = ['-Wall']
|
||||
|
||||
##FIX_STUBS_WARNINGS = -Wno-unused
|
||||
|
||||
@@ -160,14 +197,15 @@ LLIBS = 'util c m dl pthread stdc++'
|
||||
##LOPTS = --dynamic
|
||||
##DYNLDFLAGS = -shared $(LDFLAGS)
|
||||
|
||||
BF_PROFILE_FLAGS = ['-pg','-g']
|
||||
BF_PROFILE = 'false'
|
||||
BF_PROFILE = False
|
||||
BF_PROFILE_CCFLAGS = ['-pg','-g']
|
||||
|
||||
BF_DEBUG = 'true'
|
||||
BF_DEBUG_FLAGS = '-g'
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS = ['-g']
|
||||
|
||||
BF_BUILDDIR = '../build/linux2'
|
||||
BF_INSTALLDIR='../install/linux2'
|
||||
BF_DOCDIR='../install/doc'
|
||||
|
||||
|
||||
#Link against pthread
|
||||
|
@@ -1,10 +1,10 @@
|
||||
LCGDIR = '../lib/windows'
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
WITH_BF_VERSE = 'false'
|
||||
WITH_BF_VERSE = False
|
||||
BF_VERSE_INCLUDE = "#extern/verse/dist"
|
||||
|
||||
WITH_BF_YAFRAY = 'true'
|
||||
WITH_BF_YAFRAY = True
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '2.5'
|
||||
@@ -13,13 +13,21 @@ BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python25'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
|
||||
WITH_BF_OPENAL = 'true'
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = False
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include'
|
||||
BF_OPENAL_LIB = 'openal_static'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
||||
|
||||
WITH_BF_SDL = 'true'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_CXX = '/usr'
|
||||
WITH_BF_STATICCXX = False
|
||||
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
BF_SDL_LIB = 'SDL'
|
||||
@@ -30,24 +38,27 @@ BF_PTHREADS_INC = '${BF_PTHREADS}/include'
|
||||
BF_PTHREADS_LIB = 'pthreadGC2'
|
||||
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
|
||||
|
||||
WITH_BF_FMOD = 'false'
|
||||
WITH_BF_FMOD = False
|
||||
BF_FMOD = LIBDIR + '/fmod'
|
||||
|
||||
WITH_BF_OPENEXR = 'true'
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = LIBDIR + '/gcc/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = ' Half IlmImf Iex '
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
WITH_BF_DDS = 'true'
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = 'true'
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = 'true'
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
@@ -56,32 +67,32 @@ BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
BF_TIFF = LIBDIR + '/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
|
||||
WITH_BF_ZLIB = 'true'
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = LIBDIR + '/zlib'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
#BF_ZLIB_LIB = 'z'
|
||||
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
|
||||
|
||||
WITH_BF_INTERNATIONAL = 'true'
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
BF_GETTEXT = LIBDIR + '/gettext'
|
||||
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
|
||||
BF_GETTEXT_LIB = 'gnu_gettext'
|
||||
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
|
||||
|
||||
WITH_BF_FTGL = 'true'
|
||||
WITH_BF_FTGL = True
|
||||
BF_FTGL = LIBDIR + '/ftgl'
|
||||
BF_FTGL_INC = '${BF_FTGL}/include'
|
||||
BF_FTGL_LIB = 'extern_ftgl'
|
||||
|
||||
WITH_BF_GAMEENGINE = 'false'
|
||||
WITH_BF_GAMEENGINE = False
|
||||
|
||||
WITH_BF_ODE = 'true'
|
||||
WITH_BF_ODE = True
|
||||
BF_ODE = LIBDIR + '/ode'
|
||||
BF_ODE_INC = BF_ODE + '/include'
|
||||
BF_ODE_LIB = BF_ODE + '/lib/libode.a'
|
||||
|
||||
WITH_BF_BULLET = 'true'
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
@@ -96,18 +107,18 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
|
||||
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
|
||||
BF_QUICKTIME = '/usr/local'
|
||||
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
|
||||
|
||||
WITH_BF_ICONV = 'false'
|
||||
WITH_BF_ICONV = False
|
||||
BF_ICONV = LIBDIR + "/iconv"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = 'false'
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL = 'C:\\MingW'
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
|
||||
@@ -132,8 +143,9 @@ CC_WARN = [ '-Wall' ]
|
||||
|
||||
LLIBS = [ '-ldxguid', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz'] #'-lutil', '-lc', '-lm', '-ldl', '-lpthread' ]
|
||||
|
||||
BF_DEBUG = 'true'
|
||||
BF_DEBUG_FLAGS= ''
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS= []
|
||||
|
||||
BF_BUILDDIR = '../build/linuxcross'
|
||||
BF_INSTALLDIR='../install/linuxcross'
|
||||
BF_DOCDIR='../install/doc'
|
||||
|
@@ -8,35 +8,40 @@ BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}/config'
|
||||
|
||||
WITH_BF_OPENAL = 'false'
|
||||
WITH_BF_OPENAL = False
|
||||
# WITH_BF_STATICOPENAL = False
|
||||
#BF_OPENAL = LIBDIR + '/openal'
|
||||
#BF_OPENAL_INC = '${BF_OPENAL}/include'
|
||||
#BF_OPENAL_LIB = 'openal'
|
||||
#BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
#BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
||||
|
||||
WITH_BF_SDL = 'true'
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = '/usr/local' #$(shell sdl-config --prefix)
|
||||
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
WITH_BF_FMOD = 'false'
|
||||
WITH_BF_FMOD = False
|
||||
BF_FMOD = LIBDIR + '/fmod'
|
||||
|
||||
WITH_BF_OPENEXR = 'false'
|
||||
WITH_BF_OPENEXR = False
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = '/usr/local'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
WITH_BF_DDS = 'true'
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = 'true'
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = '/usr/local'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = 'true'
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = '/usr/local'
|
||||
BF_PNG_INC = '${BF_PNG}/include/libpng'
|
||||
BF_PNG_LIB = 'png'
|
||||
@@ -45,31 +50,31 @@ BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
BF_TIFF = '/usr/local'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
|
||||
WITH_BF_ZLIB = 'true'
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = '/usr/local'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'z'
|
||||
|
||||
WITH_BF_INTERNATIONAL = 'true'
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
BF_GETTEXT = '/usr/local'
|
||||
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
|
||||
BF_GETTEXT_LIB = 'intl iconv'
|
||||
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
|
||||
|
||||
WITH_BF_FTGL = 'true'
|
||||
WITH_BF_FTGL = True
|
||||
BF_FTGL = '#extern/bFTGL'
|
||||
BF_FTGL_INC = '${BF_FTGL}/include'
|
||||
BF_FTGL_LIB = 'extern_ftgl'
|
||||
|
||||
WITH_BF_GAMEENGINE='false'
|
||||
WITH_BF_GAMEENGINE=False
|
||||
|
||||
WITH_BF_ODE = 'false'
|
||||
WITH_BF_ODE = False
|
||||
BF_ODE = LIBDIR + '/ode'
|
||||
BF_ODE_INC = '${BF_ODE}/include'
|
||||
BF_ODE_LIB = '${BF_ODE}/lib/libode.a'
|
||||
|
||||
WITH_BF_BULLET = 'true'
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
@@ -78,9 +83,9 @@ BF_SOLID = '#extern/solid'
|
||||
BF_SOLID_INC = '${BF_SOLID}'
|
||||
BF_SOLID_LIB = 'extern_solid'
|
||||
|
||||
WITH_BF_YAFRAY = 'true'
|
||||
WITH_BF_YAFRAY = True
|
||||
|
||||
#WITH_BF_NSPR = 'true'
|
||||
#WITH_BF_NSPR = True
|
||||
#BF_NSPR = $(LIBDIR)/nspr
|
||||
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
|
||||
#BF_NSPR_LIB =
|
||||
@@ -95,7 +100,7 @@ WITH_BF_YAFRAY = 'true'
|
||||
# if this is not set.
|
||||
#
|
||||
# Be paranoid regarding library creation (do not update archives)
|
||||
#BF_PARANOID = 'true'
|
||||
#BF_PARANOID = True
|
||||
|
||||
# enable freetype2 support for text objects
|
||||
BF_FREETYPE = '/usr/X11R6'
|
||||
@@ -103,16 +108,16 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
|
||||
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
|
||||
|
||||
WITH_BF_ICONV = 'false'
|
||||
WITH_BF_ICONV = False
|
||||
BF_ICONV = LIBDIR + "/iconv"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = 'true'
|
||||
WITH_BF_STATICOPENGL = True
|
||||
BF_OPENGL = '/usr/X11R6'
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIB = 'GL GLU X11 Xi'
|
||||
@@ -132,7 +137,7 @@ CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
|
||||
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
|
||||
REL_CFLAGS = ['-O2']
|
||||
REL_CCFLAGS = ['-O2']
|
||||
##BF_DEPEND = 'true'
|
||||
##BF_DEPEND = True
|
||||
##
|
||||
##AR = ar
|
||||
##ARFLAGS = ruv
|
||||
@@ -140,9 +145,9 @@ REL_CCFLAGS = ['-O2']
|
||||
##
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
C_WARN = '-Wall -Wdeclaration-after-statement'
|
||||
C_WARN = ['-Wdeclaration-after-statement']
|
||||
|
||||
CC_WARN = '-Wall'
|
||||
CC_WARN = ['-Wall']
|
||||
|
||||
##FIX_STUBS_WARNINGS = -Wno-unused
|
||||
|
||||
@@ -150,11 +155,12 @@ LLIBS = 'm stdc++ pthread util'
|
||||
##LOPTS = --dynamic
|
||||
##DYNLDFLAGS = -shared $(LDFLAGS)
|
||||
|
||||
BF_PROFILE_FLAGS = ' -pg -g '
|
||||
BF_PROFILE = 'false'
|
||||
BF_PROFILE_CCFLAGS = ['-pg', '-g']
|
||||
BF_PROFILE = False
|
||||
|
||||
BF_DEBUG = 'true'
|
||||
BF_DEBUG_FLAGS = '-g'
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS = ['-g']
|
||||
|
||||
BF_BUILDDIR='../build/openbsd3'
|
||||
BF_INSTALLDIR='../install/openbsd3'
|
||||
BF_DOCDIR='../install/doc'
|
||||
|
@@ -8,36 +8,47 @@ BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
|
||||
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
|
||||
|
||||
WITH_BF_OPENAL = 'true'
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = False
|
||||
BF_OPENAL = '/usr/local'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
BF_OPENAL_LIB = 'openal'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
||||
|
||||
WITH_BF_SDL = 'true'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_CXX = '/usr'
|
||||
WITH_BF_STATICCXX = False
|
||||
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = '/usr/local' #$(shell sdl-config --prefix)
|
||||
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
|
||||
WITH_BF_FMOD = 'false'
|
||||
WITH_BF_FMOD = False
|
||||
BF_FMOD = LIBDIR + '/fmod'
|
||||
|
||||
WITH_BF_OPENEXR = 'true'
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = '/usr/local'
|
||||
BF_OPENEXR_INC = ['${BF_OPENEXR}/include', '${BF_OPENEXR}/include/OpenEXR' ]
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
WITH_BF_DDS = 'true'
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = 'true'
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = '/usr/local'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
|
||||
WITH_BF_PNG = 'true'
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = '/usr/local'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
@@ -46,32 +57,32 @@ BF_PNG_LIB = 'png'
|
||||
BF_TIFF = '/usr/local'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
|
||||
WITH_BF_ZLIB = 'true'
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = '/usr'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
|
||||
BF_ZLIB_LIB = 'z'
|
||||
|
||||
WITH_BF_INTERNATIONAL = 'true'
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
BF_GETTEXT = '/usr/local'
|
||||
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
|
||||
BF_GETTEXT_LIB = 'gettextlib'
|
||||
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
|
||||
|
||||
WITH_BF_FTGL = 'true'
|
||||
WITH_BF_FTGL = True
|
||||
BF_FTGL = '#extern/bFTGL'
|
||||
BF_FTGL_INC = '${BF_FTGL}/include'
|
||||
BF_FTGL_LIB = 'extern_ftgl'
|
||||
|
||||
WITH_BF_GAMEENGINE='false'
|
||||
WITH_BF_GAMEENGINE=False
|
||||
|
||||
WITH_BF_ODE = 'false'
|
||||
WITH_BF_ODE = False
|
||||
BF_ODE = LIBDIR + '/ode'
|
||||
BF_ODE_INC = BF_ODE + '/include'
|
||||
BF_ODE_LIB = BF_ODE + '/lib/libode.a'
|
||||
|
||||
WITH_BF_BULLET = 'true'
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
@@ -80,9 +91,9 @@ BF_SOLID = '#extern/solid'
|
||||
BF_SOLID_INC = '${BF_SOLID}'
|
||||
BF_SOLID_LIB = 'extern_solid'
|
||||
|
||||
WITH_BF_YAFRAY = 'true'
|
||||
WITH_BF_YAFRAY = True
|
||||
|
||||
#WITH_BF_NSPR = 'true'
|
||||
#WITH_BF_NSPR = True
|
||||
#BF_NSPR = $(LIBDIR)/nspr
|
||||
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
|
||||
#BF_NSPR_LIB =
|
||||
@@ -97,7 +108,7 @@ WITH_BF_YAFRAY = 'true'
|
||||
# if this is not set.
|
||||
#
|
||||
# Be paranoid regarding library creation (do not update archives)
|
||||
#BF_PARANOID = 'true'
|
||||
#BF_PARANOID = True
|
||||
|
||||
# enable freetype2 support for text objects
|
||||
BF_FREETYPE = '/usr/local'
|
||||
@@ -105,25 +116,25 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
|
||||
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
|
||||
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
|
||||
BF_QUICKTIME = '/usr/local'
|
||||
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
|
||||
|
||||
WITH_BF_ICONV = 'true'
|
||||
WITH_BF_ICONV = True
|
||||
BF_ICONV = "/usr"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = 'false' # -DWITH_FFMPEG
|
||||
WITH_BF_FFMPEG = False # -DWITH_FFMPEG
|
||||
BF_FFMPEG = '/usr/local'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB = 'avformat avcodec avutil'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = 'false'
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL = '/usr/openwin'
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIB = 'GL GLU X11 Xi'
|
||||
@@ -142,15 +153,15 @@ CPPFLAGS = ['-DXP_UNIX', '-DSUN_OGL_NO_VERTEX_MACROS']
|
||||
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
|
||||
REL_CFLAGS = ['-O2']
|
||||
REL_CCFLAGS = ['-O2']
|
||||
##BF_DEPEND = 'true'
|
||||
##BF_DEPEND = True
|
||||
##
|
||||
##AR = ar
|
||||
##ARFLAGS = ruv
|
||||
##ARFLAGSQUIET = ru
|
||||
##
|
||||
C_WARN = '-Wall -Wno-char-subscripts -Wdeclaration-after-statement'
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement']
|
||||
|
||||
CC_WARN = '-Wall'
|
||||
CC_WARN = ['-Wall']
|
||||
|
||||
##FIX_STUBS_WARNINGS = -Wno-unused
|
||||
|
||||
@@ -158,14 +169,15 @@ LLIBS = 'c m dl pthread stdc++'
|
||||
##LOPTS = --dynamic
|
||||
##DYNLDFLAGS = -shared $(LDFLAGS)
|
||||
|
||||
BF_PROFILE_FLAGS = ['-pg','-g']
|
||||
BF_PROFILE = 'false'
|
||||
BF_PROFILE_CCFLAGS = ['-pg','-g']
|
||||
BF_PROFILE = False
|
||||
|
||||
BF_DEBUG = 'true'
|
||||
BF_DEBUG_FLAGS = ''
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS = []
|
||||
|
||||
BF_BUILDDIR = '../build/sunos5'
|
||||
BF_INSTALLDIR='../install/sunos5'
|
||||
BF_DOCDIR='../install/doc'
|
||||
|
||||
|
||||
PLATFORM_LINKFLAGS = ['']
|
||||
PLATFORM_LINKFLAGS = []
|
||||
|
@@ -1,7 +1,7 @@
|
||||
LCGDIR = '#../lib/windows'
|
||||
LIBDIR = "${LCGDIR}"
|
||||
|
||||
WITH_BF_VERSE = 'false'
|
||||
WITH_BF_VERSE = False
|
||||
BF_VERSE_INCLUDE = "#extern/verse/dist"
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
@@ -11,18 +11,21 @@ BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python25'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
|
||||
WITH_BF_OPENAL = 'true'
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = False
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include'
|
||||
BF_OPENAL_LIB = 'openal_static'
|
||||
BF_OPENAL_LIB = 'dxguid openal_static'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
||||
|
||||
WITH_BF_FFMPEG = 'false'
|
||||
WITH_BF_FFMPEG = False
|
||||
BF_FFMPEG_LIB = 'avformat swscale avcodec avutil xvidcore x264'
|
||||
BF_FFMPEG_LIBPATH = LIBDIR + '/gcc/ffmpeg/lib'
|
||||
BF_FFMPEG_INC = LIBDIR + '/gcc/ffmpeg/include'
|
||||
|
||||
WITH_BF_SDL = 'true'
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
BF_SDL_LIB = 'SDL'
|
||||
@@ -33,24 +36,27 @@ BF_PTHREADS_INC = '${BF_PTHREADS}/include'
|
||||
BF_PTHREADS_LIB = 'pthreadGC2'
|
||||
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
|
||||
|
||||
WITH_BF_FMOD = 'false'
|
||||
WITH_BF_FMOD = False
|
||||
BF_FMOD = LIBDIR + '/fmod'
|
||||
|
||||
WITH_BF_OPENEXR = 'true'
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = LIBDIR + '/gcc/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = ' Half IlmImf Iex '
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
WITH_BF_DDS = 'true'
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = 'true'
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = 'true'
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
@@ -59,31 +65,31 @@ BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
BF_TIFF = LIBDIR + '/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
|
||||
WITH_BF_ZLIB = 'true'
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = LIBDIR + '/zlib'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
|
||||
|
||||
WITH_BF_INTERNATIONAL = 'true'
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
BF_GETTEXT = LIBDIR + '/gettext'
|
||||
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
|
||||
BF_GETTEXT_LIB = 'gnu_gettext'
|
||||
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
|
||||
|
||||
WITH_BF_FTGL = 'true'
|
||||
WITH_BF_FTGL = True
|
||||
BF_FTGL = LIBDIR + '/ftgl'
|
||||
BF_FTGL_INC = '${BF_FTGL}/include'
|
||||
BF_FTGL_LIB = 'extern_ftgl'
|
||||
|
||||
WITH_BF_GAMEENGINE = 'false'
|
||||
WITH_BF_GAMEENGINE = False
|
||||
|
||||
WITH_BF_ODE = 'true'
|
||||
WITH_BF_ODE = True
|
||||
BF_ODE = LIBDIR + '/ode'
|
||||
BF_ODE_INC = BF_ODE + '/include'
|
||||
BF_ODE_LIB = BF_ODE + '/lib/libode.a'
|
||||
|
||||
WITH_BF_BULLET = 'true'
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
@@ -95,9 +101,9 @@ BF_SOLID_LIB = 'extern_solid'
|
||||
BF_WINTAB = LIBDIR + '/wintab'
|
||||
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
|
||||
|
||||
WITH_BF_YAFRAY = 'true'
|
||||
WITH_BF_YAFRAY = True
|
||||
|
||||
#WITH_BF_NSPR = 'true'
|
||||
#WITH_BF_NSPR = True
|
||||
#BF_NSPR = $(LIBDIR)/nspr
|
||||
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
|
||||
#BF_NSPR_LIB =
|
||||
@@ -117,18 +123,18 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
|
||||
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
|
||||
BF_QUICKTIME = '/usr/local'
|
||||
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
|
||||
|
||||
WITH_BF_ICONV = 'false'
|
||||
WITH_BF_ICONV = False
|
||||
BF_ICONV = LIBDIR + "/iconv"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = 'false'
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL = 'C:\\MingW'
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
|
||||
@@ -147,14 +153,18 @@ CXXFLAGS = ['-pipe', '-mwindows', '-funsigned-char', '-fno-strict-aliasing' ]
|
||||
REL_CFLAGS = [ '-O2' ]
|
||||
REL_CCFLAGS = [ '-O2' ]
|
||||
|
||||
C_WARN = [ '-Wall' , '-Wno-char-subscripts', '-Wdeclaration-after-statement' ]
|
||||
C_WARN = [ '-Wno-char-subscripts', '-Wdeclaration-after-statement' ]
|
||||
|
||||
CC_WARN = [ '-Wall' ]
|
||||
|
||||
LLIBS = ['-lshell32', '-lshfolder', '-ldxguid', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++']
|
||||
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++']
|
||||
|
||||
BF_DEBUG = 'true'
|
||||
BF_DEBUG_FLAGS= '-g'
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS= ['-g']
|
||||
|
||||
BF_PROFILE_CCFLAGS = ['-pg','-g']
|
||||
BF_PROFILE = False
|
||||
|
||||
BF_BUILDDIR = '..\\build\\win32-mingw'
|
||||
BF_INSTALLDIR='..\\install\\win32-mingw'
|
||||
BF_DOCDIR = '..\\install\\doc'
|
@@ -1,11 +1,11 @@
|
||||
LCGDIR = '#../lib/windows'
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
WITH_BF_VERSE = 'false'
|
||||
WITH_BF_VERSE = False
|
||||
BF_VERSE_INCLUDE = "#extern/verse/dist"
|
||||
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = 'true' # -DWITH_FFMPEG
|
||||
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
|
||||
BF_FFMPEG = LIBDIR +'/ffmpeg'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
@@ -18,8 +18,8 @@ BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python25'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
|
||||
WITH_BF_OPENAL = 'true'
|
||||
WITH_BF_STATICOPENAL = 'false'
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = False
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include ${BF_OPENAL}/include/AL '
|
||||
BF_OPENAL_LIB = 'dxguid openal_static'
|
||||
@@ -29,16 +29,16 @@ BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
||||
|
||||
# TODO - are these useful on win32?
|
||||
# BF_CXX = '/usr'
|
||||
# WITH_BF_STATICCXX = 'false'
|
||||
# WITH_BF_STATICCXX = False
|
||||
# BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
WITH_BF_ICONV = 'true'
|
||||
WITH_BF_ICONV = True
|
||||
BF_ICONV = LIBDIR + '/iconv'
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
WITH_BF_SDL = 'true'
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
BF_SDL_LIB = 'SDL.lib'
|
||||
@@ -49,11 +49,11 @@ BF_PTHREADS_INC = '${BF_PTHREADS}/include'
|
||||
BF_PTHREADS_LIB = 'pthreadVC2'
|
||||
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
|
||||
|
||||
WITH_BF_FMOD = 'false'
|
||||
WITH_BF_FMOD = False
|
||||
BF_FMOD = LIBDIR + '/fmod'
|
||||
|
||||
WITH_BF_OPENEXR = 'true'
|
||||
WITH_BF_STATICOPENEXR = 'false'
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = LIBDIR + '/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/IlmImf ${BF_OPENEXR}/include/Iex ${BF_OPENEXR}/include/Imath '
|
||||
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread '
|
||||
@@ -61,15 +61,15 @@ BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib_vs2008'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
WITH_BF_DDS = 'true'
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = 'true'
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'libjpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = 'true'
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'libpng_st'
|
||||
@@ -78,33 +78,33 @@ BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
BF_TIFF = LIBDIR + '/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
|
||||
WITH_BF_ZLIB = 'true'
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = LIBDIR + '/zlib'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'libz'
|
||||
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
|
||||
|
||||
WITH_BF_INTERNATIONAL = 'true'
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
BF_GETTEXT = LIBDIR + '/gettext'
|
||||
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
|
||||
BF_GETTEXT_LIB = 'gnu_gettext'
|
||||
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
|
||||
|
||||
WITH_BF_FTGL = 'true'
|
||||
WITH_BF_FTGL = True
|
||||
BF_FTGL = LIBDIR + '/ftgl'
|
||||
BF_FTGL_INC = '${BF_FTGL}/include'
|
||||
BF_FTGL_LIB = 'extern_ftgl'
|
||||
|
||||
WITH_BF_GAMEENGINE = 'true'
|
||||
WITH_BF_PLAYER = 'true'
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_PLAYER = True
|
||||
|
||||
WITH_BF_ODE = 'true'
|
||||
WITH_BF_ODE = True
|
||||
BF_ODE = LIBDIR + '/ode'
|
||||
BF_ODE_INC = BF_ODE + '/include'
|
||||
BF_ODE_LIB = BF_ODE + '/lib/libode.a'
|
||||
|
||||
WITH_BF_BULLET = 'true'
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
@@ -116,11 +116,11 @@ BF_SOLID_LIB = 'extern_solid'
|
||||
BF_WINTAB = LIBDIR + '/wintab'
|
||||
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
|
||||
|
||||
WITH_BF_YAFRAY = 'true'
|
||||
WITH_BF_YAFRAY = True
|
||||
|
||||
WITH_BF_BINRELOC = 'false'
|
||||
WITH_BF_BINRELOC = False
|
||||
|
||||
#WITH_BF_NSPR = 'true'
|
||||
#WITH_BF_NSPR = True
|
||||
#BF_NSPR = $(LIBDIR)/nspr
|
||||
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
|
||||
#BF_NSPR_LIB =
|
||||
@@ -135,21 +135,27 @@ WITH_BF_BINRELOC = 'false'
|
||||
# if this is not set.
|
||||
#
|
||||
# Be paranoid regarding library creation (do not update archives)
|
||||
#BF_PARANOID = 'true'
|
||||
#BF_PARANOID = True
|
||||
|
||||
# enable freetype2 support for text objects
|
||||
BF_WITH_FREETYPE = True
|
||||
BF_FREETYPE = LIBDIR + '/freetype'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype2ST'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_QUICKTIME = 'true' # -DWITH_QUICKTIME
|
||||
WITH_BF_QUICKTIME = True # -DWITH_QUICKTIME
|
||||
BF_QUICKTIME = LIBDIR + '/QTDevWin'
|
||||
BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes'
|
||||
BF_QUICKTIME_LIB = 'qtmlClient'
|
||||
BF_QUICKTIME_LIBPATH = '${BF_QUICKTIME}/Libraries'
|
||||
|
||||
WITH_BF_STATICOPENGL = 'false'
|
||||
WITH_BF_OPENJPEG = True
|
||||
|
||||
WITH_BF_REDCODE = False
|
||||
BF_REDCODE_INC = '#extern'
|
||||
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
|
||||
BF_OPENGL_LIB = 'opengl32 glu32'
|
||||
@@ -160,14 +166,18 @@ CC = 'cl.exe'
|
||||
CXX = 'cl.exe'
|
||||
|
||||
CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/MT']
|
||||
CXXFLAGS = ['/EHsc']
|
||||
|
||||
BF_DEBUG_FLAGS = ['/Zi', '/FR${TARGET}.sbr']
|
||||
BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
|
||||
|
||||
CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-DFTGL_LIBRARY_STATIC', '-D_CRT_SECURE_NO_DEPRECATE']
|
||||
REL_CFLAGS = ['-O2', '-DNDEBUG']
|
||||
REL_CCFLAGS = ['-O2', '-DNDEBUG']
|
||||
REL_CXXFLAGS = ['-O2', '-DNDEBUG']
|
||||
|
||||
C_WARN = []
|
||||
CC_WARN = []
|
||||
CXX_WARN = []
|
||||
|
||||
LLIBS = 'ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid'
|
||||
|
||||
@@ -187,3 +197,4 @@ PLATFORM_LINKFLAGS = '''
|
||||
|
||||
BF_BUILDDIR = '..\\build\\win32-vc'
|
||||
BF_INSTALLDIR='..\\install\\win32-vc'
|
||||
BF_DOCDIR='..\\install\\doc'
|
||||
|
8
extern/verse/dist/SConstruct
vendored
8
extern/verse/dist/SConstruct
vendored
@@ -56,7 +56,7 @@ else:
|
||||
platform_linkflags += ['/DEBUG','/PDB:verse.pdb']
|
||||
|
||||
|
||||
verse_env = env.Copy()
|
||||
verse_env = env.Clone()
|
||||
|
||||
cmd_gen_files = (['v_cmd_gen.c',
|
||||
'v_cmd_def_a.c',
|
||||
@@ -71,7 +71,7 @@ cmd_gen_files = (['v_cmd_gen.c',
|
||||
|
||||
cmd_gen_deps = (['v_gen_pack_init.c'])
|
||||
|
||||
proto_env = env.Copy()
|
||||
proto_env = env.Clone()
|
||||
proto_env.Append(CPPDEFINES=['V_GENERATE_FUNC_MODE'])
|
||||
mkprot_tool = proto_env.Program(target = 'mkprot', source = cmd_gen_files)
|
||||
|
||||
@@ -130,10 +130,10 @@ server_source_files = (['vs_connection.c',
|
||||
'vs_node_text.c'
|
||||
])
|
||||
|
||||
verselib_env = verse_env.Copy()
|
||||
verselib_env = verse_env.Clone()
|
||||
verselib_env.Append(CPPDEFINES = defines)
|
||||
|
||||
verseserver_env = verse_env.Copy()
|
||||
verseserver_env = verse_env.Clone()
|
||||
verseserver_env.Append(CPPDEFINES = defines)
|
||||
verseserver_env.Append (LIBPATH = ['.'])
|
||||
verseserver_env.Append (LIBS= ['verse'])
|
||||
|
@@ -10,8 +10,8 @@ root_build_dir=env['BF_BUILDDIR']
|
||||
source_files = ['makesdna.c']
|
||||
header_files = env.Glob('../*.h')
|
||||
|
||||
makesdna_tool = env.Copy()
|
||||
dna = env.Copy()
|
||||
makesdna_tool = env.Clone()
|
||||
dna = env.Clone()
|
||||
makesdna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesdna/\\"" ')
|
||||
|
||||
makesdna_tool.Append (CPPPATH = ['#/intern/guardedalloc',
|
||||
|
@@ -14,8 +14,8 @@ source_files = env.Glob('*.c')
|
||||
source_files.remove('rna_access.c')
|
||||
source_files.remove('rna_dependency.c')
|
||||
|
||||
makesrna_tool = env.Copy()
|
||||
rna = env.Copy()
|
||||
makesrna_tool = env.Clone()
|
||||
rna = env.Clone()
|
||||
makesrna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesrna/\\"" ')
|
||||
|
||||
makesrna_tool.Append (CPPPATH = ['#/intern/guardedalloc',
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
Import ('env')
|
||||
|
||||
sumoenv = env.Copy()
|
||||
sumoenv = env.Clone()
|
||||
sources = ['SumoPHYCallbackBridge.cpp',
|
||||
'SumoPhysicsController.cpp',
|
||||
'SumoPhysicsEnvironment.cpp',
|
||||
@@ -9,7 +9,7 @@ sources = ['SumoPHYCallbackBridge.cpp',
|
||||
'Fuzzics/src/SM_Object.cpp',
|
||||
'Fuzzics/src/SM_Scene.cpp',
|
||||
'Fuzzics/src/SM_MotionState.cpp'
|
||||
]
|
||||
]
|
||||
|
||||
incs =['.',
|
||||
'../common',
|
||||
|
732
tools/Blender.py
732
tools/Blender.py
@@ -35,6 +35,7 @@ GetBuildPath = SConsEnvironment.GetBuildPath
|
||||
|
||||
# a few globals
|
||||
root_build_dir = ''
|
||||
doc_build_dir = ''
|
||||
quickie = None # Anything else than None if BF_QUICK has been passed
|
||||
quicklist = [] # The list of libraries/programs to compile during a quickie
|
||||
program_list = [] # A list holding Nodes to final binaries, used to create installs
|
||||
@@ -51,434 +52,443 @@ possible_types = ['core'] # can be set in ie. SConstruct
|
||||
libs = {}
|
||||
|
||||
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]
|
||||
lst.append('#' + root_build_dir + 'lib/'+lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX'])
|
||||
lst = []
|
||||
if libtype in possible_types:
|
||||
curlib = libs[libtype]
|
||||
sortlist = curlib.keys()
|
||||
sortlist.sort()
|
||||
for sk in sortlist:
|
||||
v = curlib[sk]
|
||||
lst.append('#' + root_build_dir + 'lib/'+lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX'])
|
||||
|
||||
return lst
|
||||
return lst
|
||||
|
||||
## TODO: static linking
|
||||
def setup_staticlibs(lenv):
|
||||
statlibs = [
|
||||
#here libs for static linking
|
||||
]
|
||||
libincs = [
|
||||
'/usr/lib',
|
||||
lenv['BF_PYTHON_LIBPATH'],
|
||||
lenv['BF_OPENGL_LIBPATH'],
|
||||
lenv['BF_JPEG_LIBPATH'],
|
||||
lenv['BF_PNG_LIBPATH'],
|
||||
lenv['BF_ZLIB_LIBPATH'],
|
||||
lenv['BF_ICONV_LIBPATH']
|
||||
]
|
||||
statlibs = [
|
||||
#here libs for static linking
|
||||
]
|
||||
libincs = [
|
||||
'/usr/lib',
|
||||
lenv['BF_OPENGL_LIBPATH'],
|
||||
lenv['BF_JPEG_LIBPATH'],
|
||||
lenv['BF_PNG_LIBPATH'],
|
||||
lenv['BF_ZLIB_LIBPATH'],
|
||||
lenv['BF_ICONV_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_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_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'):
|
||||
libincs += Split(lenv['BF_PTHREADS_LIBPATH'])
|
||||
if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross'):
|
||||
libincs += Split(lenv['BF_PTHREADS_LIBPATH'])
|
||||
|
||||
return statlibs, libincs
|
||||
return statlibs, libincs
|
||||
|
||||
def setup_syslibs(lenv):
|
||||
syslibs = [
|
||||
|
||||
lenv['BF_JPEG_LIB'],
|
||||
lenv['BF_PNG_LIB'],
|
||||
lenv['BF_ZLIB_LIB']
|
||||
]
|
||||
syslibs = [
|
||||
|
||||
lenv['BF_JPEG_LIB'],
|
||||
lenv['BF_PNG_LIB'],
|
||||
lenv['BF_ZLIB_LIB']
|
||||
]
|
||||
|
||||
if not lenv['WITH_BF_STATICPYTHON']:
|
||||
if lenv['BF_DEBUG']==1 and lenv['OURPLATFORM'] in ('win32-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']:
|
||||
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_FFMPEG']:
|
||||
syslibs += Split(lenv['BF_FFMPEG_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'):
|
||||
syslibs += Split(lenv['BF_PTHREADS_LIB'])
|
||||
if lenv['WITH_BF_PYTHON'] and not lenv['WITH_BF_STATICPYTHON']:
|
||||
if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-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']:
|
||||
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_FFMPEG']:
|
||||
syslibs += Split(lenv['BF_FFMPEG_LIB'])
|
||||
if lenv['WITH_BF_OGG']:
|
||||
syslibs += Split(lenv['BF_OGG_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'):
|
||||
syslibs += Split(lenv['BF_PTHREADS_LIB'])
|
||||
|
||||
syslibs += Split(lenv['LLIBS'])
|
||||
syslibs += Split(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
|
||||
"""
|
||||
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
|
||||
|
||||
obj = []
|
||||
if lenv['BF_BUILDINFO']==1: #user_options_dict['USE_BUILDINFO'] == 1:
|
||||
if sys.platform=='win32':
|
||||
build_info_file = open("source/creator/winbuildinfo.h", 'w')
|
||||
build_info_file.write("char *build_date=\"%s\";\n"%build_date)
|
||||
build_info_file.write("char *build_time=\"%s\";\n"%build_time)
|
||||
build_info_file.write("char *build_rev=\"%s\";\n"%build_rev)
|
||||
build_info_file.write("char *build_platform=\"win32\";\n")
|
||||
build_info_file.write("char *build_type=\"dynamic\";\n")
|
||||
build_info_file.close()
|
||||
lenv.Append (CPPDEFINES = ['NAN_BUILDINFO', 'BUILD_DATE'])
|
||||
else:
|
||||
lenv.Append (CPPDEFINES = ['BUILD_TIME=\'"%s"\''%(build_time),
|
||||
'BUILD_DATE=\'"%s"\''%(build_date),
|
||||
'BUILD_TYPE=\'"dynamic"\'',
|
||||
'BUILD_REV=\'"%s"\''%(build_rev),
|
||||
'NAN_BUILDINFO',
|
||||
'BUILD_PLATFORM=\'"%s"\''%(sys.platform)])
|
||||
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']:
|
||||
if sys.platform=='win32':
|
||||
build_info_file = open("source/creator/winbuildinfo.h", 'w')
|
||||
build_info_file.write("char *build_date=\"%s\";\n"%build_date)
|
||||
build_info_file.write("char *build_time=\"%s\";\n"%build_time)
|
||||
build_info_file.write("char *build_rev=\"%s\";\n"%build_rev)
|
||||
build_info_file.write("char *build_platform=\"win32\";\n")
|
||||
build_info_file.write("char *build_type=\"dynamic\";\n")
|
||||
build_info_file.close()
|
||||
lenv.Append (CPPDEFINES = ['NAN_BUILDINFO', 'BUILD_DATE'])
|
||||
else:
|
||||
lenv.Append (CPPDEFINES = ['BUILD_TIME=\'"%s"\''%(build_time),
|
||||
'BUILD_DATE=\'"%s"\''%(build_date),
|
||||
'BUILD_TYPE=\'"dynamic"\'',
|
||||
'BUILD_REV=\'"%s"\''%(build_rev),
|
||||
'NAN_BUILDINFO',
|
||||
'BUILD_PLATFORM=\'"%s"\''%(sys.platform)])
|
||||
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_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
|
||||
env['BUILDERS']['Object'] = static_ob
|
||||
env['BUILDERS']['StaticObject'] = static_ob
|
||||
env['BUILDERS']['StaticLibrary'] = static_lib
|
||||
env['BUILDERS']['Library'] = static_lib
|
||||
env['BUILDERS']['Program'] = program
|
||||
|
||||
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)
|
||||
import shutil
|
||||
import commands
|
||||
import os.path
|
||||
|
||||
|
||||
a = '%s' % (target[0])
|
||||
builddir, b = os.path.split(a)
|
||||
|
||||
bldroot = env.Dir('.').abspath
|
||||
binary = env['BINARYKIND']
|
||||
|
||||
if b=='verse':
|
||||
print bc.OKBLUE+"no bundle for verse"+bc.ENDC
|
||||
return 0
|
||||
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 = builddir +'/' + "%s.app/Contents/Info.plist"%binary
|
||||
cmd = builddir + '/' +'%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,builddir, binary, binary)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'mkdir %s/%s.app/Contents/MacOS/.blender/'%(builddir, binary)
|
||||
print cmd
|
||||
commands.getoutput(cmd)
|
||||
cmd = builddir + '/%s.app/Contents/MacOS/.blender'%binary
|
||||
shutil.copy(bldroot + '/bin/.blender/.bfont.ttf', cmd)
|
||||
shutil.copy(bldroot + '/bin/.blender/.Blanguages', cmd)
|
||||
cmd = 'cp -R %s/bin/.blender/locale %s/%s.app/Contents/Resources/'%(bldroot,builddir,binary)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp -R %s/bin/.blender/locale %s/%s.app/Contents/MacOS/.blender/'%(bldroot,builddir,binary)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp %s/bin/.blender/.Blanguages %s/%s.app/Contents/Resources/'%(bldroot,builddir,binary)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp -R %s/release/scripts %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)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'find %s/%s.app -name .DS_Store -exec rm -rf {} \;'%(builddir, binary)
|
||||
commands.getoutput(cmd)
|
||||
|
||||
sourcedir = bldroot + '/source/darwin/%s.app'%binary
|
||||
sourceinfo = bldroot + "/source/darwin/%s.app/Contents/Info.plist"%binary
|
||||
targetinfo = builddir +'/' + "%s.app/Contents/Info.plist"%binary
|
||||
cmd = builddir + '/' +'%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,builddir, binary, binary)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'mkdir %s/%s.app/Contents/MacOS/.blender/'%(builddir, binary)
|
||||
print cmd
|
||||
commands.getoutput(cmd)
|
||||
cmd = builddir + '/%s.app/Contents/MacOS/.blender'%binary
|
||||
shutil.copy(bldroot + '/bin/.blender/.bfont.ttf', cmd)
|
||||
shutil.copy(bldroot + '/bin/.blender/.Blanguages', cmd)
|
||||
cmd = 'cp -R %s/bin/.blender/locale %s/%s.app/Contents/Resources/'%(bldroot,builddir,binary)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp -R %s/bin/.blender/locale %s/%s.app/Contents/MacOS/.blender/'%(bldroot,builddir,binary)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp %s/bin/.blender/.Blanguages %s/%s.app/Contents/Resources/'%(bldroot,builddir,binary)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp -R %s/release/scripts %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)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'find %s/%s.app -name .DS_Store -exec rm -rf {} \;'%(builddir, binary)
|
||||
commands.getoutput(cmd)
|
||||
|
||||
#### 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'):
|
||||
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()
|
||||
res = lenv.RES('#'+root_build_dir+'lib/'+libname, source)
|
||||
|
||||
SConsEnvironment.Default(self, res)
|
||||
resources.append(res)
|
||||
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'):
|
||||
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()
|
||||
res = lenv.RES('#'+root_build_dir+'lib/'+libname, source)
|
||||
|
||||
SConsEnvironment.Default(self, res)
|
||||
resources.append(res)
|
||||
|
||||
def BlenderLib(self=None, libname=None, sources=None, includes=[], defines=[], libtype='common', priority = 100, compileflags=None):
|
||||
if not self or not libname or not sources:
|
||||
print bc.FAIL+'Cannot continue. Missing argument for BuildBlenderLib '+libname+bc.ENDC
|
||||
self.Exit()
|
||||
if libname in quickie or len(quickie)==0:
|
||||
if libname in quickdebug:
|
||||
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['WITH_BF_GAMEENGINE']:
|
||||
lenv.Append(CPPDEFINES=['GAMEBLENDER=1'])
|
||||
if lenv['WITH_BF_BULLET']:
|
||||
lenv.Append(CPPDEFINES=['WITH_BULLET=1'])
|
||||
# debug or not
|
||||
# CXXFLAGS defaults to CCFLAGS, therefore
|
||||
# we Replace() rather than Append() to CXXFLAGS the first time
|
||||
lenv.Replace(CXXFLAGS = lenv['CCFLAGS'])
|
||||
if lenv['BF_DEBUG'] or (libname in quickdebug):
|
||||
lenv.Append(CCFLAGS = Split(lenv['BF_DEBUG_FLAGS']))
|
||||
lenv.Append( CXXFLAGS = Split(lenv['BF_DEBUG_FLAGS']))
|
||||
else:
|
||||
lenv.Append(CCFLAGS = lenv['REL_CFLAGS'])
|
||||
lenv.Append(CXXFLAGS = lenv['REL_CCFLAGS'])
|
||||
if lenv['BF_PROFILE']:
|
||||
lenv.Append(CCFLAGS = Split(lenv['BF_PROFILE_FLAGS']),
|
||||
CXXFLAGS = Split(lenv['BF_PROFILE_FLAGS']))
|
||||
if compileflags:
|
||||
lenv.Append(CCFLAGS = compileflags)
|
||||
lenv.Append(CXXFLAGS = compileflags)
|
||||
lenv.Append(CCFLAGS = Split(lenv['C_WARN']))
|
||||
lenv.Append(CXXFLAGS = Split(lenv['CC_WARN']))
|
||||
lib = lenv.Library(target= '#'+root_build_dir+'lib/'+libname, source=sources)
|
||||
SConsEnvironment.Default(self, lib) # we add to default target, because this way we get some kind of progress info during build
|
||||
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 BlenderLib(self=None, libname=None, sources=None, includes=[], defines=[], libtype='common', priority = 100, compileflags=None, cc_compileflags=None, cxx_compileflags=None):
|
||||
if not self or not libname or not sources:
|
||||
print bc.FAIL+'Cannot continue. Missing argument for BuildBlenderLib '+libname+bc.ENDC
|
||||
self.Exit()
|
||||
if libname in quickie or len(quickie)==0:
|
||||
if libname in quickdebug:
|
||||
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['WITH_BF_GAMEENGINE']:
|
||||
lenv.Append(CPPDEFINES=['GAMEBLENDER=1'])
|
||||
if lenv['WITH_BF_BULLET']:
|
||||
lenv.Append(CPPDEFINES=['WITH_BULLET=1'])
|
||||
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.Append(CFLAGS = compileflags)
|
||||
if cc_compileflags:
|
||||
lenv.Append(CCFLAGS = cc_compileflags)
|
||||
if cxx_compileflags:
|
||||
lenv.Append(CXXFLAGS = cxx_compileflags)
|
||||
lenv.Append(CFLAGS = lenv['C_WARN'])
|
||||
lenv.Append(CXXFLAGS = lenv['CC_WARN'])
|
||||
lenv.Append(CXXFLAGS = lenv['CXX_WARN'])
|
||||
lib = lenv.Library(target= '#'+root_build_dir+'lib/'+libname, source=sources)
|
||||
SConsEnvironment.Default(self, lib) # we add to default target, because this way we get some kind of progress info during build
|
||||
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, 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['BF_DEBUG']:
|
||||
lenv.Prepend(LINKFLAGS = ['/DEBUG','/PDB:'+progname+'.pdb'])
|
||||
if lenv['OURPLATFORM']=='linux2':
|
||||
lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
|
||||
lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS'])
|
||||
if lenv['OURPLATFORM']=='sunos5':
|
||||
lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
|
||||
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'])
|
||||
lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS'])
|
||||
lenv.Append(LINKFLAGS = lenv['BF_OPENGL_LINKFLAGS'])
|
||||
if lenv['BF_PROFILE']:
|
||||
lenv.Append(LINKFLAGS = lenv['BF_PROFILE_FLAGS'])
|
||||
lenv.Append(CPPPATH=includes)
|
||||
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']=='win32-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)
|
||||
program_list.append(prog)
|
||||
if lenv['OURPLATFORM']=='darwin':
|
||||
lenv['BINARYKIND'] = binarykind
|
||||
lenv.AddPostAction(prog,Action(AppIt,strfunction=my_appit_print))
|
||||
return prog
|
||||
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['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_FLAGS'])
|
||||
lenv.Append(CPPPATH=includes)
|
||||
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']=='win32-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)
|
||||
program_list.append(prog)
|
||||
if lenv['OURPLATFORM']=='darwin':
|
||||
lenv['BINARYKIND'] = binarykind
|
||||
lenv.AddPostAction(prog,Action(AppIt,strfunction=my_appit_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
|
||||
|
@@ -1,16 +1,16 @@
|
||||
class bcolors:
|
||||
HEADER = '\033[95m'
|
||||
OKBLUE = '\033[94m'
|
||||
OKGREEN = '\033[92m'
|
||||
WARNING = '\033[93m'
|
||||
FAIL = '\033[91m'
|
||||
ENDC = '\033[0m'
|
||||
HEADER = '\033[95m'
|
||||
OKBLUE = '\033[94m'
|
||||
OKGREEN = '\033[92m'
|
||||
WARNING = '\033[93m'
|
||||
FAIL = '\033[91m'
|
||||
ENDC = '\033[0m'
|
||||
|
||||
def disable(self):
|
||||
self.HEADER = ''
|
||||
self.OKBLUE = ''
|
||||
self.OKGREEN = ''
|
||||
self.WARNING = ''
|
||||
self.FAIL = ''
|
||||
self.ENDC = ''
|
||||
def disable(self):
|
||||
self.HEADER = ''
|
||||
self.OKBLUE = ''
|
||||
self.OKGREEN = ''
|
||||
self.WARNING = ''
|
||||
self.FAIL = ''
|
||||
self.ENDC = ''
|
||||
|
||||
|
878
tools/btools.py
878
tools/btools.py
@@ -1,267 +1,277 @@
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import SCons.Options
|
||||
|
||||
import SCons.Variables
|
||||
try:
|
||||
import SCons.Options.BoolOption
|
||||
import subprocess
|
||||
except ImportError:
|
||||
pass
|
||||
try:
|
||||
import subprocess
|
||||
except ImportError:
|
||||
pass
|
||||
pass
|
||||
import string
|
||||
import glob
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
Options = SCons.Options
|
||||
BoolOption = SCons.Options.BoolOption
|
||||
Variables = SCons.Variables
|
||||
BoolVariable = SCons.Variables.BoolVariable
|
||||
|
||||
def print_arguments(args, bc):
|
||||
if len(args):
|
||||
for k,v in args.iteritems():
|
||||
print '\t'+bc.OKBLUE+k+bc.ENDC+' = '+bc.OKGREEN + v + bc.ENDC
|
||||
else:
|
||||
print '\t'+bc.WARNING+'No command-line arguments given'+bc.ENDC
|
||||
if len(args):
|
||||
for k,v in args.iteritems():
|
||||
print '\t'+bc.OKBLUE+k+bc.ENDC+' = '+bc.OKGREEN + v + bc.ENDC
|
||||
else:
|
||||
print '\t'+bc.WARNING+'No command-line arguments given'+bc.ENDC
|
||||
|
||||
def validate_arguments(args, bc):
|
||||
opts_list = [
|
||||
'BF_PYTHON', 'BF_PYTHON_VERSION', 'BF_PYTHON_INC', 'BF_PYTHON_BINARY', 'BF_PYTHON_LIB', 'BF_PYTHON_LIBPATH', 'BF_PYTHON_LINKFLAGS', 'WITH_BF_STATICPYTHON', 'BF_PYTHON_LIB_STATIC',
|
||||
'WITH_BF_OPENAL', 'BF_OPENAL', 'BF_OPENAL_INC', 'BF_OPENAL_LIB', 'BF_OPENAL_LIBPATH', 'WITH_BF_STATICOPENAL', 'BF_OPENAL_LIB_STATIC',
|
||||
'WITH_BF_SDL', 'BF_SDL', 'BF_SDL_INC', 'BF_SDL_LIB', 'BF_SDL_LIBPATH',
|
||||
'BF_PTHREADS', 'BF_PTHREADS_INC', 'BF_PTHREADS_LIB', 'BF_PTHREADS_LIBPATH',
|
||||
'WITH_BF_FMOD',
|
||||
'WITH_BF_OPENEXR', 'BF_OPENEXR', 'BF_OPENEXR_INC', 'BF_OPENEXR_LIB', 'BF_OPENEXR_LIBPATH', 'WITH_BF_STATICOPENEXR', 'BF_OPENEXR_LIB_STATIC',
|
||||
'WITH_BF_DDS',
|
||||
'WITH_BF_FFMPEG', 'BF_FFMPEG_LIB','BF_FFMPEG_EXTRA', 'BF_FFMPEG', 'BF_FFMPEG_INC',
|
||||
'WITH_BF_JPEG', 'BF_JPEG', 'BF_JPEG_INC', 'BF_JPEG_LIB', 'BF_JPEG_LIBPATH',
|
||||
'WITH_BF_PNG', 'BF_PNG', 'BF_PNG_INC', 'BF_PNG_LIB', 'BF_PNG_LIBPATH',
|
||||
'BF_TIFF', 'BF_TIFF_INC',
|
||||
'WITH_BF_ZLIB', 'BF_ZLIB', 'BF_ZLIB_INC', 'BF_ZLIB_LIB', 'BF_ZLIB_LIBPATH',
|
||||
'WITH_BF_INTERNATIONAL',
|
||||
'BF_GETTEXT', 'BF_GETTEXT_INC', 'BF_GETTEXT_LIB', 'BF_GETTEXT_LIBPATH',
|
||||
'WITH_BF_ICONV', 'BF_ICONV', 'BF_ICONV_INC', 'BF_ICONV_LIB', 'BF_ICONV_LIBPATH',
|
||||
'WITH_BF_ODE', 'BF_ODE', 'BF_ODE_INC', 'BF_ODE_LIB',
|
||||
'WITH_BF_GAMEENGINE', 'WITH_BF_BULLET', 'BF_BULLET', 'BF_BULLET_INC', 'BF_BULLET_LIB',
|
||||
'BF_SOLID', 'BF_SOLID_INC', 'BF_WINTAB', 'BF_WINTAB_INC',
|
||||
'WITH_BF_YAFRAY',
|
||||
'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', 'BF_OPENGL_LINKFLAGS',
|
||||
'WITH_BF_FTGL', 'BF_FTGL', 'BF_FTGL_INC', 'BF_FTGL_LIB',
|
||||
'WITH_BF_PLAYER',
|
||||
'WITH_BF_BINRELOC',
|
||||
'CFLAGS', 'CCFLAGS', 'CPPFLAGS',
|
||||
'REL_CFLAGS', 'REL_CCFLAGS',
|
||||
'C_WARN', 'CC_WARN', 'LLIBS', 'PLATFORM_LINKFLAGS',
|
||||
'BF_PROFILE_FLAGS', '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',
|
||||
'WITHOUT_BF_INSTALL',
|
||||
'BF_FANCY', 'BF_QUIET',
|
||||
'BF_X264_CONFIG',
|
||||
'BF_XVIDCORE_CONFIG',
|
||||
]
|
||||
opts_list = [
|
||||
'WITH_BF_PYTHON', 'BF_PYTHON', 'BF_PYTHON_VERSION', 'BF_PYTHON_INC', 'BF_PYTHON_BINARY', 'BF_PYTHON_LIB', 'BF_PYTHON_LIBPATH', 'BF_PYTHON_LINKFLAGS', 'WITH_BF_STATICPYTHON', 'BF_PYTHON_LIB_STATIC',
|
||||
'WITH_BF_OPENAL', 'BF_OPENAL', 'BF_OPENAL_INC', 'BF_OPENAL_LIB', 'BF_OPENAL_LIBPATH', 'WITH_BF_STATICOPENAL', 'BF_OPENAL_LIB_STATIC',
|
||||
'WITH_BF_SDL', 'BF_SDL', 'BF_SDL_INC', 'BF_SDL_LIB', 'BF_SDL_LIBPATH',
|
||||
'BF_PTHREADS', 'BF_PTHREADS_INC', 'BF_PTHREADS_LIB', 'BF_PTHREADS_LIBPATH',
|
||||
'WITH_BF_FMOD',
|
||||
'WITH_BF_OPENEXR', 'BF_OPENEXR', 'BF_OPENEXR_INC', 'BF_OPENEXR_LIB', 'BF_OPENEXR_LIBPATH', 'WITH_BF_STATICOPENEXR', 'BF_OPENEXR_LIB_STATIC',
|
||||
'WITH_BF_DDS',
|
||||
'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_PNG', 'BF_PNG', 'BF_PNG_INC', 'BF_PNG_LIB', 'BF_PNG_LIBPATH',
|
||||
'BF_TIFF', 'BF_TIFF_INC',
|
||||
'WITH_BF_ZLIB', 'BF_ZLIB', 'BF_ZLIB_INC', 'BF_ZLIB_LIB', 'BF_ZLIB_LIBPATH',
|
||||
'WITH_BF_INTERNATIONAL',
|
||||
'BF_GETTEXT', 'BF_GETTEXT_INC', 'BF_GETTEXT_LIB', 'BF_GETTEXT_LIBPATH',
|
||||
'WITH_BF_ICONV', 'BF_ICONV', 'BF_ICONV_INC', 'BF_ICONV_LIB', 'BF_ICONV_LIBPATH',
|
||||
'WITH_BF_ODE', 'BF_ODE', 'BF_ODE_INC', 'BF_ODE_LIB',
|
||||
'WITH_BF_GAMEENGINE', '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', 'BF_OPENGL_LINKFLAGS',
|
||||
'WITH_BF_FTGL', 'BF_FTGL', 'BF_FTGL_INC', 'BF_FTGL_LIB',
|
||||
'WITH_BF_PLAYER',
|
||||
'WITH_BF_NOBLENDER',
|
||||
'WITH_BF_BINRELOC',
|
||||
'CFLAGS', 'CCFLAGS', 'CXXFLAGS', 'CPPFLAGS',
|
||||
'REL_CFLAGS', 'REL_CCFLAGS', 'REL_CXXFLAGS',
|
||||
'BF_PROFILE_FLAGS', 'BF_PROFILE_FLAGS', 'BF_PROFILE_CXXFLAGS',
|
||||
'BF_DEBUG_CFLAGS', 'BF_DEBUG_CCFLAGS', 'BF_DEBUG_CXXFLAGS',
|
||||
'C_WARN', 'CC_WARN', 'CXX_WARN',
|
||||
'LLIBS', 'PLATFORM_LINKFLAGS',
|
||||
'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',
|
||||
'WITHOUT_BF_INSTALL',
|
||||
'BF_FANCY', 'BF_QUIET',
|
||||
'BF_X264_CONFIG',
|
||||
'BF_XVIDCORE_CONFIG',
|
||||
'WITH_BF_DOCS',
|
||||
'BF_NUMJOBS',
|
||||
]
|
||||
|
||||
arg_list = ['BF_DEBUG', 'BF_QUIET', 'BF_CROSS', 'BF_UPDATE',
|
||||
'BF_INSTALLDIR', 'BF_TOOLSET', 'BF_BINNAME',
|
||||
'BF_BUILDDIR', 'BF_FANCY', 'BF_QUICK', 'BF_PROFILE',
|
||||
'BF_DEBUG_FLAGS', 'BF_BSC', 'BF_CONFIG',
|
||||
'BF_PRIORITYLIST', 'BF_BUILDINFO','CC', 'CXX', 'BF_QUICKDEBUG',
|
||||
'BF_LISTDEBUG', 'LCGDIR', 'BF_X264_CONFIG', 'BF_XVIDCORE_CONFIG']
|
||||
arg_list = ['BF_DEBUG', 'BF_QUIET', 'BF_CROSS', 'BF_UPDATE',
|
||||
'BF_INSTALLDIR', 'BF_TOOLSET', 'BF_BINNAME',
|
||||
'BF_BUILDDIR', 'BF_FANCY', 'BF_QUICK', 'BF_PROFILE',
|
||||
'BF_BSC', 'BF_CONFIG',
|
||||
'BF_PRIORITYLIST', 'BF_BUILDINFO','CC', 'CXX', 'BF_QUICKDEBUG',
|
||||
'BF_LISTDEBUG', 'LCGDIR', 'BF_X264_CONFIG', 'BF_XVIDCORE_CONFIG',
|
||||
'BF_DOCDIR']
|
||||
|
||||
all_list = opts_list + arg_list
|
||||
okdict = {}
|
||||
all_list = opts_list + arg_list
|
||||
okdict = {}
|
||||
|
||||
for k,v in args.iteritems():
|
||||
if k in all_list:
|
||||
okdict[k] = v
|
||||
else:
|
||||
print '\t'+bc.WARNING+'Invalid argument: '+bc.ENDC+k+'='+v
|
||||
for k,v in args.iteritems():
|
||||
if k in all_list:
|
||||
okdict[k] = v
|
||||
else:
|
||||
print '\t'+bc.WARNING+'Invalid argument: '+bc.ENDC+k+'='+v
|
||||
|
||||
return okdict
|
||||
return okdict
|
||||
|
||||
def print_targets(targs, bc):
|
||||
if len(targs)>0:
|
||||
for t in targs:
|
||||
print '\t'+bc.OKBLUE+t+bc.ENDC
|
||||
else:
|
||||
print '\t'+bc.WARNING+'No targets given, using '+bc.ENDC+bc.OKGREEN+'default'+bc.ENDC
|
||||
if len(targs)>0:
|
||||
for t in targs:
|
||||
print '\t'+bc.OKBLUE+t+bc.ENDC
|
||||
else:
|
||||
print '\t'+bc.WARNING+'No targets given, using '+bc.ENDC+bc.OKGREEN+'default'+bc.ENDC
|
||||
|
||||
def validate_targets(targs, bc):
|
||||
valid_list = ['.', 'blender', 'blenderstatic', 'blenderplayer', 'webplugin',
|
||||
'blendernogame', 'blenderstaticnogame', 'blenderlite', 'release',
|
||||
'everything', 'clean', 'install-bin', 'install', 'nsis']
|
||||
oklist = []
|
||||
for t in targs:
|
||||
if t in valid_list:
|
||||
oklist.append(t)
|
||||
else:
|
||||
print '\t'+bc.WARNING+'Invalid target: '+bc.ENDC+t
|
||||
return oklist
|
||||
valid_list = ['.', 'blender', 'blenderstatic', 'blenderplayer', 'webplugin',
|
||||
'blendernogame', 'blenderstaticnogame', 'blenderlite', 'release',
|
||||
'everything', 'clean', 'install-bin', 'install', 'nsis']
|
||||
oklist = []
|
||||
for t in targs:
|
||||
if t in valid_list:
|
||||
oklist.append(t)
|
||||
else:
|
||||
print '\t'+bc.WARNING+'Invalid target: '+bc.ENDC+t
|
||||
return oklist
|
||||
|
||||
class ourSpawn:
|
||||
def ourspawn(self, sh, escape, cmd, args, env):
|
||||
newargs = string.join(args[1:], ' ')
|
||||
cmdline = cmd + " " + newargs
|
||||
startupinfo = subprocess.STARTUPINFO()
|
||||
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||
proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE, startupinfo=startupinfo, shell = False)
|
||||
data, err = proc.communicate()
|
||||
rv = proc.wait()
|
||||
if rv:
|
||||
print "====="
|
||||
print err
|
||||
print "====="
|
||||
return rv
|
||||
def ourspawn(self, sh, escape, cmd, args, env):
|
||||
newargs = string.join(args[1:], ' ')
|
||||
cmdline = cmd + " " + newargs
|
||||
startupinfo = subprocess.STARTUPINFO()
|
||||
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||
proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE, startupinfo=startupinfo, shell = False)
|
||||
data, err = proc.communicate()
|
||||
rv = proc.wait()
|
||||
if rv:
|
||||
print "====="
|
||||
print err
|
||||
print "====="
|
||||
return rv
|
||||
|
||||
def SetupSpawn( env ):
|
||||
buf = ourSpawn()
|
||||
buf.ourenv = env
|
||||
env['SPAWN'] = buf.ourspawn
|
||||
buf = ourSpawn()
|
||||
buf.ourenv = env
|
||||
env['SPAWN'] = buf.ourspawn
|
||||
|
||||
|
||||
def read_opts(cfg, args):
|
||||
localopts = Options.Options(cfg, args)
|
||||
localopts.AddOptions(
|
||||
('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'),
|
||||
(BoolOption('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'),
|
||||
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'),
|
||||
|
||||
('BF_PYTHON', 'base path for python', ''),
|
||||
('BF_PYTHON_VERSION', 'Python version to use', ''),
|
||||
('BF_PYTHON_INC', 'include path for Python headers', ''),
|
||||
('BF_PYTHON_BINARY', 'Path to the Python interpreter', ''),
|
||||
('BF_PYTHON_LIB', 'Python library', ''),
|
||||
('BF_PYTHON_LIB_STATIC', 'Python static libraries', ''),
|
||||
('BF_PYTHON_LIBPATH', 'Library path', ''),
|
||||
('BF_PYTHON_LINKFLAGS', 'Python link flags', ''),
|
||||
(BoolOption('WITH_BF_STATICPYTHON', 'Staticly link to python', 'false')),
|
||||
(BoolVariable('WITH_BF_PYTHON', 'Compile with python', True)),
|
||||
('BF_PYTHON', 'base path for python', ''),
|
||||
('BF_PYTHON_VERSION', 'Python version to use', ''),
|
||||
('BF_PYTHON_INC', 'include path for Python headers', ''),
|
||||
('BF_PYTHON_BINARY', 'Path to the Python interpreter', ''),
|
||||
('BF_PYTHON_LIB', 'Python library', ''),
|
||||
('BF_PYTHON_LIB_STATIC', 'Python static libraries', ''),
|
||||
('BF_PYTHON_LIBPATH', 'Library path', ''),
|
||||
('BF_PYTHON_LINKFLAGS', 'Python link flags', ''),
|
||||
(BoolVariable('WITH_BF_STATICPYTHON', 'Staticly link to python', False)),
|
||||
|
||||
(BoolOption('BF_NO_ELBEEM', 'Disable Fluid Sim', 'false')),
|
||||
(BoolOption('WITH_BF_YAFRAY', 'Enable Yafray', 'true')),
|
||||
(BoolVariable('BF_NO_ELBEEM', 'Disable Fluid Sim', False)),
|
||||
(BoolVariable('WITH_BF_YAFRAY', 'Enable Yafray', True)),
|
||||
|
||||
(BoolOption('WITH_BF_OPENAL', 'Use OpenAL if true', '')),
|
||||
('BF_OPENAL', 'base path for OpenAL', ''),
|
||||
('BF_OPENAL_INC', 'include path for python headers', ''),
|
||||
('BF_OPENAL_LIB', 'Path to OpenAL library', ''),
|
||||
('BF_OPENAL_LIB_STATIC', 'Path to OpenAL static library', ''),
|
||||
('BF_OPENAL_LIBPATH', 'Path to OpenAL library', ''),
|
||||
(BoolOption('WITH_BF_STATICOPENAL', 'Staticly link to openal', 'false')),
|
||||
(BoolVariable('WITH_BF_OPENAL', 'Use OpenAL if true', False)),
|
||||
('BF_OPENAL', 'base path for OpenAL', ''),
|
||||
('BF_OPENAL_INC', 'include path for python headers', ''),
|
||||
('BF_OPENAL_LIB', 'Path to OpenAL library', ''),
|
||||
('BF_OPENAL_LIB_STATIC', 'Path to OpenAL static library', ''),
|
||||
('BF_OPENAL_LIBPATH', 'Path to OpenAL library', ''),
|
||||
(BoolVariable('WITH_BF_STATICOPENAL', 'Staticly link to openal', False)),
|
||||
|
||||
(BoolOption('WITH_BF_SDL', 'Use SDL if true', '')),
|
||||
('BF_SDL', 'SDL base path', ''),
|
||||
('BF_SDL_INC', 'SDL include path', ''), #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
('BF_SDL_LIB', 'SDL library', ''), #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
('BF_SDL_LIBPATH', 'SDL library path', ''),
|
||||
(BoolVariable('WITH_BF_SDL', 'Use SDL if true', False)),
|
||||
('BF_SDL', 'SDL base path', ''),
|
||||
('BF_SDL_INC', 'SDL include path', ''), #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
('BF_SDL_LIB', 'SDL library', ''), #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
('BF_SDL_LIBPATH', 'SDL library path', ''),
|
||||
|
||||
('BF_PTHREADS', 'Pthreads base path', ''),
|
||||
('BF_PTHREADS_INC', 'Pthreads include path', ''),
|
||||
('BF_PTHREADS_LIB', 'Pthreads library', ''),
|
||||
('BF_PTHREADS_LIBPATH', 'Pthreads library path', ''),
|
||||
('BF_PTHREADS', 'Pthreads base path', ''),
|
||||
('BF_PTHREADS_INC', 'Pthreads include path', ''),
|
||||
('BF_PTHREADS_LIB', 'Pthreads library', ''),
|
||||
('BF_PTHREADS_LIBPATH', 'Pthreads library path', ''),
|
||||
|
||||
(BoolOption('WITH_BF_FMOD', 'Use FMOD if true', 'false')),
|
||||
# BF_FMOD = $(LCGDIR)/fmod
|
||||
(BoolVariable('WITH_BF_FMOD', 'Use FMOD if true', False)),
|
||||
# BF_FMOD = $(LCGDIR)/fmod
|
||||
|
||||
(BoolOption('WITH_BF_OPENEXR', 'Use OPENEXR if true', 'true')),
|
||||
(BoolOption('WITH_BF_STATICOPENEXR', 'Staticly link to OpenEXR', 'false')),
|
||||
('BF_OPENEXR', 'OPENEXR base path', ''),
|
||||
('BF_OPENEXR_INC', 'OPENEXR include path', ''),
|
||||
('BF_OPENEXR_LIB', 'OPENEXR library', ''),
|
||||
('BF_OPENEXR_LIBPATH', 'OPENEXR library path', ''),
|
||||
('BF_OPENEXR_LIB_STATIC', 'OPENEXR static library', ''),
|
||||
(BoolVariable('WITH_BF_OPENEXR', 'Use OPENEXR if true', True)),
|
||||
(BoolVariable('WITH_BF_STATICOPENEXR', 'Staticly link to OpenEXR', False)),
|
||||
('BF_OPENEXR', 'OPENEXR base path', ''),
|
||||
('BF_OPENEXR_INC', 'OPENEXR include path', ''),
|
||||
('BF_OPENEXR_LIB', 'OPENEXR library', ''),
|
||||
('BF_OPENEXR_LIBPATH', 'OPENEXR library path', ''),
|
||||
('BF_OPENEXR_LIB_STATIC', 'OPENEXR static library', ''),
|
||||
|
||||
(BoolOption('WITH_BF_DDS', 'Use DDS if true', 'true')),
|
||||
(BoolVariable('WITH_BF_DDS', 'Use DDS if true', True)),
|
||||
|
||||
(BoolOption('WITH_BF_FFMPEG', 'Use FFMPEG if true', 'false')),
|
||||
('BF_FFMPEG', 'FFMPEG base path', ''),
|
||||
('BF_FFMPEG_LIB', 'FFMPEG library', ''),
|
||||
('BF_FFMPEG_EXTRA', 'FFMPEG flags that must be preserved', ''),
|
||||
(BoolVariable('WITH_BF_FFMPEG', 'Use FFMPEG if true', False)),
|
||||
('BF_FFMPEG', 'FFMPEG base path', ''),
|
||||
('BF_FFMPEG_LIB', 'FFMPEG library', ''),
|
||||
('BF_FFMPEG_EXTRA', 'FFMPEG flags that must be preserved', ''),
|
||||
|
||||
('BF_FFMPEG_INC', 'FFMPEG includes', ''),
|
||||
('BF_FFMPEG_LIBPATH', 'FFMPEG library path', ''),
|
||||
|
||||
('BF_FFMPEG_INC', 'FFMPEG includes', ''),
|
||||
('BF_FFMPEG_LIBPATH', 'FFMPEG library path', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_OGG', 'Use OGG, THEORA, VORBIS in FFMPEG if true',
|
||||
False)),
|
||||
('BF_OGG', 'OGG base path', ''),
|
||||
('BF_OGG_LIB', 'OGG library', ''),
|
||||
|
||||
(BoolOption('WITH_BF_JPEG', 'Use JPEG if true', 'true')),
|
||||
('BF_JPEG', 'JPEG base path', ''),
|
||||
('BF_JPEG_INC', 'JPEG include path', ''),
|
||||
('BF_JPEG_LIB', 'JPEG library', ''),
|
||||
('BF_JPEG_LIBPATH', 'JPEG library path', ''),
|
||||
(BoolVariable('WITH_BF_JPEG', 'Use JPEG if true', True)),
|
||||
('BF_JPEG', 'JPEG base path', ''),
|
||||
('BF_JPEG_INC', 'JPEG include path', ''),
|
||||
('BF_JPEG_LIB', 'JPEG library', ''),
|
||||
('BF_JPEG_LIBPATH', 'JPEG library path', ''),
|
||||
|
||||
(BoolOption('WITH_BF_OPENJPEG', 'Use OPENJPEG if true', 'false')),
|
||||
('BF_OPENJPEG', 'OPENJPEG base path', ''),
|
||||
('BF_OPENJPEG_INC', 'OPENJPEG include path', ''),
|
||||
('BF_OPENJPEG_LIB', 'OPENJPEG library', ''),
|
||||
('BF_OPENJPEG_LIBPATH', 'OPENJPEG library path', ''),
|
||||
(BoolVariable('WITH_BF_OPENJPEG', 'Use OPENJPEG if true', False)),
|
||||
('BF_OPENJPEG', 'OPENJPEG base path', ''),
|
||||
('BF_OPENJPEG_INC', 'OPENJPEG include path', ''),
|
||||
('BF_OPENJPEG_LIB', 'OPENJPEG library', ''),
|
||||
('BF_OPENJPEG_LIBPATH', 'OPENJPEG library path', ''),
|
||||
|
||||
(BoolOption('WITH_BF_REDCODE', 'Use REDCODE if true', 'false')),
|
||||
('BF_REDCODE', 'REDCODE base path', ''),
|
||||
('BF_REDCODE_INC', 'REDCODE include path', ''),
|
||||
('BF_REDCODE_LIB', 'REDCODE library', ''),
|
||||
('BF_REDCODE_LIBPATH', 'REDCODE library path', ''),
|
||||
(BoolVariable('WITH_BF_REDCODE', 'Use REDCODE if true', False)),
|
||||
('BF_REDCODE', 'REDCODE base path', ''),
|
||||
('BF_REDCODE_INC', 'REDCODE include path', ''),
|
||||
('BF_REDCODE_LIB', 'REDCODE library', ''),
|
||||
('BF_REDCODE_LIBPATH', 'REDCODE library path', ''),
|
||||
|
||||
(BoolOption('WITH_BF_PNG', 'Use PNG if true', 'true')),
|
||||
('BF_PNG', 'PNG base path', ''),
|
||||
('BF_PNG_INC', 'PNG include path', ''),
|
||||
('BF_PNG_LIB', 'PNG library', ''),
|
||||
('BF_PNG_LIBPATH', 'PNG library path', ''),
|
||||
(BoolVariable('WITH_BF_PNG', 'Use PNG if true', True)),
|
||||
('BF_PNG', 'PNG base path', ''),
|
||||
('BF_PNG_INC', 'PNG include path', ''),
|
||||
('BF_PNG_LIB', 'PNG library', ''),
|
||||
('BF_PNG_LIBPATH', 'PNG library path', ''),
|
||||
|
||||
('BF_TIFF', 'TIFF base path', ''),
|
||||
('BF_TIFF_INC', 'TIFF include path', ''),
|
||||
('BF_TIFF', 'TIFF base path', ''),
|
||||
('BF_TIFF_INC', 'TIFF include path', ''),
|
||||
|
||||
(BoolOption('WITH_BF_ZLIB', 'Use ZLib if true', 'true')),
|
||||
('BF_ZLIB', 'ZLib base path', ''),
|
||||
('BF_ZLIB_INC', 'ZLib include path', ''),
|
||||
('BF_ZLIB_LIB', 'ZLib library', ''),
|
||||
('BF_ZLIB_LIBPATH', 'ZLib library path', ''),
|
||||
(BoolVariable('WITH_BF_ZLIB', 'Use ZLib if true', True)),
|
||||
('BF_ZLIB', 'ZLib base path', ''),
|
||||
('BF_ZLIB_INC', 'ZLib include path', ''),
|
||||
('BF_ZLIB_LIB', 'ZLib library', ''),
|
||||
('BF_ZLIB_LIBPATH', 'ZLib library path', ''),
|
||||
|
||||
(BoolOption('WITH_BF_INTERNATIONAL', 'Use Gettext and Freetype if true', 'true')),
|
||||
(BoolVariable('WITH_BF_INTERNATIONAL', 'Use Gettext and Freetype if true', True)),
|
||||
|
||||
('BF_GETTEXT', 'gettext base path', ''),
|
||||
('BF_GETTEXT_INC', 'gettext include path', ''),
|
||||
('BF_GETTEXT_LIB', 'gettext library', ''),
|
||||
('BF_GETTEXT_LIBPATH', 'gettext library path', ''),
|
||||
|
||||
(BoolOption('WITH_BF_ICONV', 'Use iconv if true', 'true')),
|
||||
('BF_ICONV', 'iconv base path', ''),
|
||||
('BF_ICONV_INC', 'iconv include path', ''),
|
||||
('BF_ICONV_LIB', 'iconv library', ''),
|
||||
('BF_ICONV_LIBPATH', 'iconv library path', ''),
|
||||
|
||||
(BoolOption('WITH_BF_GAMEENGINE', 'Build with gameengine' , 'true')),
|
||||
('BF_GETTEXT', 'gettext base path', ''),
|
||||
('BF_GETTEXT_INC', 'gettext include path', ''),
|
||||
('BF_GETTEXT_LIB', 'gettext library', ''),
|
||||
('BF_GETTEXT_LIBPATH', 'gettext library path', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_ICONV', 'Use iconv if true', True)),
|
||||
('BF_ICONV', 'iconv base path', ''),
|
||||
('BF_ICONV_INC', 'iconv include path', ''),
|
||||
('BF_ICONV_LIB', 'iconv library', ''),
|
||||
('BF_ICONV_LIBPATH', 'iconv library path', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_GAMEENGINE', 'Build with gameengine' , True)),
|
||||
|
||||
(BoolOption('WITH_BF_ODE', 'Use ODE if true', 'true')),
|
||||
('BF_ODE', 'ODE base path', ''),
|
||||
('BF_ODE_INC', 'ODE include path' , ''),
|
||||
('BF_ODE_LIB', 'ODE library', ''),
|
||||
(BoolVariable('WITH_BF_ODE', 'Use ODE if true', True)),
|
||||
('BF_ODE', 'ODE base path', ''),
|
||||
('BF_ODE_INC', 'ODE include path' , ''),
|
||||
('BF_ODE_LIB', 'ODE library', ''),
|
||||
|
||||
(BoolOption('WITH_BF_BULLET', 'Use Bullet if true', 'true')),
|
||||
('BF_BULLET', 'Bullet base dir', ''),
|
||||
('BF_BULLET_INC', 'Bullet include path', ''),
|
||||
('BF_BULLET_LIB', 'Bullet library', ''),
|
||||
|
||||
('BF_SOLID', 'Solid base dir', '#/extern/solid'),
|
||||
('BF_SOLID_INC', 'Solid include path', ''),
|
||||
('BF_WINTAB', 'WinTab base dir', ''),
|
||||
('BF_WINTAB_INC', 'WinTab include dir', ''),
|
||||
('BF_CXX', 'c++ base path for libstdc++, only used when static linking', ''),
|
||||
(BoolOption('WITH_BF_STATICCXX', 'static link to stdc++', 'false')),
|
||||
('BF_CXX_LIB_STATIC', 'static library path for stdc++', ''),
|
||||
(BoolVariable('WITH_BF_BULLET', 'Use Bullet if true', True)),
|
||||
('BF_BULLET', 'Bullet base dir', ''),
|
||||
('BF_BULLET_INC', 'Bullet include path', ''),
|
||||
('BF_BULLET_LIB', 'Bullet library', ''),
|
||||
|
||||
('BF_SOLID', 'Solid base dir', '#/extern/solid'),
|
||||
('BF_SOLID_INC', 'Solid include path', ''),
|
||||
('BF_WINTAB', 'WinTab base dir', ''),
|
||||
('BF_WINTAB_INC', 'WinTab include dir', ''),
|
||||
('BF_CXX', 'c++ base path for libstdc++, only used when static linking', ''),
|
||||
(BoolVariable('WITH_BF_STATICCXX', 'static link to stdc++', False)),
|
||||
('BF_CXX_LIB_STATIC', 'static library path for stdc++', ''),
|
||||
##
|
||||
##WITH_BF_NSPR = 'true'
|
||||
##WITH_BF_NSPR = True
|
||||
##BF_NSPR = $(LCGDIR)/nspr
|
||||
##BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
|
||||
##BF_NSPR_LIB =
|
||||
@@ -275,264 +285,276 @@ def read_opts(cfg, args):
|
||||
### if this is not set.
|
||||
##
|
||||
### Be paranoid regarding library creation (do not update archives)
|
||||
##BF_PARANOID = 'true'
|
||||
##BF_PARANOID = True
|
||||
##
|
||||
### enable freetype2 support for text objects
|
||||
('BF_FREETYPE', 'Freetype base path', ''),
|
||||
('BF_FREETYPE_INC', 'Freetype include path', ''),
|
||||
('BF_FREETYPE_LIB', 'Freetype library', ''),
|
||||
('BF_FREETYPE_LIBPATH', 'Freetype library path', ''),
|
||||
(BoolVariable('WITH_BF_FREETYPE', 'Use FreeType2 if true', False)),
|
||||
('BF_FREETYPE', 'Freetype base path', ''),
|
||||
('BF_FREETYPE_INC', 'Freetype include path', ''),
|
||||
('BF_FREETYPE_LIB', 'Freetype library', ''),
|
||||
('BF_FREETYPE_LIBPATH', 'Freetype library path', ''),
|
||||
|
||||
(BoolOption('WITH_BF_OPENMP', 'Use OpenMP if true', 'false')),
|
||||
(BoolVariable('WITH_BF_OPENMP', 'Use OpenMP if true', False)),
|
||||
|
||||
(BoolOption('WITH_BF_QUICKTIME', 'Use QuickTime if true', 'false')),
|
||||
('BF_QUICKTIME', 'QuickTime base path', ''),
|
||||
('BF_QUICKTIME_INC', 'QuickTime include path', ''),
|
||||
('BF_QUICKTIME_LIB', 'QuickTime library', ''),
|
||||
('BF_QUICKTIME_LIBPATH', 'QuickTime library path', ''),
|
||||
(BoolVariable('WITH_BF_QUICKTIME', 'Use QuickTime if true', False)),
|
||||
('BF_QUICKTIME', 'QuickTime base path', ''),
|
||||
('BF_QUICKTIME_INC', 'QuickTime include path', ''),
|
||||
('BF_QUICKTIME_LIB', 'QuickTime library', ''),
|
||||
('BF_QUICKTIME_LIBPATH', 'QuickTime library path', ''),
|
||||
|
||||
(BoolOption('WITH_BF_STATICOPENGL', 'Use MESA if true', 'true')),
|
||||
('BF_OPENGL', 'OpenGL base path', ''),
|
||||
('BF_OPENGL_INC', 'OpenGL include path', ''),
|
||||
('BF_OPENGL_LIB', 'OpenGL libraries', ''),
|
||||
('BF_OPENGL_LIBPATH', 'OpenGL library path', ''),
|
||||
('BF_OPENGL_LIB_STATIC', 'OpenGL static libraries', ''),
|
||||
('BF_OPENGL_LINKFLAGS', 'OpenGL link flags', ''),
|
||||
|
||||
(BoolOption('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_STATICOPENGL', 'Use MESA if true', True)),
|
||||
('BF_OPENGL', 'OpenGL base path', ''),
|
||||
('BF_OPENGL_INC', 'OpenGL include path', ''),
|
||||
('BF_OPENGL_LIB', 'OpenGL libraries', ''),
|
||||
('BF_OPENGL_LIBPATH', 'OpenGL library path', ''),
|
||||
('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', ''),
|
||||
|
||||
(BoolOption('WITH_BF_PLAYER', 'Build blenderplayer if true', 'false')),
|
||||
(BoolVariable('WITH_BF_PLAYER', 'Build blenderplayer if true', False)),
|
||||
(BoolVariable('WITH_BF_NOBLENDER', 'Do not build blender if true', False)),
|
||||
|
||||
('CFLAGS', 'C-compiler flags', ''),
|
||||
('CCFLAGS', 'C++-compiler flags', ''),
|
||||
('CPPFLAGS', 'Defines', ''),
|
||||
('REL_CFLAGS', 'C release flags', ''),
|
||||
('REL_CCFLAGS', 'C++ release flags', ''),
|
||||
('CFLAGS', 'C only flags', ''),
|
||||
('CCFLAGS', 'Generic C and C++ flags', ''),
|
||||
('CXXFLAGS', 'C++ only flags', ''),
|
||||
('CPPFLAGS', 'Defines', ''),
|
||||
('REL_CFLAGS', 'C only release flags', ''),
|
||||
('REL_CCFLAGS', 'Generic C and C++ release flags', ''),
|
||||
('REL_CXXFLAGS', 'C++ only release flags', ''),
|
||||
|
||||
('C_WARN', 'C warning flags', ''),
|
||||
('CC_WARN', 'C++ warning flags', ''),
|
||||
('C_WARN', 'C warning flags', ''),
|
||||
('CC_WARN', 'Generic C and C++ warning flags', ''),
|
||||
('CXX_WARN', 'C++ only warning flags', ''),
|
||||
|
||||
('LLIBS', 'Platform libs', ''),
|
||||
('PLATFORM_LINKFLAGS', 'Platform linkflags', ''),
|
||||
('LLIBS', 'Platform libs', ''),
|
||||
('PLATFORM_LINKFLAGS', 'Platform linkflags', ''),
|
||||
|
||||
(BoolOption('BF_PROFILE', 'Add profiling information if true', 'false')),
|
||||
('BF_PROFILE_FLAGS', 'Profiling flags', ''),
|
||||
(BoolVariable('BF_PROFILE', 'Add profiling information if true', False)),
|
||||
('BF_PROFILE_CFLAGS', 'C only profiling flags', ''),
|
||||
('BF_PROFILE_CCFLAGS', 'C and C++ profiling flags', ''),
|
||||
('BF_PROFILE_CXXFLAGS', 'C++ only profiling flags', ''),
|
||||
|
||||
(BoolOption('BF_DEBUG', 'Add debug flags if true', 'false')),
|
||||
('BF_DEBUG_FLAGS', 'Debug flags', ''),
|
||||
(BoolVariable('BF_DEBUG', 'Add debug flags if true', False)),
|
||||
('BF_DEBUG_CFLAGS', 'C only debug flags', ''),
|
||||
('BF_DEBUG_CCFLAGS', 'C and C++ debug flags', ''),
|
||||
('BF_DEBUG_CXXFLAGS', 'C++ only debug flags', ''),
|
||||
|
||||
(BoolOption('BF_BSC', 'Create .bsc files (msvc only)', 'true')),
|
||||
(BoolVariable('BF_BSC', 'Create .bsc files (msvc only)', True)),
|
||||
|
||||
('BF_BUILDDIR', 'Build dir', ''),
|
||||
('BF_INSTALLDIR', 'Installation dir', ''),
|
||||
('BF_BUILDDIR', 'Build dir', ''),
|
||||
('BF_INSTALLDIR', 'Installation dir', ''),
|
||||
('BF_DOCDIR', 'Dir where BPy documentation will be created', ''),
|
||||
|
||||
('CC', 'C compiler to use', ''),
|
||||
('CXX', 'C++ compiler to use', ''),
|
||||
('CC', 'C compiler to use', ''),
|
||||
('CXX', 'C++ compiler to use', ''),
|
||||
|
||||
(BoolOption('BF_BUILDINFO', 'Buildtime in splash if true', 'true')),
|
||||
(BoolVariable('BF_BUILDINFO', 'Buildtime in splash if true', True)),
|
||||
|
||||
(BoolOption('BF_TWEAK_MODE', 'Enable tweak mode if true', 'false')),
|
||||
(BoolOption('BF_SPLIT_SRC', 'Split src lib into several chunks if true', 'false')),
|
||||
(BoolOption('WITHOUT_BF_INSTALL', 'dont install if true', 'false')),
|
||||
(BoolOption('BF_FANCY', 'Enable fancy output if true', 'true')),
|
||||
(BoolOption('BF_QUIET', 'Enable silent output if true', 'true')),
|
||||
(BoolOption('WITH_BF_BINRELOC', 'Enable relocatable binary (linux only)', 'false')),
|
||||
(BoolVariable('BF_TWEAK_MODE', 'Enable tweak mode if true', False)),
|
||||
(BoolVariable('BF_SPLIT_SRC', 'Split src lib into several chunks if true', False)),
|
||||
(BoolVariable('WITHOUT_BF_INSTALL', 'dont install if true', False)),
|
||||
(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)),
|
||||
|
||||
('BF_X264_CONFIG', 'configuration flags for x264', ''),
|
||||
('BF_XVIDCORE_CONFIG', 'configuration flags for xvidcore', ''),
|
||||
|
||||
('BF_CONFIG', 'SCons python config file used to set default options', 'user_config.py'),
|
||||
('BF_X264_CONFIG', 'configuration flags for x264', ''),
|
||||
('BF_XVIDCORE_CONFIG', 'configuration flags for xvidcore', ''),
|
||||
(BoolVariable('WITH_BF_DOCS', 'Generate API documentation', False)),
|
||||
|
||||
('BF_CONFIG', 'SCons python config file used to set default options', 'user_config.py'),
|
||||
('BF_NUMJOBS', 'Number of build processes to spawn', '1')
|
||||
|
||||
) # end of opts.AddOptions()
|
||||
) # end of opts.AddOptions()
|
||||
|
||||
return localopts
|
||||
return localopts
|
||||
|
||||
def NSIS_print(target, source, env):
|
||||
return "Creating NSIS installer for Blender 3D"
|
||||
return "Creating NSIS installer for Blender 3D"
|
||||
|
||||
def NSIS_Installer(target=None, source=None, env=None):
|
||||
|
||||
if env['OURPLATFORM'] != 'win32-vc' and env['OURPLATFORM'] != 'win32-mingw':
|
||||
print "NSIS installer is only available on Windows."
|
||||
Exit()
|
||||
|
||||
start_dir = os.getcwd()
|
||||
rel_dir = start_dir + "\\release\\windows\\installer\\"
|
||||
install_base_dir = start_dir + "\\"
|
||||
|
||||
if not os.path.exists(install_base_dir+env['BF_INSTALLDIR']+'/plugins/include'):
|
||||
os.mkdir(install_base_dir+env['BF_INSTALLDIR']+'/plugins/include')
|
||||
|
||||
for f in glob.glob('source/blender/blenpluginapi/*.h'):
|
||||
shutil.copy(f,install_base_dir+env['BF_INSTALLDIR']+'/plugins/include')
|
||||
if env['OURPLATFORM'] != 'win32-vc' and env['OURPLATFORM'] != 'win32-mingw':
|
||||
print "NSIS installer is only available on Windows."
|
||||
Exit()
|
||||
|
||||
start_dir = os.getcwd()
|
||||
rel_dir = start_dir + "\\release\\windows\\installer\\"
|
||||
install_base_dir = start_dir + "\\"
|
||||
|
||||
if not os.path.exists(install_base_dir+env['BF_INSTALLDIR']+'/plugins/include'):
|
||||
os.mkdir(install_base_dir+env['BF_INSTALLDIR']+'/plugins/include')
|
||||
|
||||
for f in glob.glob('source/blender/blenpluginapi/*.h'):
|
||||
shutil.copy(f,install_base_dir+env['BF_INSTALLDIR']+'/plugins/include')
|
||||
|
||||
shutil.copy('source/blender/blenpluginapi/plugin.def',install_base_dir+env['BF_INSTALLDIR']+'/plugins/include/')
|
||||
|
||||
os.chdir("release")
|
||||
v = open("VERSION")
|
||||
version = v.read()[:-1]
|
||||
shortver = version.split('.')[0] + version.split('.')[1]
|
||||
v.close()
|
||||
shutil.copy('source/blender/blenpluginapi/plugin.def',install_base_dir+env['BF_INSTALLDIR']+'/plugins/include/')
|
||||
|
||||
os.chdir("release")
|
||||
v = open("VERSION")
|
||||
version = v.read()[:-1]
|
||||
shortver = version.split('.')[0] + version.split('.')[1]
|
||||
v.close()
|
||||
|
||||
#### change to suit install dir ####
|
||||
inst_dir = install_base_dir + env['BF_INSTALLDIR']
|
||||
|
||||
os.chdir("windows/installer")
|
||||
#### change to suit install dir ####
|
||||
inst_dir = install_base_dir + env['BF_INSTALLDIR']
|
||||
|
||||
os.chdir("windows/installer")
|
||||
|
||||
ns = open("00.sconsblender.nsi","r")
|
||||
ns = open("00.sconsblender.nsi","r")
|
||||
|
||||
ns_cnt = str(ns.read())
|
||||
ns.close()
|
||||
ns_cnt = str(ns.read())
|
||||
ns.close()
|
||||
|
||||
# do root
|
||||
rootlist = []
|
||||
rootdir = os.listdir(inst_dir+"\\")
|
||||
for rootitem in rootdir:
|
||||
if os.path.isdir(inst_dir+"\\"+ rootitem) == 0:
|
||||
rootlist.append("File \"" + os.path.normpath(inst_dir) + "\\" + rootitem+"\"")
|
||||
rootstring = string.join(rootlist, "\n ")
|
||||
rootstring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[ROOTDIRCONTS]", rootstring)
|
||||
# do root
|
||||
rootlist = []
|
||||
rootdir = os.listdir(inst_dir+"\\")
|
||||
for rootitem in rootdir:
|
||||
if os.path.isdir(inst_dir+"\\"+ rootitem) == 0:
|
||||
rootlist.append("File \"" + os.path.normpath(inst_dir) + "\\" + rootitem+"\"")
|
||||
rootstring = string.join(rootlist, "\n ")
|
||||
rootstring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[ROOTDIRCONTS]", rootstring)
|
||||
|
||||
# do delete items
|
||||
delrootlist = []
|
||||
for rootitem in rootdir:
|
||||
if os.path.isdir(inst_dir + rootitem) == 0:
|
||||
delrootlist.append("Delete $INSTDIR\\" + rootitem)
|
||||
delrootstring = string.join(delrootlist, "\n ")
|
||||
delrootstring += "\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[DELROOTDIRCONTS]", delrootstring)
|
||||
# do delete items
|
||||
delrootlist = []
|
||||
for rootitem in rootdir:
|
||||
if os.path.isdir(inst_dir + rootitem) == 0:
|
||||
delrootlist.append("Delete $INSTDIR\\" + rootitem)
|
||||
delrootstring = string.join(delrootlist, "\n ")
|
||||
delrootstring += "\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[DELROOTDIRCONTS]", delrootstring)
|
||||
|
||||
# do scripts
|
||||
scriptlist = []
|
||||
scriptpath = "%s%s" % (inst_dir, "\\.blender\\scripts")
|
||||
scriptdir = os.listdir(scriptpath)
|
||||
for scriptitem in scriptdir:
|
||||
scriptfile = "%s\\%s" % (scriptpath, scriptitem)
|
||||
if os.path.isdir(scriptfile) == 0:
|
||||
scriptfile = os.path.normpath(scriptfile)
|
||||
scriptlist.append("File \"%s\"" % scriptfile)
|
||||
scriptstring = string.join(scriptlist, "\n ")
|
||||
scriptstring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[SCRIPTCONTS]", scriptstring)
|
||||
# do scripts
|
||||
scriptlist = []
|
||||
scriptpath = "%s%s" % (inst_dir, "\\.blender\\scripts")
|
||||
scriptdir = os.listdir(scriptpath)
|
||||
for scriptitem in scriptdir:
|
||||
scriptfile = "%s\\%s" % (scriptpath, scriptitem)
|
||||
if os.path.isdir(scriptfile) == 0:
|
||||
scriptfile = os.path.normpath(scriptfile)
|
||||
scriptlist.append("File \"%s\"" % scriptfile)
|
||||
scriptstring = string.join(scriptlist, "\n ")
|
||||
scriptstring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[SCRIPTCONTS]", scriptstring)
|
||||
|
||||
# do scripts\bpymodules
|
||||
bpymodlist = []
|
||||
bpymodpath = "%s%s" % (inst_dir, "\\.blender\\scripts\\bpymodules")
|
||||
bpymoddir = os.listdir(bpymodpath)
|
||||
# do scripts\bpymodules
|
||||
bpymodlist = []
|
||||
bpymodpath = "%s%s" % (inst_dir, "\\.blender\\scripts\\bpymodules")
|
||||
bpymoddir = os.listdir(bpymodpath)
|
||||
|
||||
for bpymoditem in bpymoddir:
|
||||
bpymodfile = "%s\\%s" % (bpymodpath, bpymoditem)
|
||||
if os.path.isdir(bpymodfile) == 0:
|
||||
bpymodfile = os.path.normpath(bpymodfile)
|
||||
bpymodlist.append("File \"%s\"" % bpymodfile)
|
||||
bpymodstring = string.join(bpymodlist, "\n ")
|
||||
bpymodstring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[SCRIPTMODCONTS]", bpymodstring)
|
||||
for bpymoditem in bpymoddir:
|
||||
bpymodfile = "%s\\%s" % (bpymodpath, bpymoditem)
|
||||
if os.path.isdir(bpymodfile) == 0:
|
||||
bpymodfile = os.path.normpath(bpymodfile)
|
||||
bpymodlist.append("File \"%s\"" % bpymodfile)
|
||||
bpymodstring = string.join(bpymodlist, "\n ")
|
||||
bpymodstring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[SCRIPTMODCONTS]", bpymodstring)
|
||||
|
||||
# do scripts\bpymodules\colladaimex
|
||||
colladalist = []
|
||||
bpymodpath = "%s%s" % (inst_dir, "\\.blender\\scripts\\bpymodules\\ColladaImEx")
|
||||
bpymoddir = os.listdir(bpymodpath)
|
||||
# do scripts\bpymodules\colladaimex
|
||||
colladalist = []
|
||||
bpymodpath = "%s%s" % (inst_dir, "\\.blender\\scripts\\bpymodules\\ColladaImEx")
|
||||
bpymoddir = os.listdir(bpymodpath)
|
||||
|
||||
for bpymoditem in bpymoddir:
|
||||
bpymodfile = "%s\\%s" % (bpymodpath, bpymoditem)
|
||||
if os.path.isdir(bpymodfile) == 0:
|
||||
bpymodfile=os.path.normpath(bpymodfile)
|
||||
colladalist.append("File \"%s\"" % bpymodfile)
|
||||
bpymodstring = string.join(colladalist, "\n ")
|
||||
bpymodstring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[SCRIPTMODCOLLADACONT]", bpymodstring)
|
||||
for bpymoditem in bpymoddir:
|
||||
bpymodfile = "%s\\%s" % (bpymodpath, bpymoditem)
|
||||
if os.path.isdir(bpymodfile) == 0:
|
||||
bpymodfile=os.path.normpath(bpymodfile)
|
||||
colladalist.append("File \"%s\"" % bpymodfile)
|
||||
bpymodstring = string.join(colladalist, "\n ")
|
||||
bpymodstring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[SCRIPTMODCOLLADACONT]", bpymodstring)
|
||||
|
||||
# do scripts\bpydata
|
||||
bpydatalist = []
|
||||
bpydatapath = "%s%s" % (inst_dir, "\\.blender\\scripts\\bpydata")
|
||||
bpydatadir = os.listdir(bpydatapath)
|
||||
for bpydataitem in bpydatadir:
|
||||
bpydatafile = "%s\\%s" % (bpydatapath, bpydataitem)
|
||||
if os.path.isdir(bpydatafile) == 0:
|
||||
bpydatalist.append("File \"%s\"" % bpydatafile)
|
||||
bpydatastring = string.join(bpydatalist, "\n ")
|
||||
bpydatastring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[SCRIPTDATACONTS]", bpydatastring)
|
||||
# do scripts\bpydata
|
||||
bpydatalist = []
|
||||
bpydatapath = "%s%s" % (inst_dir, "\\.blender\\scripts\\bpydata")
|
||||
bpydatadir = os.listdir(bpydatapath)
|
||||
for bpydataitem in bpydatadir:
|
||||
bpydatafile = "%s\\%s" % (bpydatapath, bpydataitem)
|
||||
if os.path.isdir(bpydatafile) == 0:
|
||||
bpydatalist.append("File \"%s\"" % bpydatafile)
|
||||
bpydatastring = string.join(bpydatalist, "\n ")
|
||||
bpydatastring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[SCRIPTDATACONTS]", bpydatastring)
|
||||
|
||||
# do plugins\include
|
||||
plugincludelist = []
|
||||
plugincludepath = "%s%s" % (inst_dir, "\\plugins\\include")
|
||||
plugincludedir = os.listdir(plugincludepath)
|
||||
for plugincludeitem in plugincludedir:
|
||||
plugincludefile = "%s\\%s" % (plugincludepath, plugincludeitem)
|
||||
if os.path.isdir(plugincludefile) == 0:
|
||||
if plugincludefile.find('.h') or plugincludefile.find('.DEF'):
|
||||
plugincludefile = os.path.normpath(plugincludefile)
|
||||
plugincludelist.append("File \"%s\"" % plugincludefile)
|
||||
plugincludestring = string.join(plugincludelist, "\n ")
|
||||
plugincludestring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[PLUGINCONTS]", plugincludestring)
|
||||
# do plugins\include
|
||||
plugincludelist = []
|
||||
plugincludepath = "%s%s" % (inst_dir, "\\plugins\\include")
|
||||
plugincludedir = os.listdir(plugincludepath)
|
||||
for plugincludeitem in plugincludedir:
|
||||
plugincludefile = "%s\\%s" % (plugincludepath, plugincludeitem)
|
||||
if os.path.isdir(plugincludefile) == 0:
|
||||
if plugincludefile.find('.h') or plugincludefile.find('.DEF'):
|
||||
plugincludefile = os.path.normpath(plugincludefile)
|
||||
plugincludelist.append("File \"%s\"" % plugincludefile)
|
||||
plugincludestring = string.join(plugincludelist, "\n ")
|
||||
plugincludestring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[PLUGINCONTS]", plugincludestring)
|
||||
|
||||
# do scripts\bpydata\config
|
||||
cfglist = []
|
||||
cfgpath = "%s%s" % (inst_dir, "\\.blender\\scripts\\bpydata\\config")
|
||||
cfgdir = os.listdir(cfgpath)
|
||||
for cfgitem in cfgdir:
|
||||
cfgfile = "%s\\%s" % (cfgpath, cfgitem)
|
||||
if os.path.isdir(cfgfile) == 0:
|
||||
cfglist.append("File \"%s\"" % cfgfile)
|
||||
cfgstring = string.join(cfglist, "\n ")
|
||||
cfgstring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[SCRIPTDATACFGCONTS]", cfgstring)
|
||||
# do scripts\bpydata\config
|
||||
cfglist = []
|
||||
cfgpath = "%s%s" % (inst_dir, "\\.blender\\scripts\\bpydata\\config")
|
||||
cfgdir = os.listdir(cfgpath)
|
||||
for cfgitem in cfgdir:
|
||||
cfgfile = "%s\\%s" % (cfgpath, cfgitem)
|
||||
if os.path.isdir(cfgfile) == 0:
|
||||
cfglist.append("File \"%s\"" % cfgfile)
|
||||
cfgstring = string.join(cfglist, "\n ")
|
||||
cfgstring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[SCRIPTDATACFGCONTS]", cfgstring)
|
||||
|
||||
# do dotblender
|
||||
dotblendlist = []
|
||||
dotblenddir = os.listdir(inst_dir+"\\.blender")
|
||||
for dotblenditem in dotblenddir:
|
||||
if os.path.isdir(inst_dir + "\\.blender\\" + dotblenditem) == 0:
|
||||
dotblendlist.append("File \"" + os.path.normpath(inst_dir) + "\\.blender\\" +
|
||||
dotblenditem+"\"")
|
||||
dotblendstring = string.join(dotblendlist, "\n ")
|
||||
dotblendstring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[DOTBLENDERCONTS]", dotblendstring)
|
||||
# do dotblender
|
||||
dotblendlist = []
|
||||
dotblenddir = os.listdir(inst_dir+"\\.blender")
|
||||
for dotblenditem in dotblenddir:
|
||||
if os.path.isdir(inst_dir + "\\.blender\\" + dotblenditem) == 0:
|
||||
dotblendlist.append("File \"" + os.path.normpath(inst_dir) + "\\.blender\\" +
|
||||
dotblenditem+"\"")
|
||||
dotblendstring = string.join(dotblendlist, "\n ")
|
||||
dotblendstring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[DOTBLENDERCONTS]", dotblendstring)
|
||||
|
||||
# do language files
|
||||
langlist = []
|
||||
langfiles = []
|
||||
langdir = os.listdir(inst_dir + "\\.blender\\locale")
|
||||
for langitem in langdir:
|
||||
if os.path.isdir(inst_dir + "\\.blender\\locale\\" + langitem) == 1:
|
||||
langfiles.append("SetOutPath $BLENDERHOME\\.blender\\locale\\" + langitem + "\\LC_MESSAGES")
|
||||
langfiles.append("File \"" + os.path.normpath(inst_dir) + "\\.blender\\locale\\"
|
||||
+ langitem + "\\LC_MESSAGES\\blender.mo\"")
|
||||
langstring = string.join(langfiles, "\n ")
|
||||
langstring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[LANGUAGECONTS]", langstring)
|
||||
# do language files
|
||||
langlist = []
|
||||
langfiles = []
|
||||
langdir = os.listdir(inst_dir + "\\.blender\\locale")
|
||||
for langitem in langdir:
|
||||
if os.path.isdir(inst_dir + "\\.blender\\locale\\" + langitem) == 1:
|
||||
langfiles.append("SetOutPath $BLENDERHOME\\.blender\\locale\\" + langitem + "\\LC_MESSAGES")
|
||||
langfiles.append("File \"" + os.path.normpath(inst_dir) + "\\.blender\\locale\\"
|
||||
+ langitem + "\\LC_MESSAGES\\blender.mo\"")
|
||||
langstring = string.join(langfiles, "\n ")
|
||||
langstring += "\n\n"
|
||||
ns_cnt = string.replace(ns_cnt, "[LANGUAGECONTS]", langstring)
|
||||
|
||||
# var replacements
|
||||
ns_cnt = string.replace(ns_cnt, "DISTDIR", os.path.normpath(inst_dir+"\\"))
|
||||
ns_cnt = string.replace(ns_cnt, "SHORTVER", shortver)
|
||||
ns_cnt = string.replace(ns_cnt, "VERSION", version)
|
||||
ns_cnt = string.replace(ns_cnt, "RELDIR", os.path.normpath(rel_dir))
|
||||
# var replacements
|
||||
ns_cnt = string.replace(ns_cnt, "DISTDIR", os.path.normpath(inst_dir+"\\"))
|
||||
ns_cnt = string.replace(ns_cnt, "SHORTVER", shortver)
|
||||
ns_cnt = string.replace(ns_cnt, "VERSION", version)
|
||||
ns_cnt = string.replace(ns_cnt, "RELDIR", os.path.normpath(rel_dir))
|
||||
|
||||
tmpnsi = os.path.normpath(install_base_dir+os.sep+env['BF_BUILDDIR']+os.sep+"00.blender_tmp.nsi")
|
||||
new_nsis = open(tmpnsi, 'w')
|
||||
new_nsis.write(ns_cnt)
|
||||
new_nsis.close()
|
||||
tmpnsi = os.path.normpath(install_base_dir+os.sep+env['BF_BUILDDIR']+os.sep+"00.blender_tmp.nsi")
|
||||
new_nsis = open(tmpnsi, 'w')
|
||||
new_nsis.write(ns_cnt)
|
||||
new_nsis.close()
|
||||
|
||||
os.chdir(start_dir)
|
||||
os.chdir(start_dir)
|
||||
|
||||
cmdline = "makensis " + "\""+tmpnsi+"\""
|
||||
cmdline = "makensis " + "\""+tmpnsi+"\""
|
||||
|
||||
startupinfo = subprocess.STARTUPINFO()
|
||||
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||
proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE, startupinfo=startupinfo, shell = True)
|
||||
data, err = proc.communicate()
|
||||
rv = proc.wait()
|
||||
startupinfo = subprocess.STARTUPINFO()
|
||||
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||
proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE, startupinfo=startupinfo, shell = True)
|
||||
data, err = proc.communicate()
|
||||
rv = proc.wait()
|
||||
|
||||
if rv != 0:
|
||||
print
|
||||
print data.strip().split("\n")[-1]
|
||||
return rv
|
||||
if rv != 0:
|
||||
print
|
||||
print data.strip().split("\n")[-1]
|
||||
return rv
|
||||
|
||||
|
Reference in New Issue
Block a user