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"))
56 EnsureSConsVersion(1,0,0)
58 BlenderEnvironment = tools.Blender.BlenderEnvironment
62 VERSION = tools.btools.VERSION # This is used in creating the local config directories
65 platform = sys.platform
69 ##### BEGIN SETUP #####
71 B.possible_types = ['core', 'player', 'intern', 'extern']
73 B.binarykind = ['blender' , 'blenderplayer']
74 ##################################
75 # target and argument validation #
76 ##################################
77 # XX cheating for BF_FANCY, we check for BF_FANCY before args are validated
78 use_color = ARGUMENTS.get('BF_FANCY', '1')
82 if not use_color=='1':
85 #on defaut white Os X terminal, some colors are totally unlegible
86 if platform=='darwin':
87 B.bc.OKGREEN = '\033[34m'
88 B.bc.WARNING = '\033[36m'
91 print B.bc.HEADER+'Command-line arguments'+B.bc.ENDC
92 B.arguments = btools.validate_arguments(ARGUMENTS, B.bc)
93 btools.print_arguments(B.arguments, B.bc)
96 print B.bc.HEADER+'Command-line targets'+B.bc.ENDC
97 B.targets = btools.validate_targets(COMMAND_LINE_TARGETS, B.bc)
98 btools.print_targets(B.targets, B.bc)
100 ##########################
101 # setting up environment #
102 ##########################
104 # handling cmd line arguments & config file
106 # first check cmdline for toolset and we create env to work on
107 quickie = B.arguments.get('BF_QUICK', None)
108 quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
111 B.quickdebug=string.split(quickdebug, ',')
116 B.quickie=string.split(quickie,',')
120 toolset = B.arguments.get('BF_TOOLSET', None)
122 print "Using " + toolset
123 if toolset=='mstoolkit':
124 env = BlenderEnvironment(ENV = os.environ)
125 env.Tool('mstoolkit', ['tools'])
127 env = BlenderEnvironment(tools=[toolset], ENV = os.environ)
128 # xxx commented out, as was supressing warnings under mingw..
130 # btools.SetupSpawn(env)
132 if bitness==64 and platform=='win32':
133 env = BlenderEnvironment(ENV = os.environ, MSVS_ARCH='amd64')
135 env = BlenderEnvironment(ENV = os.environ)
138 print "Could not create a build environment"
142 cc = B.arguments.get('CC', None)
143 cxx = B.arguments.get('CXX', None)
149 if env['CC'] in ['cl', 'cl.exe'] and sys.platform=='win32':
151 platform = 'win64-vc'
153 platform = 'win32-vc'
154 elif env['CC'] in ['gcc'] and sys.platform=='win32':
155 platform = 'win32-mingw'
157 env.SConscriptChdir(0)
159 crossbuild = B.arguments.get('BF_CROSS', None)
160 if crossbuild and platform not in ('win32-vc', 'win64-vc'):
161 platform = 'linuxcross'
163 env['OURPLATFORM'] = platform
165 configfile = os.path.join("build_files", "scons", "config", platform + "-config.py")
167 if os.path.exists(configfile):
168 print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile
170 print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC
172 if crossbuild and env['PLATFORM'] != 'win32':
173 print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC
174 env.Tool('crossmingw', ['tools'])
175 # todo: determine proper libs/includes etc.
176 # Needed for gui programs, console programs should do without it
178 # Now we don't need this option to have console window
179 # env.Append(LINKFLAGS=['-mwindows'])
181 userconfig = B.arguments.get('BF_CONFIG', 'user-config.py')
182 # first read platform config. B.arguments will override
183 optfiles = [configfile]
184 if os.path.exists(userconfig):
185 print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig
186 optfiles += [userconfig]
188 print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC
190 opts = btools.read_opts(env, optfiles, B.arguments)
193 if not env['BF_FANCY']:
197 # remove install dir so old and new files are not mixed.
198 # NOTE: only do the scripts directory for now, otherwise is too disruptive for developers
199 # TODO: perhaps we need an option (off by default) to not do this altogether...
200 if not env['WITHOUT_BF_INSTALL'] and not env['WITHOUT_BF_OVERWRITE_INSTALL']:
201 scriptsDir = os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts')
202 if os.path.isdir(scriptsDir):
203 print B.bc.OKGREEN + "Clearing installation directory%s: %s" % (B.bc.ENDC, os.path.abspath(scriptsDir))
204 shutil.rmtree(scriptsDir)
207 SetOption('num_jobs', int(env['BF_NUMJOBS']))
208 print B.bc.OKGREEN + "Build with parallel jobs%s: %s" % (B.bc.ENDC, GetOption('num_jobs'))
209 print B.bc.OKGREEN + "Build with debug symbols%s: %s" % (B.bc.ENDC, env['BF_DEBUG'])
211 # BLENDERPATH is a unix only option to enable typical style paths this is
212 # spesifically a data-dir, which is used a lot but cant replace BF_INSTALLDIR
213 # because the blender binary is installed in $BF_INSTALLDIR/bin/blender
215 if env['WITH_BF_FHS']:
216 BLENDERPATH = os.path.join(env['BF_INSTALLDIR'], 'share', 'blender', env['BF_VERSION'])
218 BLENDERPATH = env['BF_INSTALLDIR']
220 if env['WITH_BF_OPENMP'] == 1:
221 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
222 env['CCFLAGS'].append('/openmp')
223 env['CPPFLAGS'].append('/openmp')
224 env['CXXFLAGS'].append('/openmp')
226 if env['CC'].endswith('icc'): # to be able to handle CC=/opt/bla/icc case
227 env.Append(LINKFLAGS=['-openmp', '-static-intel'])
228 env['CCFLAGS'].append('-openmp')
229 env['CPPFLAGS'].append('-openmp')
230 env['CXXFLAGS'].append('-openmp')
232 env.Append(CCFLAGS=['-fopenmp'])
233 env.Append(CPPFLAGS=['-fopenmp'])
234 env.Append(CXXFLAGS=['-fopenmp'])
236 if env['WITH_GHOST_COCOA'] == True:
237 env.Append(CFLAGS=['-DGHOST_COCOA'])
238 env.Append(CXXFLAGS=['-DGHOST_COCOA'])
239 env.Append(CPPFLAGS=['-DGHOST_COCOA'])
241 if env['USE_QTKIT'] == True:
242 env.Append(CFLAGS=['-DUSE_QTKIT'])
243 env.Append(CXXFLAGS=['-DUSE_QTKIT'])
244 env.Append(CPPFLAGS=['-DUSE_QTKIT'])
246 #check for additional debug libnames
248 if env.has_key('BF_DEBUG_LIBS'):
249 B.quickdebug += env['BF_DEBUG_LIBS']
251 printdebug = B.arguments.get('BF_LISTDEBUG', 0)
253 if len(B.quickdebug) > 0 and printdebug != 0:
254 print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC
255 for l in B.quickdebug:
258 # remove stdc++ from LLIBS if we are building a statc linked CXXFLAGS
259 if env['WITH_BF_STATICCXX']:
260 if 'stdc++' in env['LLIBS']:
261 env['LLIBS'].remove('stdc++')
263 print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform'
265 # check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline
266 if 'blenderplayer' in B.targets:
267 env['WITH_BF_PLAYER'] = True
269 if 'blendernogame' in B.targets:
270 env['WITH_BF_GAMEENGINE'] = False
272 if 'blenderlite' in B.targets:
274 target_env_defs['WITH_BF_GAMEENGINE'] = False
275 target_env_defs['WITH_BF_OPENAL'] = False
276 target_env_defs['WITH_BF_OPENEXR'] = False
277 target_env_defs['WITH_BF_OPENMP'] = False
278 target_env_defs['WITH_BF_ICONV'] = False
279 target_env_defs['WITH_BF_INTERNATIONAL'] = False
280 target_env_defs['WITH_BF_OPENJPEG'] = False
281 target_env_defs['WITH_BF_FFMPEG'] = False
282 target_env_defs['WITH_BF_QUICKTIME'] = False
283 target_env_defs['WITH_BF_REDCODE'] = False
284 target_env_defs['WITH_BF_DDS'] = False
285 target_env_defs['WITH_BF_ZLIB'] = False
286 target_env_defs['WITH_BF_SDL'] = False
287 target_env_defs['WITH_BF_JPEG'] = False
288 target_env_defs['WITH_BF_PNG'] = False
289 target_env_defs['WITH_BF_BULLET'] = False
290 target_env_defs['WITH_BF_BINRELOC'] = False
291 target_env_defs['BF_BUILDINFO'] = False
292 target_env_defs['BF_NO_ELBEEM'] = True
293 target_env_defs['WITH_BF_PYTHON'] = False
295 # Merge blenderlite, let command line to override
296 for k,v in target_env_defs.iteritems():
297 if k not in B.arguments:
300 # disable elbeem (fluidsim) compilation?
301 if env['BF_NO_ELBEEM'] == 1:
302 env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
303 env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
304 env['CCFLAGS'].append('-DDISABLE_ELBEEM')
306 if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming', 'win64-vc'):
307 env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup')
308 env['PLATFORM_LINKFLAGS'].append('/ENTRY:main')
310 # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
311 B.root_build_dir = env['BF_BUILDDIR']
312 B.doc_build_dir = os.path.join(BLENDERPATH, 'doc')
313 if not B.root_build_dir[-1]==os.sep:
314 B.root_build_dir += os.sep
315 if not B.doc_build_dir[-1]==os.sep:
316 B.doc_build_dir += os.sep
318 # We do a shortcut for clean when no quicklist is given: just delete
319 # builddir without reading in SConscripts
321 if 'clean' in B.targets:
324 if not quickie and do_clean:
325 if os.path.exists(B.doc_build_dir):
326 print B.bc.HEADER+'Cleaning doc dir...'+B.bc.ENDC
327 dirs = os.listdir(B.doc_build_dir)
329 if os.path.isdir(B.doc_build_dir + entry) == 1:
330 print "clean dir %s"%(B.doc_build_dir+entry)
331 shutil.rmtree(B.doc_build_dir+entry)
333 print "remove file %s"%(B.doc_build_dir+entry)
334 os.remove(B.root_build_dir+entry)
335 if os.path.exists(B.root_build_dir):
336 print B.bc.HEADER+'Cleaning build dir...'+B.bc.ENDC
337 dirs = os.listdir(B.root_build_dir)
339 if os.path.isdir(B.root_build_dir + entry) == 1:
340 print "clean dir %s"%(B.root_build_dir+entry)
341 shutil.rmtree(B.root_build_dir+entry)
343 print "remove file %s"%(B.root_build_dir+entry)
344 os.remove(B.root_build_dir+entry)
345 for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak',
346 'extern/xvidcore/build/generic/platform.inc', 'extern/ffmpeg/include']:
347 if os.path.exists(confile):
348 print "clean file %s"%confile
349 if os.path.isdir(confile):
350 for root, dirs, files in os.walk(confile):
352 os.remove(os.path.join(root, name))
355 print B.bc.OKGREEN+'...done'+B.bc.ENDC
357 print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
360 if not os.path.isdir ( B.root_build_dir):
361 os.makedirs ( B.root_build_dir )
362 os.makedirs ( B.root_build_dir + 'source' )
363 os.makedirs ( B.root_build_dir + 'intern' )
364 os.makedirs ( B.root_build_dir + 'extern' )
365 os.makedirs ( B.root_build_dir + 'lib' )
366 os.makedirs ( B.root_build_dir + 'bin' )
367 if not os.path.isdir(B.doc_build_dir) and env['WITH_BF_DOCS']:
368 os.makedirs ( B.doc_build_dir )
370 Help(opts.GenerateHelpText(env))
372 # default is new quieter output, but if you need to see the
373 # commands, do 'scons BF_QUIET=0'
374 bf_quietoutput = B.arguments.get('BF_QUIET', '1')
376 B.set_quiet_output(env)
381 print B.bc.HEADER+'Building in: ' + B.bc.ENDC + os.path.abspath(B.root_build_dir)
382 env.SConsignFile(B.root_build_dir+'scons-signatures')
385 ##### END SETUP ##########
389 BuildDir(B.root_build_dir+'/intern', 'intern', duplicate=0)
390 SConscript(B.root_build_dir+'/intern/SConscript')
391 BuildDir(B.root_build_dir+'/extern', 'extern', duplicate=0)
392 SConscript(B.root_build_dir+'/extern/SConscript')
393 BuildDir(B.root_build_dir+'/source', 'source', duplicate=0)
394 SConscript(B.root_build_dir+'/source/SConscript')
396 # now that we have read all SConscripts, we know what
397 # libraries will be built. Create list of
398 # libraries to give as objects to linking phase
400 for tp in B.possible_types:
401 if not tp == 'player':
402 mainlist += B.create_blender_liblist(env, tp)
404 if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
405 B.propose_priorities()
407 dobj = B.buildinfo(env, "dynamic") + B.resources
408 thestatlibs, thelibincs = B.setup_staticlibs(env)
409 thesyslibs = B.setup_syslibs(env)
411 if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
412 env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
413 if env['WITH_BF_PLAYER']:
414 playerlist = B.create_blender_liblist(env, 'player')
415 playerlist += B.create_blender_liblist(env, 'intern')
416 playerlist += B.create_blender_liblist(env, 'extern')
417 env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
419 ##### Now define some targets
422 #------------ INSTALL
426 if env['OURPLATFORM']=='darwin':
427 for prg in B.program_list:
428 bundle = '%s.app' % prg[0]
429 bundledir = os.path.dirname(bundle)
430 for dp, dn, df in os.walk(bundle):
433 dir=env['BF_INSTALLDIR']+dp[len(bundledir):]
434 source=[dp+os.sep+f for f in df]
435 blenderinstall.append(env.Install(dir=dir,source=source))
437 if env['WITH_BF_FHS']: dir= os.path.join(env['BF_INSTALLDIR'], 'bin')
438 else: dir= env['BF_INSTALLDIR']
440 blenderinstall = env.Install(dir=dir, source=B.program_list)
442 #-- local path = config files in install dir: installdir\VERSION
443 #- dont do config and scripts for darwin, it is already in the bundle
446 datafilestargetlist = []
450 if env['OURPLATFORM']!='darwin':
451 for dp, dn, df in os.walk('bin/.blender'):
456 if not env['WITH_BF_INTERNATIONAL']:
459 if f == '.Blanguages':
461 if not env['WITH_BF_FREETYPE']:
462 if f.endswith('.ttf'):
466 datafileslist.append(os.path.join(dp,f))
467 if env['WITH_BF_FHS']: dir= os.path.join(*([BLENDERPATH] + ['datafiles'] + dp.split(os.sep)[2:])) # skip bin/.blender
468 else: dir= os.path.join(*([BLENDERPATH] + [VERSION] + ['datafiles'] + dp.split(os.sep)[1:])) # skip bin
469 datafilestargetlist.append(dir + os.sep + f)
472 dotblendlist.append(os.path.join(dp, f))
473 if env['WITH_BF_FHS']: dir= os.path.join(*([BLENDERPATH] + ['config'] + dp.split(os.sep)[2:])) # skip bin/.blender
474 else: dir= os.path.join(*([BLENDERPATH] + [VERSION] + ['config'] + dp.split(os.sep)[1:])) # skip bin
476 dottargetlist.append(dir + os.sep + f)
478 dotblenderinstall = []
479 for targetdir,srcfile in zip(dottargetlist, dotblendlist):
480 td, tf = os.path.split(targetdir)
481 dotblenderinstall.append(env.Install(dir=td, source=srcfile))
482 for targetdir,srcfile in zip(datafilestargetlist, datafileslist):
483 td, tf = os.path.split(targetdir)
484 dotblenderinstall.append(env.Install(dir=td, source=srcfile))
486 if env['WITH_BF_PYTHON']:
487 #-- local/VERSION/scripts
488 scriptpaths=['release/scripts']
489 for scriptpath in scriptpaths:
490 for dp, dn, df in os.walk(scriptpath):
494 if env['WITH_BF_FHS']: dir = BLENDERPATH
495 else: dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
496 dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
498 source=[os.path.join(dp, f) for f in df if f[-3:]!='pyc']
499 scriptinstall.append(env.Install(dir=dir,source=source))
502 if env['OURPLATFORM']=='linux2':
506 for tp, tn, tf in os.walk('release/freedesktop/icons'):
510 iconlist.append(os.path.join(tp, f))
511 icontargetlist.append( os.path.join(*([BLENDERPATH] + tp.split(os.sep)[2:] + [f])) )
514 for targetdir,srcfile in zip(icontargetlist, iconlist):
515 td, tf = os.path.split(targetdir)
516 iconinstall.append(env.Install(dir=td, source=srcfile))
518 # dlls for linuxcross
519 # TODO - add more libs, for now this lets blenderlite run
520 if env['OURPLATFORM']=='linuxcross':
521 dir=env['BF_INSTALLDIR']
524 if env['WITH_BF_OPENMP']:
525 source += ['../lib/windows/pthreads/lib/pthreadGC2.dll']
527 scriptinstall.append(env.Install(dir=dir, source=source))
532 for tp, tn, tf in os.walk('release/plugins'):
535 df = tp[8:] # remove 'release/'
537 pluglist.append(os.path.join(tp, f))
538 plugtargetlist.append( os.path.join(BLENDERPATH, df, f) )
541 # header files for plugins
542 pluglist.append('source/blender/blenpluginapi/documentation.h')
543 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'documentation.h'))
544 pluglist.append('source/blender/blenpluginapi/externdef.h')
545 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'externdef.h'))
546 pluglist.append('source/blender/blenpluginapi/floatpatch.h')
547 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'floatpatch.h'))
548 pluglist.append('source/blender/blenpluginapi/iff.h')
549 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'iff.h'))
550 pluglist.append('source/blender/blenpluginapi/plugin.h')
551 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'plugin.h'))
552 pluglist.append('source/blender/blenpluginapi/util.h')
553 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'util.h'))
554 pluglist.append('source/blender/blenpluginapi/plugin.DEF')
555 plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'plugin.def'))
558 for targetdir,srcfile in zip(plugtargetlist, pluglist):
559 td, tf = os.path.split(targetdir)
560 plugininstall.append(env.Install(dir=td, source=srcfile))
564 for tp, tn, tf in os.walk('release/text'):
568 textlist.append(tp+os.sep+f)
570 textinstall = env.Install(dir=BLENDERPATH, source=textlist)
572 if env['OURPLATFORM']=='darwin':
573 allinstall = [blenderinstall, plugininstall, textinstall]
574 elif env['OURPLATFORM']=='linux2':
575 allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall, iconinstall]
577 allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
579 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
582 if not env['OURPLATFORM'] in ('win32-mingw', 'win64-vc', 'linuxcross'):
583 # For MinGW and linuxcross static linking will be used
584 dllsources += ['${LCGDIR}/gettext/lib/gnu_gettext.dll']
586 #currently win64-vc doesn't appear to have libpng.dll
587 if env['OURPLATFORM'] != 'win64-vc':
588 dllsources += ['${BF_PNG_LIBPATH}/libpng.dll']
590 dllsources += ['${BF_ZLIB_LIBPATH}/zlib.dll']
591 # Used when linking to libtiff was dynamic
592 # keep it here until compilation on all platform would be ok
593 # dllsources += ['${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll']
595 if env['OURPLATFORM'] != 'linuxcross':
596 # pthreads library is already added
597 dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll']
599 if env['WITH_BF_SDL']:
600 if env['OURPLATFORM'] == 'win64-vc':
601 pass # we link statically already to SDL on win64
603 dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
605 if env['WITH_BF_PYTHON']:
607 dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll')
609 dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll')
611 if env['WITH_BF_ICONV']:
612 if env['OURPLATFORM'] == 'win64-vc':
613 pass # we link statically to iconv on win64
614 elif not env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'):
615 #gettext for MinGW and cross-compilation is compiled staticly
616 dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll']
618 if env['WITH_BF_OPENAL']:
619 dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
620 dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
622 if env['WITH_BF_SNDFILE']:
623 dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
625 if env['WITH_BF_FFMPEG']:
626 dllsources += ['${BF_FFMPEG_LIBPATH}/avcodec-52.dll',
627 '${BF_FFMPEG_LIBPATH}/avformat-52.dll',
628 '${BF_FFMPEG_LIBPATH}/avdevice-52.dll',
629 '${BF_FFMPEG_LIBPATH}/avutil-50.dll',
630 '${BF_FFMPEG_LIBPATH}/swscale-0.dll']
632 if env['WITH_BF_JACK']:
633 dllsources += ['${LCGDIR}/jack/lib/libjack.dll']
634 windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
635 allinstall += windlls
637 installtarget = env.Alias('install', allinstall)
638 bininstalltarget = env.Alias('install-bin', blenderinstall)
640 nsisaction = env.Action(btools.NSIS_Installer, btools.NSIS_print)
641 nsiscmd = env.Command('nsisinstaller', None, nsisaction)
642 nsisalias = env.Alias('nsis', nsiscmd)
644 if 'blender' in B.targets:
645 blenderexe= env.Alias('blender', B.program_list)
646 Depends(blenderexe,installtarget)
648 if env['WITH_BF_PLAYER']:
649 blenderplayer = env.Alias('blenderplayer', B.program_list)
650 Depends(blenderplayer,installtarget)
652 if not env['WITH_BF_GAMEENGINE']:
653 blendernogame = env.Alias('blendernogame', B.program_list)
654 Depends(blendernogame,installtarget)
656 if 'blenderlite' in B.targets:
657 blenderlite = env.Alias('blenderlite', B.program_list)
658 Depends(blenderlite,installtarget)
660 Depends(nsiscmd, allinstall)
662 Default(B.program_list)
664 if not env['WITHOUT_BF_INSTALL']:
665 Default(installtarget)
668 if env['WITH_BF_DOCS']:
675 SConscript('source/gameengine/PyDoc/SConscript')
677 print "No epydoc install detected, Python API and Gameengine API Docs will not be generated "