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', 'player2', '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 if 'blenderlite' in B.targets:
215 target_env_defs['WITH_BF_GAMEENGINE'] = False
216 target_env_defs['WITH_BF_OPENAL'] = False
217 target_env_defs['WITH_BF_OPENEXR'] = False
218 target_env_defs['WITH_BF_OPENMP'] = False
219 target_env_defs['WITH_BF_ICONV'] = False
220 target_env_defs['WITH_BF_INTERNATIONAL'] = False
221 target_env_defs['WITH_BF_OPENJPEG'] = False
222 target_env_defs['WITH_BF_FFMPEG'] = False
223 target_env_defs['WITH_BF_QUICKTIME'] = False
224 target_env_defs['WITH_BF_REDCODE'] = False
225 target_env_defs['WITH_BF_DDS'] = False
226 target_env_defs['WITH_BF_CINEON'] = False
227 target_env_defs['WITH_BF_HDR'] = False
228 target_env_defs['WITH_BF_ZLIB'] = False
229 target_env_defs['WITH_BF_SDL'] = False
230 target_env_defs['WITH_BF_JPEG'] = False
231 target_env_defs['WITH_BF_PNG'] = False
232 target_env_defs['WITH_BF_BULLET'] = False
233 target_env_defs['WITH_BF_BINRELOC'] = False
234 target_env_defs['BF_BUILDINFO'] = False
235 target_env_defs['BF_NO_ELBEEM'] = True
236 target_env_defs['WITH_BF_PYTHON'] = False
238 # Merge blenderlite, let command line to override
239 for k,v in target_env_defs.iteritems():
240 if k not in B.arguments:
244 if env['WITH_BF_OPENMP'] == 1:
245 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
246 env['CCFLAGS'].append('/openmp')
247 env['CPPFLAGS'].append('/openmp')
248 env['CXXFLAGS'].append('/openmp')
250 if env['CC'].endswith('icc'): # to be able to handle CC=/opt/bla/icc case
251 env.Append(LINKFLAGS=['-openmp', '-static-intel'])
252 env['CCFLAGS'].append('-openmp')
253 env['CPPFLAGS'].append('-openmp')
254 env['CXXFLAGS'].append('-openmp')
256 env.Append(CCFLAGS=['-fopenmp'])
257 env.Append(CPPFLAGS=['-fopenmp'])
258 env.Append(CXXFLAGS=['-fopenmp'])
260 if env['WITH_GHOST_COCOA'] == True:
261 env.Append(CFLAGS=['-DGHOST_COCOA'])
262 env.Append(CXXFLAGS=['-DGHOST_COCOA'])
263 env.Append(CPPFLAGS=['-DGHOST_COCOA'])
265 if env['USE_QTKIT'] == True:
266 env.Append(CFLAGS=['-DUSE_QTKIT'])
267 env.Append(CXXFLAGS=['-DUSE_QTKIT'])
268 env.Append(CPPFLAGS=['-DUSE_QTKIT'])
270 #check for additional debug libnames
272 if env.has_key('BF_DEBUG_LIBS'):
273 B.quickdebug += env['BF_DEBUG_LIBS']
275 printdebug = B.arguments.get('BF_LISTDEBUG', 0)
277 if len(B.quickdebug) > 0 and printdebug != 0:
278 print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC
279 for l in B.quickdebug:
282 # remove stdc++ from LLIBS if we are building a statc linked CXXFLAGS
283 if env['WITH_BF_STATICCXX']:
284 if 'stdc++' in env['LLIBS']:
285 env['LLIBS'].remove('stdc++')
287 print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform'
289 # check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline
290 if 'blenderplayer' in B.targets:
291 env['WITH_BF_PLAYER'] = True
293 if 'blendernogame' in B.targets:
294 env['WITH_BF_GAMEENGINE'] = False
296 # disable elbeem (fluidsim) compilation?
297 if env['BF_NO_ELBEEM'] == 1:
298 env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
299 env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
300 env['CCFLAGS'].append('-DDISABLE_ELBEEM')
302 if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming', 'win64-vc'):
303 env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup')
304 env['PLATFORM_LINKFLAGS'].append('/ENTRY:main')
306 # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
307 B.root_build_dir = env['BF_BUILDDIR']
308 B.doc_build_dir = os.path.join(env['BF_INSTALLDIR'], 'doc')
309 if not B.root_build_dir[-1]==os.sep:
310 B.root_build_dir += os.sep
311 if not B.doc_build_dir[-1]==os.sep:
312 B.doc_build_dir += os.sep
314 # We do a shortcut for clean when no quicklist is given: just delete
315 # builddir without reading in SConscripts
317 if 'clean' in B.targets:
320 if not quickie and do_clean:
321 if os.path.exists(B.doc_build_dir):
322 print B.bc.HEADER+'Cleaning doc dir...'+B.bc.ENDC
323 dirs = os.listdir(B.doc_build_dir)
325 if os.path.isdir(B.doc_build_dir + entry) == 1:
326 print "clean dir %s"%(B.doc_build_dir+entry)
327 shutil.rmtree(B.doc_build_dir+entry)
329 print "remove file %s"%(B.doc_build_dir+entry)
330 os.remove(B.root_build_dir+entry)
331 if os.path.exists(B.root_build_dir):
332 print B.bc.HEADER+'Cleaning build dir...'+B.bc.ENDC
333 dirs = os.listdir(B.root_build_dir)
335 if os.path.isdir(B.root_build_dir + entry) == 1:
336 print "clean dir %s"%(B.root_build_dir+entry)
337 shutil.rmtree(B.root_build_dir+entry)
339 print "remove file %s"%(B.root_build_dir+entry)
340 os.remove(B.root_build_dir+entry)
341 for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak',
342 'extern/xvidcore/build/generic/platform.inc', 'extern/ffmpeg/include']:
343 if os.path.exists(confile):
344 print "clean file %s"%confile
345 if os.path.isdir(confile):
346 for root, dirs, files in os.walk(confile):
348 os.remove(os.path.join(root, name))
351 print B.bc.OKGREEN+'...done'+B.bc.ENDC
353 print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
356 if not os.path.isdir ( B.root_build_dir):
357 os.makedirs ( B.root_build_dir )
358 os.makedirs ( B.root_build_dir + 'source' )
359 os.makedirs ( B.root_build_dir + 'intern' )
360 os.makedirs ( B.root_build_dir + 'extern' )
361 os.makedirs ( B.root_build_dir + 'lib' )
362 os.makedirs ( B.root_build_dir + 'bin' )
363 # # Docs not working with epy anymore
364 # if not os.path.isdir(B.doc_build_dir) and env['WITH_BF_DOCS']:
365 # os.makedirs ( B.doc_build_dir )
367 Help(opts.GenerateHelpText(env))
369 # default is new quieter output, but if you need to see the
370 # commands, do 'scons BF_QUIET=0'
371 bf_quietoutput = B.arguments.get('BF_QUIET', '1')
373 B.set_quiet_output(env)
378 print B.bc.HEADER+'Building in: ' + B.bc.ENDC + os.path.abspath(B.root_build_dir)
379 env.SConsignFile(B.root_build_dir+'scons-signatures')
382 ##### END SETUP ##########
386 BuildDir(B.root_build_dir+'/intern', 'intern', duplicate=0)
387 SConscript(B.root_build_dir+'/intern/SConscript')
388 BuildDir(B.root_build_dir+'/extern', 'extern', duplicate=0)
389 SConscript(B.root_build_dir+'/extern/SConscript')
390 BuildDir(B.root_build_dir+'/source', 'source', duplicate=0)
391 SConscript(B.root_build_dir+'/source/SConscript')
393 # now that we have read all SConscripts, we know what
394 # libraries will be built. Create list of
395 # libraries to give as objects to linking phase
397 for tp in B.possible_types:
398 if (not tp == 'player') and (not tp == 'player2'):
399 mainlist += B.create_blender_liblist(env, tp)
401 if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
402 B.propose_priorities()
404 dobj = B.buildinfo(env, "dynamic") + B.resources
405 thestatlibs, thelibincs = B.setup_staticlibs(env)
406 thesyslibs = B.setup_syslibs(env)
408 if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
409 env.BlenderProg(B.root_build_dir, "blender", mainlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
410 if env['WITH_BF_PLAYER']:
411 playerlist = B.create_blender_liblist(env, 'player')
412 playerlist += B.create_blender_liblist(env, 'player2')
413 playerlist += B.create_blender_liblist(env, 'intern')
414 playerlist += B.create_blender_liblist(env, 'extern')
415 env.BlenderProg(B.root_build_dir, "blenderplayer", playerlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
417 ##### Now define some targets
420 #------------ INSTALL
424 if env['OURPLATFORM']=='darwin':
425 for prg in B.program_list:
426 bundle = '%s.app' % prg[0]
427 bundledir = os.path.dirname(bundle)
428 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 blenderinstall = env.Install(dir=env['BF_INSTALLDIR'], source=B.program_list)
439 #-- local path = config files in install dir: installdir\VERSION
440 #- dont do config and scripts for darwin, it is already in the bundle
443 datafilestargetlist = []
447 if env['OURPLATFORM']!='darwin':
448 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 dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['datafiles'] + dp.split(os.sep)[1:])) # skip bin
467 datafilestargetlist.append(dir + os.sep + f)
470 dotblendlist.append(os.path.join(dp, f))
471 dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['config'] + dp.split(os.sep)[1:])) # skip bin
472 dottargetlist.append(dir + os.sep + f)
474 dotblenderinstall = []
475 for targetdir,srcfile in zip(dottargetlist, dotblendlist):
476 td, tf = os.path.split(targetdir)
477 dotblenderinstall.append(env.Install(dir=td, source=srcfile))
478 for targetdir,srcfile in zip(datafilestargetlist, datafileslist):
479 td, tf = os.path.split(targetdir)
480 dotblenderinstall.append(env.Install(dir=td, source=srcfile))
482 if env['WITH_BF_PYTHON']:
483 #-- local/VERSION/scripts
484 scriptpaths=['release/scripts']
485 for scriptpath in scriptpaths:
486 for dp, dn, df in os.walk(scriptpath):
492 dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
493 dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
495 source=[os.path.join(dp, f) for f in df if f[-3:]!='pyc']
496 # To ensure empty dirs are created too
498 env.Execute(Mkdir(dir))
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'):
512 iconlist.append(os.path.join(tp, f))
513 icontargetlist.append( os.path.join(*([env['BF_INSTALLDIR']] + 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'):
539 df = tp[8:] # remove 'release/'
541 pluglist.append(os.path.join(tp, f))
542 plugtargetlist.append( os.path.join(env['BF_INSTALLDIR'], VERSION, df, f) )
545 # header files for plugins
546 pluglist.append('source/blender/blenpluginapi/documentation.h')
547 plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], VERSION, 'plugins', 'include', 'documentation.h'))
548 pluglist.append('source/blender/blenpluginapi/externdef.h')
549 plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], VERSION, 'plugins', 'include', 'externdef.h'))
550 pluglist.append('source/blender/blenpluginapi/floatpatch.h')
551 plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], VERSION, 'plugins', 'include', 'floatpatch.h'))
552 pluglist.append('source/blender/blenpluginapi/iff.h')
553 plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], VERSION, 'plugins', 'include', 'iff.h'))
554 pluglist.append('source/blender/blenpluginapi/plugin.h')
555 plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], VERSION, 'plugins', 'include', 'plugin.h'))
556 pluglist.append('source/blender/blenpluginapi/util.h')
557 plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], VERSION, 'plugins', 'include', 'util.h'))
558 pluglist.append('source/blender/blenpluginapi/plugin.DEF')
559 plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], VERSION, 'plugins', 'include', 'plugin.def'))
562 for targetdir,srcfile in zip(plugtargetlist, pluglist):
563 td, tf = os.path.split(targetdir)
564 plugininstall.append(env.Install(dir=td, source=srcfile))
568 for tp, tn, tf in os.walk('release/text'):
574 textlist.append(tp+os.sep+f)
576 textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist)
578 if env['OURPLATFORM']=='darwin':
579 allinstall = [blenderinstall, plugininstall, textinstall]
580 elif env['OURPLATFORM']=='linux2':
581 allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall, iconinstall]
583 allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
585 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
588 if not env['OURPLATFORM'] in ('win32-mingw', 'win64-vc', 'linuxcross'):
589 # For MinGW and linuxcross static linking will be used
590 dllsources += ['${LCGDIR}/gettext/lib/gnu_gettext.dll']
592 #currently win64-vc doesn't appear to have libpng.dll
593 if env['OURPLATFORM'] != 'win64-vc':
594 dllsources += ['${BF_PNG_LIBPATH}/libpng.dll']
596 dllsources += ['${BF_ZLIB_LIBPATH}/zlib.dll']
597 # Used when linking to libtiff was dynamic
598 # keep it here until compilation on all platform would be ok
599 # dllsources += ['${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll']
601 if env['OURPLATFORM'] != 'linuxcross':
602 # pthreads library is already added
603 dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll']
605 if env['WITH_BF_SDL']:
606 if env['OURPLATFORM'] == 'win64-vc':
607 pass # we link statically already to SDL on win64
609 dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
611 if env['WITH_BF_PYTHON']:
613 dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll')
615 dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll')
617 if env['WITH_BF_ICONV']:
618 if env['OURPLATFORM'] == 'win64-vc':
619 pass # we link statically to iconv on win64
620 elif not env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'):
621 #gettext for MinGW and cross-compilation is compiled staticly
622 dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll']
624 if env['WITH_BF_OPENAL']:
625 dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
626 dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
628 if env['WITH_BF_SNDFILE']:
629 dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
631 if env['WITH_BF_FFMPEG']:
632 dllsources += ['${BF_FFMPEG_LIBPATH}/avcodec-52.dll',
633 '${BF_FFMPEG_LIBPATH}/avformat-52.dll',
634 '${BF_FFMPEG_LIBPATH}/avdevice-52.dll',
635 '${BF_FFMPEG_LIBPATH}/avutil-50.dll',
636 '${BF_FFMPEG_LIBPATH}/swscale-0.dll']
637 windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
638 allinstall += windlls
640 installtarget = env.Alias('install', allinstall)
641 bininstalltarget = env.Alias('install-bin', blenderinstall)
643 nsisaction = env.Action(btools.NSIS_Installer, btools.NSIS_print)
644 nsiscmd = env.Command('nsisinstaller', None, nsisaction)
645 nsisalias = env.Alias('nsis', nsiscmd)
647 if 'blender' in B.targets:
648 blenderexe= env.Alias('blender', B.program_list)
649 Depends(blenderexe,installtarget)
651 if env['WITH_BF_PLAYER']:
652 blenderplayer = env.Alias('blenderplayer', B.program_list)
653 Depends(blenderplayer,installtarget)
655 if not env['WITH_BF_GAMEENGINE']:
656 blendernogame = env.Alias('blendernogame', B.program_list)
657 Depends(blendernogame,installtarget)
659 if 'blenderlite' in B.targets:
660 blenderlite = env.Alias('blenderlite', B.program_list)
661 Depends(blenderlite,installtarget)
663 Depends(nsiscmd, allinstall)
665 Default(B.program_list)
667 if not env['WITHOUT_BF_INSTALL']:
668 Default(installtarget)