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
49 # needed for importing tools
50 sys.path.append(os.path.join(".", "build_files", "scons", "tools"))
56 EnsureSConsVersion(1,0,0)
58 BlenderEnvironment = Blender.BlenderEnvironment
61 VERSION = btools.VERSION # This is used in creating the local config directories
64 platform = sys.platform
68 ##### BEGIN SETUP #####
70 B.possible_types = ['core', 'player', 'intern', 'extern']
72 B.binarykind = ['blender' , 'blenderplayer']
73 ##################################
74 # target and argument validation #
75 ##################################
76 # XX cheating for BF_FANCY, we check for BF_FANCY before args are validated
77 use_color = ARGUMENTS.get('BF_FANCY', '1')
81 if not use_color=='1':
84 #on defaut white Os X terminal, some colors are totally unlegible
85 if platform=='darwin':
86 B.bc.OKGREEN = '\033[34m'
87 B.bc.WARNING = '\033[36m'
90 print B.bc.HEADER+'Command-line arguments'+B.bc.ENDC
91 B.arguments = btools.validate_arguments(ARGUMENTS, B.bc)
92 btools.print_arguments(B.arguments, B.bc)
95 print B.bc.HEADER+'Command-line targets'+B.bc.ENDC
96 B.targets = btools.validate_targets(COMMAND_LINE_TARGETS, B.bc)
97 btools.print_targets(B.targets, B.bc)
99 ##########################
100 # setting up environment #
101 ##########################
103 # handling cmd line arguments & config file
105 # first check cmdline for toolset and we create env to work on
106 quickie = B.arguments.get('BF_QUICK', None)
107 quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
110 B.quickdebug=string.split(quickdebug, ',')
115 B.quickie=string.split(quickie,',')
119 toolset = B.arguments.get('BF_TOOLSET', None)
121 print "Using " + toolset
122 if toolset=='mstoolkit':
123 env = BlenderEnvironment(ENV = os.environ)
124 env.Tool('mstoolkit', ['tools'])
126 env = BlenderEnvironment(tools=[toolset], ENV = os.environ)
127 # xxx commented out, as was supressing warnings under mingw..
129 # btools.SetupSpawn(env)
131 if bitness==64 and platform=='win32':
132 env = BlenderEnvironment(ENV = os.environ, MSVS_ARCH='amd64')
134 env = BlenderEnvironment(ENV = os.environ)
137 print "Could not create a build environment"
141 cc = B.arguments.get('CC', None)
142 cxx = B.arguments.get('CXX', None)
148 if env['CC'] in ['cl', 'cl.exe'] and sys.platform=='win32':
150 platform = 'win64-vc'
152 platform = 'win32-vc'
153 elif env['CC'] in ['gcc'] and sys.platform=='win32':
154 platform = 'win32-mingw'
156 env.SConscriptChdir(0)
158 crossbuild = B.arguments.get('BF_CROSS', None)
159 if crossbuild and platform not in ('win32-vc', 'win64-vc'):
160 platform = 'linuxcross'
162 env['OURPLATFORM'] = platform
164 configfile = os.path.join("build_files", "scons", "config", platform + "-config.py")
166 if os.path.exists(configfile):
167 print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile
169 print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC
171 if crossbuild and env['PLATFORM'] != 'win32':
172 print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC
173 env.Tool('crossmingw', ['tools'])
174 # todo: determine proper libs/includes etc.
175 # Needed for gui programs, console programs should do without it
177 # Now we don't need this option to have console window
178 # env.Append(LINKFLAGS=['-mwindows'])
180 userconfig = B.arguments.get('BF_CONFIG', 'user-config.py')
181 # first read platform config. B.arguments will override
182 optfiles = [configfile]
183 if os.path.exists(userconfig):
184 print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig
185 optfiles += [userconfig]
187 print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC
189 opts = btools.read_opts(env, optfiles, B.arguments)
192 if not env['BF_FANCY']:
196 # remove install dir so old and new files are not mixed.
197 # NOTE: only do the scripts directory for now, otherwise is too disruptive for developers
198 # TODO: perhaps we need an option (off by default) to not do this altogether...
199 if not env['WITHOUT_BF_INSTALL'] and not env['WITHOUT_BF_OVERWRITE_INSTALL']:
200 scriptsDir = os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts')
201 if os.path.isdir(scriptsDir):
202 print B.bc.OKGREEN + "Clearing installation directory%s: %s" % (B.bc.ENDC, os.path.abspath(scriptsDir))
203 shutil.rmtree(scriptsDir)
206 SetOption('num_jobs', int(env['BF_NUMJOBS']))
207 print B.bc.OKGREEN + "Build with parallel jobs%s: %s" % (B.bc.ENDC, GetOption('num_jobs'))
208 print B.bc.OKGREEN + "Build with debug symbols%s: %s" % (B.bc.ENDC, env['BF_DEBUG'])
210 # BLENDERPATH is a unix only option to enable typical style paths this is
211 # spesifically a data-dir, which is used a lot but cant replace BF_INSTALLDIR
212 # because the blender binary is installed in $BF_INSTALLDIR/bin/blender
214 if env['WITH_BF_FHS']:
215 BLENDERPATH = os.path.join(env['BF_INSTALLDIR'], 'share', 'blender', env['BF_VERSION'])
217 BLENDERPATH = env['BF_INSTALLDIR']
219 if env['WITH_BF_OPENMP'] == 1:
220 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
221 env['CCFLAGS'].append('/openmp')
222 env['CPPFLAGS'].append('/openmp')
223 env['CXXFLAGS'].append('/openmp')
225 if env['CC'].endswith('icc'): # to be able to handle CC=/opt/bla/icc case
226 env.Append(LINKFLAGS=['-openmp', '-static-intel'])
227 env['CCFLAGS'].append('-openmp')
228 env['CPPFLAGS'].append('-openmp')
229 env['CXXFLAGS'].append('-openmp')
231 env.Append(CCFLAGS=['-fopenmp'])
232 env.Append(CPPFLAGS=['-fopenmp'])
233 env.Append(CXXFLAGS=['-fopenmp'])
235 if env['WITH_GHOST_COCOA'] == True:
236 env.Append(CFLAGS=['-DGHOST_COCOA'])
237 env.Append(CXXFLAGS=['-DGHOST_COCOA'])
238 env.Append(CPPFLAGS=['-DGHOST_COCOA'])
240 if env['USE_QTKIT'] == True:
241 env.Append(CFLAGS=['-DUSE_QTKIT'])
242 env.Append(CXXFLAGS=['-DUSE_QTKIT'])
243 env.Append(CPPFLAGS=['-DUSE_QTKIT'])
245 #check for additional debug libnames
247 if env.has_key('BF_DEBUG_LIBS'):
248 B.quickdebug += env['BF_DEBUG_LIBS']
250 printdebug = B.arguments.get('BF_LISTDEBUG', 0)
252 if len(B.quickdebug) > 0 and printdebug != 0:
253 print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC
254 for l in B.quickdebug:
257 # remove stdc++ from LLIBS if we are building a statc linked CXXFLAGS
258 if env['WITH_BF_STATICCXX']:
259 if 'stdc++' in env['LLIBS']:
260 env['LLIBS'].remove('stdc++')
262 print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform'
264 # check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline
265 if 'blenderplayer' in B.targets:
266 env['WITH_BF_PLAYER'] = True
268 if 'blendernogame' in B.targets:
269 env['WITH_BF_GAMEENGINE'] = False
271 if 'blenderlite' in B.targets:
273 target_env_defs['WITH_BF_GAMEENGINE'] = False
274 target_env_defs['WITH_BF_OPENAL'] = False
275 target_env_defs['WITH_BF_OPENEXR'] = False
276 target_env_defs['WITH_BF_OPENMP'] = False
277 target_env_defs['WITH_BF_ICONV'] = False
278 target_env_defs['WITH_BF_INTERNATIONAL'] = False
279 target_env_defs['WITH_BF_OPENJPEG'] = False
280 target_env_defs['WITH_BF_FFMPEG'] = False
281 target_env_defs['WITH_BF_QUICKTIME'] = False
282 target_env_defs['WITH_BF_REDCODE'] = False
283 target_env_defs['WITH_BF_DDS'] = False
284 target_env_defs['WITH_BF_ZLIB'] = False
285 target_env_defs['WITH_BF_SDL'] = False
286 target_env_defs['WITH_BF_JPEG'] = False
287 target_env_defs['WITH_BF_PNG'] = False
288 target_env_defs['WITH_BF_BULLET'] = False
289 target_env_defs['WITH_BF_BINRELOC'] = False
290 target_env_defs['BF_BUILDINFO'] = False
291 target_env_defs['BF_NO_ELBEEM'] = True
292 target_env_defs['WITH_BF_PYTHON'] = False
294 # Merge blenderlite, let command line to override
295 for k,v in target_env_defs.iteritems():
296 if k not in B.arguments:
299 # disable elbeem (fluidsim) compilation?
300 if env['BF_NO_ELBEEM'] == 1:
301 env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
302 env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
303 env['CCFLAGS'].append('-DDISABLE_ELBEEM')
305 if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming', 'win64-vc'):
306 env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup')
307 env['PLATFORM_LINKFLAGS'].append('/ENTRY:main')
309 # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
310 B.root_build_dir = env['BF_BUILDDIR']
311 B.doc_build_dir = os.path.join(BLENDERPATH, 'doc')
312 if not B.root_build_dir[-1]==os.sep:
313 B.root_build_dir += os.sep
314 if not B.doc_build_dir[-1]==os.sep:
315 B.doc_build_dir += os.sep
317 # We do a shortcut for clean when no quicklist is given: just delete
318 # builddir without reading in SConscripts
320 if 'clean' in B.targets:
323 if not quickie and do_clean:
324 if os.path.exists(B.doc_build_dir):
325 print B.bc.HEADER+'Cleaning doc dir...'+B.bc.ENDC
326 dirs = os.listdir(B.doc_build_dir)
328 if os.path.isdir(B.doc_build_dir + entry) == 1:
329 print "clean dir %s"%(B.doc_build_dir+entry)
330 shutil.rmtree(B.doc_build_dir+entry)
332 print "remove file %s"%(B.doc_build_dir+entry)
333 os.remove(B.root_build_dir+entry)
334 if os.path.exists(B.root_build_dir):
335 print B.bc.HEADER+'Cleaning build dir...'+B.bc.ENDC
336 dirs = os.listdir(B.root_build_dir)
338 if os.path.isdir(B.root_build_dir + entry) == 1:
339 print "clean dir %s"%(B.root_build_dir+entry)
340 shutil.rmtree(B.root_build_dir+entry)
342 print "remove file %s"%(B.root_build_dir+entry)
343 os.remove(B.root_build_dir+entry)
344 for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak',
345 'extern/xvidcore/build/generic/platform.inc', 'extern/ffmpeg/include']:
346 if os.path.exists(confile):
347 print "clean file %s"%confile
348 if os.path.isdir(confile):
349 for root, dirs, files in os.walk(confile):
351 os.remove(os.path.join(root, name))
354 print B.bc.OKGREEN+'...done'+B.bc.ENDC
356 print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
359 if not os.path.isdir ( B.root_build_dir):
360 os.makedirs ( B.root_build_dir )
361 os.makedirs ( B.root_build_dir + 'source' )
362 os.makedirs ( B.root_build_dir + 'intern' )
363 os.makedirs ( B.root_build_dir + 'extern' )
364 os.makedirs ( B.root_build_dir + 'lib' )
365 os.makedirs ( B.root_build_dir + 'bin' )
366 if not os.path.isdir(B.doc_build_dir) and env['WITH_BF_DOCS']:
367 os.makedirs ( B.doc_build_dir )
369 Help(opts.GenerateHelpText(env))
371 # default is new quieter output, but if you need to see the
372 # commands, do 'scons BF_QUIET=0'
373 bf_quietoutput = B.arguments.get('BF_QUIET', '1')
375 B.set_quiet_output(env)
380 print B.bc.HEADER+'Building in: ' + B.bc.ENDC + os.path.abspath(B.root_build_dir)
381 env.SConsignFile(B.root_build_dir+'scons-signatures')
384 ##### END SETUP ##########
388 BuildDir(B.root_build_dir+'/intern', 'intern', duplicate=0)
389 SConscript(B.root_build_dir+'/intern/SConscript')
390 BuildDir(B.root_build_dir+'/extern', 'extern', duplicate=0)
391 SConscript(B.root_build_dir+'/extern/SConscript')
392 BuildDir(B.root_build_dir+'/source', 'source', duplicate=0)
393 SConscript(B.root_build_dir+'/source/SConscript')
395 # now that we have read all SConscripts, we know what
396 # libraries will be built. Create list of
397 # libraries to give as objects to linking phase
399 for tp in B.possible_types:
400 if not tp == 'player':
401 mainlist += B.create_blender_liblist(env, tp)
403 if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
404 B.propose_priorities()
406 dobj = B.buildinfo(env, "dynamic") + B.resources
407 thestatlibs, thelibincs = B.setup_staticlibs(env)
408 thesyslibs = B.setup_syslibs(env)
410 if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
411 env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
412 if env['WITH_BF_PLAYER']:
413 playerlist = B.create_blender_liblist(env, 'player')
414 playerlist += B.create_blender_liblist(env, 'intern')
415 playerlist += B.create_blender_liblist(env, 'extern')
416 env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
418 ##### Now define some targets
421 #------------ INSTALL
425 if env['OURPLATFORM']=='darwin':
426 for prg in B.program_list:
427 bundle = '%s.app' % prg[0]
428 bundledir = os.path.dirname(bundle)
429 for dp, dn, df in os.walk(bundle):
432 dir=env['BF_INSTALLDIR']+dp[len(bundledir):]
433 source=[dp+os.sep+f for f in df]
434 blenderinstall.append(env.Install(dir=dir,source=source))
436 if env['WITH_BF_FHS']: dir= os.path.join(env['BF_INSTALLDIR'], 'bin')
437 else: dir= env['BF_INSTALLDIR']
439 blenderinstall = env.Install(dir=dir, source=B.program_list)
441 #-- local path = config files in install dir: installdir\VERSION
442 #- dont do config and scripts for darwin, it is already in the bundle
445 datafilestargetlist = []
449 if env['OURPLATFORM']!='darwin':
450 for dp, dn, df in os.walk('bin/.blender'):
455 if not env['WITH_BF_INTERNATIONAL']:
458 if f == '.Blanguages':
460 if not env['WITH_BF_FREETYPE']:
461 if f.endswith('.ttf'):
465 datafileslist.append(os.path.join(dp,f))
466 if env['WITH_BF_FHS']: dir= os.path.join(*([BLENDERPATH] + ['datafiles'] + dp.split(os.sep)[2:])) # skip bin/.blender
467 else: dir= os.path.join(*([BLENDERPATH] + [VERSION] + ['datafiles'] + dp.split(os.sep)[1:])) # skip bin
468 datafilestargetlist.append(dir + os.sep + f)
471 dotblendlist.append(os.path.join(dp, f))
472 if env['WITH_BF_FHS']: dir= os.path.join(*([BLENDERPATH] + ['config'] + dp.split(os.sep)[2:])) # skip bin/.blender
473 else: dir= os.path.join(*([BLENDERPATH] + [VERSION] + ['config'] + dp.split(os.sep)[1:])) # skip bin
475 dottargetlist.append(dir + os.sep + f)
477 dotblenderinstall = []
478 for targetdir,srcfile in zip(dottargetlist, dotblendlist):
479 td, tf = os.path.split(targetdir)
480 dotblenderinstall.append(env.Install(dir=td, source=srcfile))
481 for targetdir,srcfile in zip(datafilestargetlist, datafileslist):
482 td, tf = os.path.split(targetdir)
483 dotblenderinstall.append(env.Install(dir=td, source=srcfile))
485 if env['WITH_BF_PYTHON']:
486 #-- local/VERSION/scripts
487 scriptpaths=['release/scripts']
488 for scriptpath in scriptpaths:
489 for dp, dn, df in os.walk(scriptpath):
493 if env['WITH_BF_FHS']: dir = BLENDERPATH
494 else: dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
495 dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
497 source=[os.path.join(dp, f) for f in df if f[-3:]!='pyc']
498 scriptinstall.append(env.Install(dir=dir,source=source))
501 if env['OURPLATFORM']=='linux2':
505 for tp, tn, tf in os.walk('release/freedesktop/icons'):
509 iconlist.append(os.path.join(tp, f))
510 icontargetlist.append( os.path.join(*([BLENDERPATH] + tp.split(os.sep)[2:] + [f])) )
513 for targetdir,srcfile in zip(icontargetlist, iconlist):
514 td, tf = os.path.split(targetdir)
515 iconinstall.append(env.Install(dir=td, source=srcfile))
517 # dlls for linuxcross
518 # TODO - add more libs, for now this lets blenderlite run
519 if env['OURPLATFORM']=='linuxcross':
520 dir=env['BF_INSTALLDIR']
523 if env['WITH_BF_OPENMP']:
524 source += ['../lib/windows/pthreads/lib/pthreadGC2.dll']
526 scriptinstall.append(env.Install(dir=dir, source=source))
531 for tp, tn, tf in os.walk('release/plugins'):
534 df = tp[8:] # remove 'release/'
536 pluglist.append(os.path.join(tp, f))
537 plugtargetlist.append( os.path.join(BLENDERPATH, df, f) )
540 # header files for plugins
541 pluglist.append('source/blender/blenpluginapi/documentation.h')
542 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'documentation.h'))
543 pluglist.append('source/blender/blenpluginapi/externdef.h')
544 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'externdef.h'))
545 pluglist.append('source/blender/blenpluginapi/floatpatch.h')
546 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'floatpatch.h'))
547 pluglist.append('source/blender/blenpluginapi/iff.h')
548 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'iff.h'))
549 pluglist.append('source/blender/blenpluginapi/plugin.h')
550 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'plugin.h'))
551 pluglist.append('source/blender/blenpluginapi/util.h')
552 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'util.h'))
553 pluglist.append('source/blender/blenpluginapi/plugin.DEF')
554 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'plugin.def'))
557 for targetdir,srcfile in zip(plugtargetlist, pluglist):
558 td, tf = os.path.split(targetdir)
559 plugininstall.append(env.Install(dir=td, source=srcfile))
563 for tp, tn, tf in os.walk('release/text'):
567 textlist.append(tp+os.sep+f)
569 textinstall = env.Install(dir=BLENDERPATH, source=textlist)
571 if env['OURPLATFORM']=='darwin':
572 allinstall = [blenderinstall, plugininstall, textinstall]
573 elif env['OURPLATFORM']=='linux2':
574 allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall, iconinstall]
576 allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
578 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
581 if not env['OURPLATFORM'] in ('win32-mingw', 'win64-vc', 'linuxcross'):
582 # For MinGW and linuxcross static linking will be used
583 dllsources += ['${LCGDIR}/gettext/lib/gnu_gettext.dll']
585 #currently win64-vc doesn't appear to have libpng.dll
586 if env['OURPLATFORM'] != 'win64-vc':
587 dllsources += ['${BF_PNG_LIBPATH}/libpng.dll']
589 dllsources += ['${BF_ZLIB_LIBPATH}/zlib.dll']
590 # Used when linking to libtiff was dynamic
591 # keep it here until compilation on all platform would be ok
592 # dllsources += ['${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll']
594 if env['OURPLATFORM'] != 'linuxcross':
595 # pthreads library is already added
596 dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll']
598 if env['WITH_BF_SDL']:
599 if env['OURPLATFORM'] == 'win64-vc':
600 pass # we link statically already to SDL on win64
602 dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
604 if env['WITH_BF_PYTHON']:
606 dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll')
608 dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll')
610 if env['WITH_BF_ICONV']:
611 if env['OURPLATFORM'] == 'win64-vc':
612 pass # we link statically to iconv on win64
613 elif not env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'):
614 #gettext for MinGW and cross-compilation is compiled staticly
615 dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll']
617 if env['WITH_BF_OPENAL']:
618 dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
619 dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
621 if env['WITH_BF_SNDFILE']:
622 dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
624 if env['WITH_BF_FFMPEG']:
625 dllsources += ['${BF_FFMPEG_LIBPATH}/avcodec-52.dll',
626 '${BF_FFMPEG_LIBPATH}/avformat-52.dll',
627 '${BF_FFMPEG_LIBPATH}/avdevice-52.dll',
628 '${BF_FFMPEG_LIBPATH}/avutil-50.dll',
629 '${BF_FFMPEG_LIBPATH}/swscale-0.dll']
631 if env['WITH_BF_JACK']:
632 dllsources += ['${LCGDIR}/jack/lib/libjack.dll']
633 windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
634 allinstall += windlls
636 installtarget = env.Alias('install', allinstall)
637 bininstalltarget = env.Alias('install-bin', blenderinstall)
639 nsisaction = env.Action(btools.NSIS_Installer, btools.NSIS_print)
640 nsiscmd = env.Command('nsisinstaller', None, nsisaction)
641 nsisalias = env.Alias('nsis', nsiscmd)
643 if 'blender' in B.targets:
644 blenderexe= env.Alias('blender', B.program_list)
645 Depends(blenderexe,installtarget)
647 if env['WITH_BF_PLAYER']:
648 blenderplayer = env.Alias('blenderplayer', B.program_list)
649 Depends(blenderplayer,installtarget)
651 if not env['WITH_BF_GAMEENGINE']:
652 blendernogame = env.Alias('blendernogame', B.program_list)
653 Depends(blendernogame,installtarget)
655 if 'blenderlite' in B.targets:
656 blenderlite = env.Alias('blenderlite', B.program_list)
657 Depends(blenderlite,installtarget)
659 Depends(nsiscmd, allinstall)
661 Default(B.program_list)
663 if not env['WITHOUT_BF_INSTALL']:
664 Default(installtarget)
667 if env['WITH_BF_DOCS']:
674 SConscript('source/gameengine/PyDoc/SConscript')
676 print "No epydoc install detected, Python API and Gameengine API Docs will not be generated "