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 # TODO: fix /FORCE:MULTIPLE on windows to get proper debug builds.
34 import platform as pltfrm
36 # Need a better way to do this. Automagical maybe is not the best thing, maybe it is.
37 if pltfrm.architecture()[0] == '64bit':
49 from tempfile import mkdtemp
52 toolpath=os.path.join(".", "build_files", "scons", "tools")
54 # needed for importing tools
55 sys.path.append(toolpath)
61 EnsureSConsVersion(1,0,0)
63 # Before we do anything, let's check if we have a sane os.environ
64 if not btools.check_environ():
67 BlenderEnvironment = Blender.BlenderEnvironment
70 VERSION = btools.VERSION # This is used in creating the local config directories
73 platform = sys.platform
77 ##### BEGIN SETUP #####
79 B.possible_types = ['core', 'player', 'player2', 'intern', 'extern']
81 B.binarykind = ['blender' , 'blenderplayer']
82 ##################################
83 # target and argument validation #
84 ##################################
85 # XX cheating for BF_FANCY, we check for BF_FANCY before args are validated
86 use_color = ARGUMENTS.get('BF_FANCY', '1')
90 if not use_color=='1':
93 #on defaut white Os X terminal, some colors are totally unlegible
94 if platform=='darwin':
95 B.bc.OKGREEN = '\033[34m'
96 B.bc.WARNING = '\033[36m'
99 print B.bc.HEADER+'Command-line arguments'+B.bc.ENDC
100 B.arguments = btools.validate_arguments(ARGUMENTS, B.bc)
101 btools.print_arguments(B.arguments, B.bc)
104 print B.bc.HEADER+'Command-line targets'+B.bc.ENDC
105 B.targets = btools.validate_targets(COMMAND_LINE_TARGETS, B.bc)
106 btools.print_targets(B.targets, B.bc)
108 ##########################
109 # setting up environment #
110 ##########################
112 # handling cmd line arguments & config file
114 # first check cmdline for toolset and we create env to work on
115 quickie = B.arguments.get('BF_QUICK', None)
116 quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
119 B.quickdebug=string.split(quickdebug, ',')
124 B.quickie=string.split(quickie,',')
128 toolset = B.arguments.get('BF_TOOLSET', None)
130 print "Using " + toolset
131 if toolset=='mstoolkit':
132 env = BlenderEnvironment(ENV = os.environ)
133 env.Tool('mstoolkit', [toolpath])
135 env = BlenderEnvironment(tools=[toolset], ENV = os.environ)
136 # xxx commented out, as was supressing warnings under mingw..
138 # btools.SetupSpawn(env)
140 if bitness==64 and platform=='win32':
141 env = BlenderEnvironment(ENV = os.environ, MSVS_ARCH='amd64')
143 env = BlenderEnvironment(ENV = os.environ)
146 print "Could not create a build environment"
149 cc = B.arguments.get('CC', None)
150 cxx = B.arguments.get('CXX', None)
156 if env['CC'] in ['cl', 'cl.exe'] and sys.platform=='win32':
158 platform = 'win64-vc'
160 platform = 'win32-vc'
161 elif env['CC'] in ['gcc'] and sys.platform=='win32':
162 platform = 'win32-mingw'
164 env.SConscriptChdir(0)
166 crossbuild = B.arguments.get('BF_CROSS', None)
167 if crossbuild and platform not in ('win32-vc', 'win64-vc'):
168 platform = 'linuxcross'
170 env['OURPLATFORM'] = platform
172 configfile = os.path.join("build_files", "scons", "config", platform + "-config.py")
174 if os.path.exists(configfile):
175 print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile
177 print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC
179 if crossbuild and env['PLATFORM'] != 'win32':
180 print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC
181 env.Tool('crossmingw', [toolpath])
182 # todo: determine proper libs/includes etc.
183 # Needed for gui programs, console programs should do without it
185 # Now we don't need this option to have console window
186 # env.Append(LINKFLAGS=['-mwindows'])
188 userconfig = B.arguments.get('BF_CONFIG', 'user-config.py')
189 # first read platform config. B.arguments will override
190 optfiles = [configfile]
191 if os.path.exists(userconfig):
192 print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig
193 optfiles += [userconfig]
195 print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC
197 opts = btools.read_opts(env, optfiles, B.arguments)
200 if not env['BF_FANCY']:
204 # remove install dir so old and new files are not mixed.
205 # NOTE: only do the scripts directory for now, otherwise is too disruptive for developers
206 # TODO: perhaps we need an option (off by default) to not do this altogether...
207 if not env['WITHOUT_BF_INSTALL'] and not env['WITHOUT_BF_OVERWRITE_INSTALL']:
208 scriptsDir = os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts')
209 if os.path.isdir(scriptsDir):
210 print B.bc.OKGREEN + "Clearing installation directory%s: %s" % (B.bc.ENDC, os.path.abspath(scriptsDir))
211 shutil.rmtree(scriptsDir)
214 SetOption('num_jobs', int(env['BF_NUMJOBS']))
215 print B.bc.OKGREEN + "Build with parallel jobs%s: %s" % (B.bc.ENDC, GetOption('num_jobs'))
216 print B.bc.OKGREEN + "Build with debug symbols%s: %s" % (B.bc.ENDC, env['BF_DEBUG'])
218 if 'blenderlite' in B.targets:
220 target_env_defs['WITH_BF_GAMEENGINE'] = False
221 target_env_defs['WITH_BF_OPENAL'] = False
222 target_env_defs['WITH_BF_OPENEXR'] = False
223 target_env_defs['WITH_BF_OPENMP'] = False
224 target_env_defs['WITH_BF_ICONV'] = False
225 target_env_defs['WITH_BF_INTERNATIONAL'] = False
226 target_env_defs['WITH_BF_OPENJPEG'] = False
227 target_env_defs['WITH_BF_FFMPEG'] = False
228 target_env_defs['WITH_BF_QUICKTIME'] = False
229 target_env_defs['WITH_BF_REDCODE'] = False
230 target_env_defs['WITH_BF_DDS'] = False
231 target_env_defs['WITH_BF_CINEON'] = False
232 target_env_defs['WITH_BF_HDR'] = False
233 target_env_defs['WITH_BF_ZLIB'] = False
234 target_env_defs['WITH_BF_SDL'] = False
235 target_env_defs['WITH_BF_JPEG'] = False
236 target_env_defs['WITH_BF_PNG'] = False
237 target_env_defs['WITH_BF_BULLET'] = False
238 target_env_defs['WITH_BF_BINRELOC'] = False
239 target_env_defs['BF_BUILDINFO'] = False
240 target_env_defs['BF_NO_ELBEEM'] = True
241 target_env_defs['WITH_BF_PYTHON'] = False
243 # Merge blenderlite, let command line to override
244 for k,v in target_env_defs.iteritems():
245 if k not in B.arguments:
249 if env['WITH_BF_OPENMP'] == 1:
250 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
251 env['CCFLAGS'].append('/openmp')
252 env['CPPFLAGS'].append('/openmp')
253 env['CXXFLAGS'].append('/openmp')
255 if env['CC'].endswith('icc'): # to be able to handle CC=/opt/bla/icc case
256 env.Append(LINKFLAGS=['-openmp', '-static-intel'])
257 env['CCFLAGS'].append('-openmp')
258 env['CPPFLAGS'].append('-openmp')
259 env['CXXFLAGS'].append('-openmp')
261 env.Append(CCFLAGS=['-fopenmp'])
262 env.Append(CPPFLAGS=['-fopenmp'])
263 env.Append(CXXFLAGS=['-fopenmp'])
265 if env['WITH_GHOST_COCOA'] == True:
266 env.Append(CFLAGS=['-DGHOST_COCOA'])
267 env.Append(CXXFLAGS=['-DGHOST_COCOA'])
268 env.Append(CPPFLAGS=['-DGHOST_COCOA'])
270 if env['USE_QTKIT'] == True:
271 env.Append(CFLAGS=['-DUSE_QTKIT'])
272 env.Append(CXXFLAGS=['-DUSE_QTKIT'])
273 env.Append(CPPFLAGS=['-DUSE_QTKIT'])
275 #check for additional debug libnames
277 if env.has_key('BF_DEBUG_LIBS'):
278 B.quickdebug += env['BF_DEBUG_LIBS']
280 printdebug = B.arguments.get('BF_LISTDEBUG', 0)
282 if len(B.quickdebug) > 0 and printdebug != 0:
283 print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC
284 for l in B.quickdebug:
287 # remove stdc++ from LLIBS if we are building a statc linked CXXFLAGS
288 if env['WITH_BF_STATICCXX']:
289 if 'stdc++' in env['LLIBS']:
290 env['LLIBS'].remove('stdc++')
292 print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform'
294 # check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline
295 if 'blenderplayer' in B.targets:
296 env['WITH_BF_PLAYER'] = True
298 if 'blendernogame' in B.targets:
299 env['WITH_BF_GAMEENGINE'] = False
301 # disable elbeem (fluidsim) compilation?
302 if env['BF_NO_ELBEEM'] == 1:
303 env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
304 env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
305 env['CCFLAGS'].append('-DDISABLE_ELBEEM')
307 if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming', 'win64-vc'):
308 env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup')
309 env['PLATFORM_LINKFLAGS'].append('/ENTRY:main')
311 # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
312 B.root_build_dir = env['BF_BUILDDIR']
313 B.doc_build_dir = os.path.join(env['BF_INSTALLDIR'], 'doc')
314 if not B.root_build_dir[-1]==os.sep:
315 B.root_build_dir += os.sep
316 if not B.doc_build_dir[-1]==os.sep:
317 B.doc_build_dir += os.sep
319 # We do a shortcut for clean when no quicklist is given: just delete
320 # builddir without reading in SConscripts
322 if 'clean' in B.targets:
325 if not quickie and do_clean:
326 if os.path.exists(B.doc_build_dir):
327 print B.bc.HEADER+'Cleaning doc dir...'+B.bc.ENDC
328 dirs = os.listdir(B.doc_build_dir)
330 if os.path.isdir(B.doc_build_dir + entry) == 1:
331 print "clean dir %s"%(B.doc_build_dir+entry)
332 shutil.rmtree(B.doc_build_dir+entry)
334 print "remove file %s"%(B.doc_build_dir+entry)
335 os.remove(B.root_build_dir+entry)
336 if os.path.exists(B.root_build_dir):
337 print B.bc.HEADER+'Cleaning build dir...'+B.bc.ENDC
338 dirs = os.listdir(B.root_build_dir)
340 if os.path.isdir(B.root_build_dir + entry) == 1:
341 print "clean dir %s"%(B.root_build_dir+entry)
342 shutil.rmtree(B.root_build_dir+entry)
344 print "remove file %s"%(B.root_build_dir+entry)
345 os.remove(B.root_build_dir+entry)
346 for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak',
347 'extern/xvidcore/build/generic/platform.inc', 'extern/ffmpeg/include']:
348 if os.path.exists(confile):
349 print "clean file %s"%confile
350 if os.path.isdir(confile):
351 for root, dirs, files in os.walk(confile):
353 os.remove(os.path.join(root, name))
356 print B.bc.OKGREEN+'...done'+B.bc.ENDC
358 print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
361 if not os.path.isdir ( B.root_build_dir):
362 os.makedirs ( B.root_build_dir )
363 os.makedirs ( B.root_build_dir + 'source' )
364 os.makedirs ( B.root_build_dir + 'intern' )
365 os.makedirs ( B.root_build_dir + 'extern' )
366 os.makedirs ( B.root_build_dir + 'lib' )
367 os.makedirs ( B.root_build_dir + 'bin' )
368 # # Docs not working with epy anymore
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') and (not tp == 'player2'):
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", mainlist + thestatlibs + dobj, 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, 'player2')
418 playerlist += B.create_blender_liblist(env, 'intern')
419 playerlist += B.create_blender_liblist(env, 'extern')
420 env.BlenderProg(B.root_build_dir, "blenderplayer", playerlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
422 ##### Now define some targets
425 #------------ INSTALL
429 if env['OURPLATFORM']=='darwin':
430 for prg in B.program_list:
431 bundle = '%s.app' % prg[0]
432 bundledir = os.path.dirname(bundle)
433 for dp, dn, df in os.walk(bundle):
438 dir=env['BF_INSTALLDIR']+dp[len(bundledir):]
439 source=[dp+os.sep+f for f in df]
440 blenderinstall.append(env.Install(dir=dir,source=source))
442 blenderinstall = env.Install(dir=env['BF_INSTALLDIR'], 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'):
460 if not env['WITH_BF_INTERNATIONAL']:
463 if f == '.Blanguages':
465 if not env['WITH_BF_FREETYPE']:
466 if f.endswith('.ttf'):
470 datafileslist.append(os.path.join(dp,f))
471 dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['datafiles'] + dp.split(os.sep)[1:])) # skip bin
472 datafilestargetlist.append(dir + os.sep + f)
475 dotblendlist.append(os.path.join(dp, f))
476 dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['config'] + dp.split(os.sep)[1:])) # skip bin
477 dottargetlist.append(dir + os.sep + f)
479 dotblenderinstall = []
480 for targetdir,srcfile in zip(dottargetlist, dotblendlist):
481 td, tf = os.path.split(targetdir)
482 dotblenderinstall.append(env.Install(dir=td, source=srcfile))
483 for targetdir,srcfile in zip(datafilestargetlist, datafileslist):
484 td, tf = os.path.split(targetdir)
485 dotblenderinstall.append(env.Install(dir=td, source=srcfile))
487 if env['WITH_BF_PYTHON']:
488 #-- local/VERSION/scripts
489 scriptpaths=['release/scripts']
490 for scriptpath in scriptpaths:
491 for dp, dn, df in os.walk(scriptpath):
496 if '__pycache__' in dn: # py3.2 cache dir
497 dn.remove('__pycache__')
499 dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
500 dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
502 source=[os.path.join(dp, f) for f in df if not f.endswith(".pyc")]
503 # To ensure empty dirs are created too
505 env.Execute(Mkdir(dir))
506 scriptinstall.append(env.Install(dir=dir,source=source))
509 if env['OURPLATFORM']=='linux2':
513 for tp, tn, tf in os.walk('release/freedesktop/icons'):
519 iconlist.append(os.path.join(tp, f))
520 icontargetlist.append( os.path.join(*([env['BF_INSTALLDIR']] + tp.split(os.sep)[2:] + [f])) )
523 for targetdir,srcfile in zip(icontargetlist, iconlist):
524 td, tf = os.path.split(targetdir)
525 iconinstall.append(env.Install(dir=td, source=srcfile))
527 # dlls for linuxcross
528 # TODO - add more libs, for now this lets blenderlite run
529 if env['OURPLATFORM']=='linuxcross':
530 dir=env['BF_INSTALLDIR']
533 if env['WITH_BF_OPENMP']:
534 source += ['../lib/windows/pthreads/lib/pthreadGC2.dll']
536 scriptinstall.append(env.Install(dir=dir, source=source))
541 for tp, tn, tf in os.walk('release/plugins'):
546 df = tp[8:] # remove 'release/'
548 pluglist.append(os.path.join(tp, f))
549 plugtargetlist.append( os.path.join(env['BF_INSTALLDIR'], VERSION, df, f) )
552 # header files for plugins
553 pluglist.append('source/blender/blenpluginapi/documentation.h')
554 plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], VERSION, 'plugins', 'include', 'documentation.h'))
555 pluglist.append('source/blender/blenpluginapi/externdef.h')
556 plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], VERSION, 'plugins', 'include', 'externdef.h'))
557 pluglist.append('source/blender/blenpluginapi/floatpatch.h')
558 plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], VERSION, 'plugins', 'include', 'floatpatch.h'))
559 pluglist.append('source/blender/blenpluginapi/iff.h')
560 plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], VERSION, 'plugins', 'include', 'iff.h'))
561 pluglist.append('source/blender/blenpluginapi/plugin.h')
562 plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], VERSION, 'plugins', 'include', 'plugin.h'))
563 pluglist.append('source/blender/blenpluginapi/util.h')
564 plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], VERSION, 'plugins', 'include', 'util.h'))
565 pluglist.append('source/blender/blenpluginapi/plugin.DEF')
566 plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], VERSION, 'plugins', 'include', 'plugin.def'))
569 for targetdir,srcfile in zip(plugtargetlist, pluglist):
570 td, tf = os.path.split(targetdir)
571 plugininstall.append(env.Install(dir=td, source=srcfile))
575 for tp, tn, tf in os.walk('release/text'):
581 textlist.append(tp+os.sep+f)
583 textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist)
585 if env['OURPLATFORM']=='darwin':
586 allinstall = [blenderinstall, plugininstall, textinstall]
587 elif env['OURPLATFORM']=='linux2':
588 allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall, iconinstall]
590 allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
592 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
595 if not env['OURPLATFORM'] in ('win32-mingw', 'win64-vc', 'linuxcross'):
596 # For MinGW and linuxcross static linking will be used
597 dllsources += ['${LCGDIR}/gettext/lib/gnu_gettext.dll']
599 #currently win64-vc doesn't appear to have libpng.dll
600 if env['OURPLATFORM'] != 'win64-vc':
601 dllsources += ['${BF_PNG_LIBPATH}/libpng.dll']
603 dllsources += ['${BF_ZLIB_LIBPATH}/zlib.dll']
604 # Used when linking to libtiff was dynamic
605 # keep it here until compilation on all platform would be ok
606 # dllsources += ['${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll']
608 if env['OURPLATFORM'] != 'linuxcross':
609 # pthreads library is already added
610 dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll']
612 if env['WITH_BF_SDL']:
613 if env['OURPLATFORM'] == 'win64-vc':
614 pass # we link statically already to SDL on win64
616 dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
618 if env['WITH_BF_PYTHON']:
620 dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll')
622 dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll')
624 if env['WITH_BF_ICONV']:
625 if env['OURPLATFORM'] == 'win64-vc':
626 pass # we link statically to iconv on win64
627 elif not env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'):
628 #gettext for MinGW and cross-compilation is compiled staticly
629 dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll']
631 if env['WITH_BF_OPENAL']:
632 dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
633 dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
635 if env['WITH_BF_SNDFILE']:
636 dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
638 if env['WITH_BF_FFMPEG']:
639 dllsources += ['${BF_FFMPEG_LIBPATH}/avcodec-52.dll',
640 '${BF_FFMPEG_LIBPATH}/avformat-52.dll',
641 '${BF_FFMPEG_LIBPATH}/avdevice-52.dll',
642 '${BF_FFMPEG_LIBPATH}/avutil-50.dll',
643 '${BF_FFMPEG_LIBPATH}/swscale-0.dll']
644 windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
645 allinstall += windlls
647 installtarget = env.Alias('install', allinstall)
648 bininstalltarget = env.Alias('install-bin', blenderinstall)
650 nsisaction = env.Action(btools.NSIS_Installer, btools.NSIS_print)
651 nsiscmd = env.Command('nsisinstaller', None, nsisaction)
652 nsisalias = env.Alias('nsis', nsiscmd)
654 if 'blender' in B.targets:
655 blenderexe= env.Alias('blender', B.program_list)
656 Depends(blenderexe,installtarget)
658 if env['WITH_BF_PLAYER']:
659 blenderplayer = env.Alias('blenderplayer', B.program_list)
660 Depends(blenderplayer,installtarget)
662 if not env['WITH_BF_GAMEENGINE']:
663 blendernogame = env.Alias('blendernogame', B.program_list)
664 Depends(blendernogame,installtarget)
666 if 'blenderlite' in B.targets:
667 blenderlite = env.Alias('blenderlite', B.program_list)
668 Depends(blenderlite,installtarget)
670 Depends(nsiscmd, allinstall)
672 Default(B.program_list)
674 if not env['WITHOUT_BF_INSTALL']:
675 Default(installtarget)