3 # ***** BEGIN GPL LICENSE BLOCK *****
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software Foundation,
17 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 # The Original Code is Copyright (C) 2006, Blender Foundation
20 # All rights reserved.
22 # The Original Code is: all of this file.
24 # Contributor(s): Nathan Letwory.
26 # ***** END GPL LICENSE BLOCK *****
28 # Main entry-point for the SCons building system
29 # Set up some custom actions and target/argument handling
30 # Then read all SConscripts and build
32 import platform as pltfrm
34 # Need a better way to do this. Automagical maybe is not the best thing, maybe it is.
35 if pltfrm.architecture()[0] == '64bit':
47 from tempfile import mkdtemp
50 toolpath=os.path.join(".", "build_files", "scons", "tools")
52 # needed for importing tools
53 sys.path.append(toolpath)
59 EnsureSConsVersion(1,0,0)
61 BlenderEnvironment = Blender.BlenderEnvironment
64 VERSION = btools.VERSION # This is used in creating the local config directories
67 platform = sys.platform
71 ##### BEGIN SETUP #####
73 B.possible_types = ['core', 'player', 'intern', 'extern']
75 B.binarykind = ['blender' , 'blenderplayer']
76 ##################################
77 # target and argument validation #
78 ##################################
79 # XX cheating for BF_FANCY, we check for BF_FANCY before args are validated
80 use_color = ARGUMENTS.get('BF_FANCY', '1')
84 if not use_color=='1':
87 #on defaut white Os X terminal, some colors are totally unlegible
88 if platform=='darwin':
89 B.bc.OKGREEN = '\033[34m'
90 B.bc.WARNING = '\033[36m'
93 print B.bc.HEADER+'Command-line arguments'+B.bc.ENDC
94 B.arguments = btools.validate_arguments(ARGUMENTS, B.bc)
95 btools.print_arguments(B.arguments, B.bc)
98 print B.bc.HEADER+'Command-line targets'+B.bc.ENDC
99 B.targets = btools.validate_targets(COMMAND_LINE_TARGETS, B.bc)
100 btools.print_targets(B.targets, B.bc)
102 ##########################
103 # setting up environment #
104 ##########################
106 # handling cmd line arguments & config file
108 # first check cmdline for toolset and we create env to work on
109 quickie = B.arguments.get('BF_QUICK', None)
110 quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
113 B.quickdebug=string.split(quickdebug, ',')
118 B.quickie=string.split(quickie,',')
122 toolset = B.arguments.get('BF_TOOLSET', None)
124 print "Using " + toolset
125 if toolset=='mstoolkit':
126 env = BlenderEnvironment(ENV = os.environ)
127 env.Tool('mstoolkit', [toolpath])
129 env = BlenderEnvironment(tools=[toolset], ENV = os.environ)
130 # xxx commented out, as was supressing warnings under mingw..
132 # btools.SetupSpawn(env)
134 if bitness==64 and platform=='win32':
135 env = BlenderEnvironment(ENV = os.environ, MSVS_ARCH='amd64')
137 env = BlenderEnvironment(ENV = os.environ)
140 print "Could not create a build environment"
144 cc = B.arguments.get('CC', None)
145 cxx = B.arguments.get('CXX', None)
151 if env['CC'] in ['cl', 'cl.exe'] and sys.platform=='win32':
153 platform = 'win64-vc'
155 platform = 'win32-vc'
156 elif env['CC'] in ['gcc'] and sys.platform=='win32':
157 platform = 'win32-mingw'
159 env.SConscriptChdir(0)
161 crossbuild = B.arguments.get('BF_CROSS', None)
162 if crossbuild and platform not in ('win32-vc', 'win64-vc'):
163 platform = 'linuxcross'
165 env['OURPLATFORM'] = platform
167 configfile = os.path.join("build_files", "scons", "config", platform + "-config.py")
169 if os.path.exists(configfile):
170 print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile
172 print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC
174 if crossbuild and env['PLATFORM'] != 'win32':
175 print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC
176 env.Tool('crossmingw', [toolpath])
177 # todo: determine proper libs/includes etc.
178 # Needed for gui programs, console programs should do without it
180 # Now we don't need this option to have console window
181 # env.Append(LINKFLAGS=['-mwindows'])
183 userconfig = B.arguments.get('BF_CONFIG', 'user-config.py')
184 # first read platform config. B.arguments will override
185 optfiles = [configfile]
186 if os.path.exists(userconfig):
187 print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig
188 optfiles += [userconfig]
190 print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC
192 opts = btools.read_opts(env, optfiles, B.arguments)
195 if not env['BF_FANCY']:
199 # remove install dir so old and new files are not mixed.
200 # NOTE: only do the scripts directory for now, otherwise is too disruptive for developers
201 # TODO: perhaps we need an option (off by default) to not do this altogether...
202 if not env['WITHOUT_BF_INSTALL'] and not env['WITHOUT_BF_OVERWRITE_INSTALL']:
203 scriptsDir = os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts')
204 if os.path.isdir(scriptsDir):
205 print B.bc.OKGREEN + "Clearing installation directory%s: %s" % (B.bc.ENDC, os.path.abspath(scriptsDir))
206 shutil.rmtree(scriptsDir)
209 SetOption('num_jobs', int(env['BF_NUMJOBS']))
210 print B.bc.OKGREEN + "Build with parallel jobs%s: %s" % (B.bc.ENDC, GetOption('num_jobs'))
211 print B.bc.OKGREEN + "Build with debug symbols%s: %s" % (B.bc.ENDC, env['BF_DEBUG'])
213 # BLENDERPATH is a unix only option to enable typical style paths this is
214 # spesifically a data-dir, which is used a lot but cant replace BF_INSTALLDIR
215 # because the blender binary is installed in $BF_INSTALLDIR/bin/blender
217 if env['WITH_BF_FHS']:
218 BLENDERPATH = os.path.join(env['BF_INSTALLDIR'], 'share', 'blender', env['BF_VERSION'])
220 BLENDERPATH = env['BF_INSTALLDIR']
222 if env['WITH_BF_OPENMP'] == 1:
223 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
224 env['CCFLAGS'].append('/openmp')
225 env['CPPFLAGS'].append('/openmp')
226 env['CXXFLAGS'].append('/openmp')
228 if env['CC'].endswith('icc'): # to be able to handle CC=/opt/bla/icc case
229 env.Append(LINKFLAGS=['-openmp', '-static-intel'])
230 env['CCFLAGS'].append('-openmp')
231 env['CPPFLAGS'].append('-openmp')
232 env['CXXFLAGS'].append('-openmp')
234 env.Append(CCFLAGS=['-fopenmp'])
235 env.Append(CPPFLAGS=['-fopenmp'])
236 env.Append(CXXFLAGS=['-fopenmp'])
238 if env['WITH_GHOST_COCOA'] == True:
239 env.Append(CFLAGS=['-DGHOST_COCOA'])
240 env.Append(CXXFLAGS=['-DGHOST_COCOA'])
241 env.Append(CPPFLAGS=['-DGHOST_COCOA'])
243 if env['USE_QTKIT'] == True:
244 env.Append(CFLAGS=['-DUSE_QTKIT'])
245 env.Append(CXXFLAGS=['-DUSE_QTKIT'])
246 env.Append(CPPFLAGS=['-DUSE_QTKIT'])
248 #check for additional debug libnames
250 if env.has_key('BF_DEBUG_LIBS'):
251 B.quickdebug += env['BF_DEBUG_LIBS']
253 printdebug = B.arguments.get('BF_LISTDEBUG', 0)
255 if len(B.quickdebug) > 0 and printdebug != 0:
256 print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC
257 for l in B.quickdebug:
260 # remove stdc++ from LLIBS if we are building a statc linked CXXFLAGS
261 if env['WITH_BF_STATICCXX']:
262 if 'stdc++' in env['LLIBS']:
263 env['LLIBS'].remove('stdc++')
265 print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform'
267 # check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline
268 if 'blenderplayer' in B.targets:
269 env['WITH_BF_PLAYER'] = True
271 if 'blendernogame' in B.targets:
272 env['WITH_BF_GAMEENGINE'] = False
274 if 'blenderlite' in B.targets:
276 target_env_defs['WITH_BF_GAMEENGINE'] = False
277 target_env_defs['WITH_BF_OPENAL'] = False
278 target_env_defs['WITH_BF_OPENEXR'] = False
279 target_env_defs['WITH_BF_OPENMP'] = False
280 target_env_defs['WITH_BF_ICONV'] = False
281 target_env_defs['WITH_BF_INTERNATIONAL'] = False
282 target_env_defs['WITH_BF_OPENJPEG'] = False
283 target_env_defs['WITH_BF_FFMPEG'] = False
284 target_env_defs['WITH_BF_QUICKTIME'] = False
285 target_env_defs['WITH_BF_REDCODE'] = False
286 target_env_defs['WITH_BF_DDS'] = False
287 target_env_defs['WITH_BF_ZLIB'] = False
288 target_env_defs['WITH_BF_SDL'] = False
289 target_env_defs['WITH_BF_JPEG'] = False
290 target_env_defs['WITH_BF_PNG'] = False
291 target_env_defs['WITH_BF_BULLET'] = False
292 target_env_defs['WITH_BF_BINRELOC'] = False
293 target_env_defs['BF_BUILDINFO'] = False
294 target_env_defs['BF_NO_ELBEEM'] = True
295 target_env_defs['WITH_BF_PYTHON'] = False
297 # Merge blenderlite, let command line to override
298 for k,v in target_env_defs.iteritems():
299 if k not in B.arguments:
302 # disable elbeem (fluidsim) compilation?
303 if env['BF_NO_ELBEEM'] == 1:
304 env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
305 env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
306 env['CCFLAGS'].append('-DDISABLE_ELBEEM')
308 if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming', 'win64-vc'):
309 env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup')
310 env['PLATFORM_LINKFLAGS'].append('/ENTRY:main')
312 # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
313 B.root_build_dir = env['BF_BUILDDIR']
314 B.doc_build_dir = os.path.join(BLENDERPATH, 'doc')
315 if not B.root_build_dir[-1]==os.sep:
316 B.root_build_dir += os.sep
317 if not B.doc_build_dir[-1]==os.sep:
318 B.doc_build_dir += os.sep
320 # We do a shortcut for clean when no quicklist is given: just delete
321 # builddir without reading in SConscripts
323 if 'clean' in B.targets:
326 if not quickie and do_clean:
327 if os.path.exists(B.doc_build_dir):
328 print B.bc.HEADER+'Cleaning doc dir...'+B.bc.ENDC
329 dirs = os.listdir(B.doc_build_dir)
331 if os.path.isdir(B.doc_build_dir + entry) == 1:
332 print "clean dir %s"%(B.doc_build_dir+entry)
333 shutil.rmtree(B.doc_build_dir+entry)
335 print "remove file %s"%(B.doc_build_dir+entry)
336 os.remove(B.root_build_dir+entry)
337 if os.path.exists(B.root_build_dir):
338 print B.bc.HEADER+'Cleaning build dir...'+B.bc.ENDC
339 dirs = os.listdir(B.root_build_dir)
341 if os.path.isdir(B.root_build_dir + entry) == 1:
342 print "clean dir %s"%(B.root_build_dir+entry)
343 shutil.rmtree(B.root_build_dir+entry)
345 print "remove file %s"%(B.root_build_dir+entry)
346 os.remove(B.root_build_dir+entry)
347 for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak',
348 'extern/xvidcore/build/generic/platform.inc', 'extern/ffmpeg/include']:
349 if os.path.exists(confile):
350 print "clean file %s"%confile
351 if os.path.isdir(confile):
352 for root, dirs, files in os.walk(confile):
354 os.remove(os.path.join(root, name))
357 print B.bc.OKGREEN+'...done'+B.bc.ENDC
359 print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
362 if not os.path.isdir ( B.root_build_dir):
363 os.makedirs ( B.root_build_dir )
364 os.makedirs ( B.root_build_dir + 'source' )
365 os.makedirs ( B.root_build_dir + 'intern' )
366 os.makedirs ( B.root_build_dir + 'extern' )
367 os.makedirs ( B.root_build_dir + 'lib' )
368 os.makedirs ( B.root_build_dir + 'bin' )
369 if not os.path.isdir(B.doc_build_dir) and env['WITH_BF_DOCS']:
370 os.makedirs ( B.doc_build_dir )
372 Help(opts.GenerateHelpText(env))
374 # default is new quieter output, but if you need to see the
375 # commands, do 'scons BF_QUIET=0'
376 bf_quietoutput = B.arguments.get('BF_QUIET', '1')
378 B.set_quiet_output(env)
383 print B.bc.HEADER+'Building in: ' + B.bc.ENDC + os.path.abspath(B.root_build_dir)
384 env.SConsignFile(B.root_build_dir+'scons-signatures')
387 ##### END SETUP ##########
391 BuildDir(B.root_build_dir+'/intern', 'intern', duplicate=0)
392 SConscript(B.root_build_dir+'/intern/SConscript')
393 BuildDir(B.root_build_dir+'/extern', 'extern', duplicate=0)
394 SConscript(B.root_build_dir+'/extern/SConscript')
395 BuildDir(B.root_build_dir+'/source', 'source', duplicate=0)
396 SConscript(B.root_build_dir+'/source/SConscript')
398 # now that we have read all SConscripts, we know what
399 # libraries will be built. Create list of
400 # libraries to give as objects to linking phase
402 for tp in B.possible_types:
403 if not tp == 'player':
404 mainlist += B.create_blender_liblist(env, tp)
406 if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
407 B.propose_priorities()
409 dobj = B.buildinfo(env, "dynamic") + B.resources
410 thestatlibs, thelibincs = B.setup_staticlibs(env)
411 thesyslibs = B.setup_syslibs(env)
413 if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
414 env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
415 if env['WITH_BF_PLAYER']:
416 playerlist = B.create_blender_liblist(env, 'player')
417 playerlist += B.create_blender_liblist(env, 'intern')
418 playerlist += B.create_blender_liblist(env, 'extern')
419 env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
421 ##### Now define some targets
424 #------------ INSTALL
428 if env['OURPLATFORM']=='darwin':
429 for prg in B.program_list:
430 bundle = '%s.app' % prg[0]
431 bundledir = os.path.dirname(bundle)
432 for dp, dn, df in os.walk(bundle):
435 dir=env['BF_INSTALLDIR']+dp[len(bundledir):]
436 source=[dp+os.sep+f for f in df]
437 blenderinstall.append(env.Install(dir=dir,source=source))
439 if env['WITH_BF_FHS']: dir= os.path.join(env['BF_INSTALLDIR'], 'bin')
440 else: dir= env['BF_INSTALLDIR']
442 blenderinstall = env.Install(dir=dir, source=B.program_list)
444 #-- local path = config files in install dir: installdir\VERSION
445 #- dont do config and scripts for darwin, it is already in the bundle
448 datafilestargetlist = []
452 if env['OURPLATFORM']!='darwin':
453 for dp, dn, df in os.walk('bin/.blender'):
458 if not env['WITH_BF_INTERNATIONAL']:
461 if f == '.Blanguages':
463 if not env['WITH_BF_FREETYPE']:
464 if f.endswith('.ttf'):
468 datafileslist.append(os.path.join(dp,f))
469 if env['WITH_BF_FHS']: dir= os.path.join(*([BLENDERPATH] + ['datafiles'] + dp.split(os.sep)[2:])) # skip bin/.blender
470 else: dir= os.path.join(*([BLENDERPATH] + [VERSION] + ['datafiles'] + dp.split(os.sep)[1:])) # skip bin
471 datafilestargetlist.append(dir + os.sep + f)
474 dotblendlist.append(os.path.join(dp, f))
475 if env['WITH_BF_FHS']: dir= os.path.join(*([BLENDERPATH] + ['config'] + dp.split(os.sep)[2:])) # skip bin/.blender
476 else: dir= os.path.join(*([BLENDERPATH] + [VERSION] + ['config'] + dp.split(os.sep)[1:])) # skip bin
478 dottargetlist.append(dir + os.sep + f)
480 dotblenderinstall = []
481 for targetdir,srcfile in zip(dottargetlist, dotblendlist):
482 td, tf = os.path.split(targetdir)
483 dotblenderinstall.append(env.Install(dir=td, source=srcfile))
484 for targetdir,srcfile in zip(datafilestargetlist, datafileslist):
485 td, tf = os.path.split(targetdir)
486 dotblenderinstall.append(env.Install(dir=td, source=srcfile))
488 if env['WITH_BF_PYTHON']:
489 #-- local/VERSION/scripts
490 scriptpaths=['release/scripts']
491 for scriptpath in scriptpaths:
492 for dp, dn, df in os.walk(scriptpath):
496 if env['WITH_BF_FHS']: dir = BLENDERPATH
497 else: dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
498 dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
500 source=[os.path.join(dp, f) for f in df if f[-3:]!='pyc']
501 scriptinstall.append(env.Install(dir=dir,source=source))
504 if env['OURPLATFORM']=='linux2':
508 for tp, tn, tf in os.walk('release/freedesktop/icons'):
512 iconlist.append(os.path.join(tp, f))
513 icontargetlist.append( os.path.join(*([BLENDERPATH] + tp.split(os.sep)[2:] + [f])) )
516 for targetdir,srcfile in zip(icontargetlist, iconlist):
517 td, tf = os.path.split(targetdir)
518 iconinstall.append(env.Install(dir=td, source=srcfile))
520 # dlls for linuxcross
521 # TODO - add more libs, for now this lets blenderlite run
522 if env['OURPLATFORM']=='linuxcross':
523 dir=env['BF_INSTALLDIR']
526 if env['WITH_BF_OPENMP']:
527 source += ['../lib/windows/pthreads/lib/pthreadGC2.dll']
529 scriptinstall.append(env.Install(dir=dir, source=source))
534 for tp, tn, tf in os.walk('release/plugins'):
537 df = tp[8:] # remove 'release/'
539 pluglist.append(os.path.join(tp, f))
540 plugtargetlist.append( os.path.join(BLENDERPATH, df, f) )
543 # header files for plugins
544 pluglist.append('source/blender/blenpluginapi/documentation.h')
545 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'documentation.h'))
546 pluglist.append('source/blender/blenpluginapi/externdef.h')
547 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'externdef.h'))
548 pluglist.append('source/blender/blenpluginapi/floatpatch.h')
549 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'floatpatch.h'))
550 pluglist.append('source/blender/blenpluginapi/iff.h')
551 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'iff.h'))
552 pluglist.append('source/blender/blenpluginapi/plugin.h')
553 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'plugin.h'))
554 pluglist.append('source/blender/blenpluginapi/util.h')
555 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'util.h'))
556 pluglist.append('source/blender/blenpluginapi/plugin.DEF')
557 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'plugin.def'))
560 for targetdir,srcfile in zip(plugtargetlist, pluglist):
561 td, tf = os.path.split(targetdir)
562 plugininstall.append(env.Install(dir=td, source=srcfile))
566 for tp, tn, tf in os.walk('release/text'):
570 textlist.append(tp+os.sep+f)
572 textinstall = env.Install(dir=BLENDERPATH, source=textlist)
574 if env['OURPLATFORM']=='darwin':
575 allinstall = [blenderinstall, plugininstall, textinstall]
576 elif env['OURPLATFORM']=='linux2':
577 allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall, iconinstall]
579 allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
581 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
584 if not env['OURPLATFORM'] in ('win32-mingw', 'win64-vc', 'linuxcross'):
585 # For MinGW and linuxcross static linking will be used
586 dllsources += ['${LCGDIR}/gettext/lib/gnu_gettext.dll']
588 #currently win64-vc doesn't appear to have libpng.dll
589 if env['OURPLATFORM'] != 'win64-vc':
590 dllsources += ['${BF_PNG_LIBPATH}/libpng.dll']
592 dllsources += ['${BF_ZLIB_LIBPATH}/zlib.dll']
593 # Used when linking to libtiff was dynamic
594 # keep it here until compilation on all platform would be ok
595 # dllsources += ['${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll']
597 if env['OURPLATFORM'] != 'linuxcross':
598 # pthreads library is already added
599 dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll']
601 if env['WITH_BF_SDL']:
602 if env['OURPLATFORM'] == 'win64-vc':
603 pass # we link statically already to SDL on win64
605 dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
607 if env['WITH_BF_PYTHON']:
609 dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll')
611 dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll')
613 if env['WITH_BF_ICONV']:
614 if env['OURPLATFORM'] == 'win64-vc':
615 pass # we link statically to iconv on win64
616 elif not env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'):
617 #gettext for MinGW and cross-compilation is compiled staticly
618 dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll']
620 if env['WITH_BF_OPENAL']:
621 dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
622 dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
624 if env['WITH_BF_SNDFILE']:
625 dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
627 if env['WITH_BF_FFMPEG']:
628 dllsources += ['${BF_FFMPEG_LIBPATH}/avcodec-52.dll',
629 '${BF_FFMPEG_LIBPATH}/avformat-52.dll',
630 '${BF_FFMPEG_LIBPATH}/avdevice-52.dll',
631 '${BF_FFMPEG_LIBPATH}/avutil-50.dll',
632 '${BF_FFMPEG_LIBPATH}/swscale-0.dll']
634 if env['WITH_BF_JACK']:
635 dllsources += ['${LCGDIR}/jack/lib/libjack.dll']
636 windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
637 allinstall += windlls
639 installtarget = env.Alias('install', allinstall)
640 bininstalltarget = env.Alias('install-bin', blenderinstall)
642 nsisaction = env.Action(btools.NSIS_Installer, btools.NSIS_print)
643 nsiscmd = env.Command('nsisinstaller', None, nsisaction)
644 nsisalias = env.Alias('nsis', nsiscmd)
646 if 'blender' in B.targets:
647 blenderexe= env.Alias('blender', B.program_list)
648 Depends(blenderexe,installtarget)
650 if env['WITH_BF_PLAYER']:
651 blenderplayer = env.Alias('blenderplayer', B.program_list)
652 Depends(blenderplayer,installtarget)
654 if not env['WITH_BF_GAMEENGINE']:
655 blendernogame = env.Alias('blendernogame', B.program_list)
656 Depends(blendernogame,installtarget)
658 if 'blenderlite' in B.targets:
659 blenderlite = env.Alias('blenderlite', B.program_list)
660 Depends(blenderlite,installtarget)
662 Depends(nsiscmd, allinstall)
664 Default(B.program_list)
666 if not env['WITHOUT_BF_INSTALL']:
667 Default(installtarget)
670 if env['WITH_BF_DOCS']:
677 SConscript('source/gameengine/PyDoc/SConscript')
679 print "No epydoc install detected, Python API and Gameengine API Docs will not be generated "