merge trunk 17122:17213
[blender.git] / SConstruct
1 #!/usr/bin/env python
2 # $Id$
3 # ***** BEGIN GPL LICENSE BLOCK *****
4 #
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.
9 #
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.
14 #
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.
18 #
19 # The Original Code is Copyright (C) 2006, Blender Foundation
20 # All rights reserved.
21 #
22 # The Original Code is: all of this file.
23 #
24 # Contributor(s): Nathan Letwory.
25 #
26 # ***** END GPL LICENSE BLOCK *****
27 #
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
31
32 import sys
33 import os
34 import os.path
35 import string
36 import shutil
37 import glob
38 import re
39 from tempfile import mkdtemp
40
41 import tools.Blender
42 import tools.btools
43 import tools.bcolors
44
45 BlenderEnvironment = tools.Blender.BlenderEnvironment
46 btools = tools.btools
47 B = tools.Blender
48
49 ### globals ###
50 platform = sys.platform
51 quickie = None
52 quickdebug = None
53 nsis_build = None
54
55 ##### BEGIN SETUP #####
56
57 B.possible_types = ['core', 'common', 'blender', 'intern',
58                     'international', 'game', 'game2',
59                     'player', 'player2', 'system']
60
61 B.binarykind = ['blender' , 'blenderplayer']
62 ##################################
63 # target and argument validation #
64 ##################################
65 # XX cheating for BF_FANCY, we check for BF_FANCY before args are validated
66 use_color = ARGUMENTS.get('BF_FANCY', '1')
67 if platform=='win32':
68     use_color = None
69
70 if not use_color=='1':
71     B.bc.disable()
72     
73  #on defaut white Os X terminal, some colors are totally unlegible
74 if platform=='darwin':
75     B.bc.OKGREEN = '\033[34m'
76     B.bc.WARNING = '\033[36m'
77
78 # arguments
79 print B.bc.HEADER+'Command-line arguments'+B.bc.ENDC
80 B.arguments = btools.validate_arguments(ARGUMENTS, B.bc)
81 btools.print_arguments(B.arguments, B.bc)
82
83 # targets
84 print B.bc.HEADER+'Command-line targets'+B.bc.ENDC
85 B.targets = btools.validate_targets(COMMAND_LINE_TARGETS, B.bc)
86 btools.print_targets(B.targets, B.bc)
87
88 ##########################
89 # setting up environment #
90 ##########################
91
92 # handling cmd line arguments & config file
93
94 # first check cmdline for toolset and we create env to work on
95 quickie = B.arguments.get('BF_QUICK', None)
96 quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
97
98 if quickdebug:
99     B.quickdebug=string.split(quickdebug, ',')
100 else:
101     B.quickdebug=[]
102
103 if quickie:
104     B.quickie=string.split(quickie,',')
105 else:
106     B.quickie=[]
107     
108 toolset = B.arguments.get('BF_TOOLSET', None)
109 if toolset:
110     print "Using " + toolset
111     if toolset=='mstoolkit':
112         env = BlenderEnvironment(ENV = os.environ)
113         env.Tool('mstoolkit', ['tools'])
114     else:
115         env = BlenderEnvironment(tools=[toolset], ENV = os.environ)
116         if env:
117             btools.SetupSpawn(env)
118 else:
119     env = BlenderEnvironment(ENV = os.environ)
120
121 if not env:
122     print "Could not create a build environment"
123     Exit()
124
125
126 cc = B.arguments.get('CC', None)
127 cxx = B.arguments.get('CXX', None)
128 if cc:
129     env['CC'] = cc
130 if cxx:
131     env['CXX'] = cxx
132
133 if env['CC'] in ['cl', 'cl.exe'] and sys.platform=='win32':
134     platform = 'win32-vc'
135 elif env['CC'] in ['gcc'] and sys.platform=='win32':
136     platform = 'win32-mingw'
137
138 env.SConscriptChdir(0)
139
140 crossbuild = B.arguments.get('BF_CROSS', None)
141 if crossbuild and platform!='win32':
142     platform = 'linuxcross'
143
144 env['OURPLATFORM'] = platform
145
146 configfile = 'config'+os.sep+platform+'-config.py'
147
148 if os.path.exists(configfile):
149     print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile
150 else:
151     print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC
152
153 if crossbuild and env['PLATFORM'] != 'win32':
154     print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC
155     env.Tool('crossmingw', ['tools'])
156     # todo: determine proper libs/includes etc.
157     # Needed for gui programs, console programs should do without it
158     env.Append(LINKFLAGS=['-mwindows'])
159
160 userconfig = B.arguments.get('BF_CONFIG', 'user-config.py')
161 # first read platform config. B.arguments will override
162 optfiles = [configfile]
163 if os.path.exists(userconfig):
164     print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig
165     optfiles += [userconfig]
166 else:
167     print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC
168
169 opts = btools.read_opts(optfiles, B.arguments)
170 opts.Update(env)
171
172 if not env['BF_FANCY']:
173     B.bc.disable()
174
175 # disable elbeem (fluidsim) compilation?
176 if env['BF_NO_ELBEEM'] == 1:
177     env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
178     env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
179     env['CCFLAGS'].append('-DDISABLE_ELBEEM')
180
181 if env['WITH_BF_OPENMP'] == 1:
182         if env['OURPLATFORM']=='win32-vc':
183                 env['CCFLAGS'].append('/openmp')
184                 env['CPPFLAGS'].append('/openmp')
185                 env['CXXFLAGS'].append('/openmp')
186         else:
187             if env['CC'][-3:] == 'icc': # to be able to handle CC=/opt/bla/icc case
188                 env.Append(LINKFLAGS=['-openmp', '-static-intel'])
189                 env['CCFLAGS'].append('-openmp')
190                 env['CPPFLAGS'].append('-openmp')
191                 env['CXXFLAGS'].append('-openmp')
192             else:
193                 env.Append(CCFLAGS=['-fopenmp']) 
194                 env.Append(CPPFLAGS=['-fopenmp'])
195                 env.Append(CXXFLAGS=['-fopenmp'])
196                 # env.Append(LINKFLAGS=['-fprofile-generate'])
197
198 #check for additional debug libnames
199
200 if env.has_key('BF_DEBUG_LIBS'):
201     B.quickdebug += env['BF_DEBUG_LIBS']
202
203 printdebug = B.arguments.get('BF_LISTDEBUG', 0)
204
205 # see if this linux distro has libalut
206
207 if env['OURPLATFORM'] == 'linux2' :
208     if env['WITH_BF_OPENAL']:
209         mylib_test_source_file = """
210         #include "AL/alut.h"
211         int main(int argc, char **argv)
212         {
213             alutGetMajorVersion();
214             return 0;
215         }
216         """
217
218         def CheckFreeAlut(context,env):
219             context.Message( B.bc.OKGREEN + "Linux platform detected:\n  checking for FreeAlut... " + B.bc.ENDC )
220             env['LIBS'] = 'alut'
221             result = context.TryLink(mylib_test_source_file, '.c')
222             context.Result(result)
223             return result
224
225         env2 = env.Copy( LIBPATH = env['BF_OPENAL'] ) 
226         sconf_temp = mkdtemp()
227         conf = Configure( env2, {'CheckFreeAlut' : CheckFreeAlut}, sconf_temp, '/dev/null' )
228         if conf.CheckFreeAlut( env2 ):
229             env['BF_OPENAL_LIB'] += ' alut'
230         del env2
231         root = ''
232         for root, dirs, files in os.walk(sconf_temp, topdown=False):
233             for name in files:
234                 os.remove(os.path.join(root, name))
235             for name in dirs:
236                 os.rmdir(os.path.join(root, name))
237         if root: os.rmdir(root)
238
239 if len(B.quickdebug) > 0 and printdebug != 0:
240     print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC
241     for l in B.quickdebug:
242         print "\t" + l
243
244 # remove stdc++ from LLIBS if we are building a statc linked CXXFLAGS
245 if env['WITH_BF_STATICCXX']:
246     if 'stdc++' in env['LLIBS']:
247         env['LLIBS'] = env['LLIBS'].replace('stdc++', ' ')
248     else:
249         print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform'
250
251 # check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline
252 if 'blenderplayer' in B.targets:
253     env['WITH_BF_PLAYER'] = True
254
255 if 'blendernogame' in B.targets:
256     env['WITH_BF_GAMEENGINE'] = False
257
258 if 'blenderlite' in B.targets:
259     env['WITH_BF_GAMEENGINE'] = False
260     env['WITH_BF_OPENAL'] = False
261     env['WITH_BF_OPENEXR'] = False
262     env['WITH_BF_ICONV'] = False
263     env['WITH_BF_INTERNATIONAL'] = False
264     env['WITH_BF_OPENJPEG'] = False
265     env['WITH_BF_FFMPEG'] = False
266     env['WITH_BF_QUICKTIME'] = False
267     env['WITH_BF_YAFRAY'] = False
268     env['WITH_BF_REDCODE'] = False
269     env['WITH_BF_FTGL'] = False
270     env['WITH_BF_DDS'] = False
271     env['WITH_BF_ZLIB'] = False
272     env['WITH_BF_SDL'] = False
273     env['WITH_BF_JPEG'] = False
274     env['WITH_BF_PNG'] = False
275     env['WITH_BF_ODE'] = False
276     env['WITH_BF_BULLET'] = False
277     env['WITH_BF_BINRELOC'] = False
278     env['BF_BUILDINFO'] = False
279     env['BF_NO_ELBEEM'] = True
280     env['WITH_BF_PYTHON'] = False
281
282 # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
283 #B.root_build_dir = B.arguments.get('BF_BUILDDIR', '..'+os.sep+'build'+os.sep+platform+os.sep)
284 B.root_build_dir = env['BF_BUILDDIR']
285 B.doc_build_dir = env['BF_DOCDIR']
286 if not B.root_build_dir[-1]==os.sep:
287     B.root_build_dir += os.sep
288 if not B.doc_build_dir[-1]==os.sep:
289     B.doc_build_dir += os.sep
290     
291 # We do a shortcut for clean when no quicklist is given: just delete
292 # builddir without reading in SConscripts
293 do_clean = None
294 if 'clean' in B.targets:
295     do_clean = True
296
297 if not quickie and do_clean:
298     if os.path.exists(B.doc_build_dir):
299         print B.bc.HEADER+'Cleaning doc dir...'+B.bc.ENDC
300         dirs = os.listdir(B.doc_build_dir)
301         for entry in dirs:
302             if os.path.isdir(B.doc_build_dir + entry) == 1:
303                 print "clean dir %s"%(B.doc_build_dir+entry)
304                 shutil.rmtree(B.doc_build_dir+entry)
305             else: # remove file
306                 print "remove file %s"%(B.doc_build_dir+entry)
307                 os.remove(B.root_build_dir+entry)
308     if os.path.exists(B.root_build_dir):
309         print B.bc.HEADER+'Cleaning build dir...'+B.bc.ENDC
310         dirs = os.listdir(B.root_build_dir)
311         for entry in dirs:
312             if os.path.isdir(B.root_build_dir + entry) == 1:
313                 print "clean dir %s"%(B.root_build_dir+entry)
314                 shutil.rmtree(B.root_build_dir+entry)
315             else: # remove file
316                 print "remove file %s"%(B.root_build_dir+entry)
317                 os.remove(B.root_build_dir+entry)
318         for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak',
319                 'extern/xvidcore/build/generic/platform.inc']:
320             if os.path.exists(confile):
321                 print "clean file %s"%confile
322                 os.remove(confile)
323         print B.bc.OKGREEN+'...done'+B.bc.ENDC
324     else:
325         print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
326     Exit()
327
328 if not os.path.isdir ( B.root_build_dir):
329     os.makedirs ( B.root_build_dir )
330     os.makedirs ( B.root_build_dir + 'source' )
331     os.makedirs ( B.root_build_dir + 'intern' )
332     os.makedirs ( B.root_build_dir + 'extern' )
333     os.makedirs ( B.root_build_dir + 'lib' )
334     os.makedirs ( B.root_build_dir + 'bin' )
335 if not os.path.isdir(B.doc_build_dir):
336     os.makedirs ( B.doc_build_dir )
337
338 Help(opts.GenerateHelpText(env))
339
340 # default is new quieter output, but if you need to see the 
341 # commands, do 'scons BF_QUIET=0'
342 bf_quietoutput = B.arguments.get('BF_QUIET', '1')
343 if env['BF_QUIET']:
344     B.set_quiet_output(env)
345 else:
346     if toolset=='msvc':
347         B.msvc_hack(env)
348
349 print B.bc.HEADER+'Building in '+B.bc.ENDC+B.root_build_dir
350 env.SConsignFile(B.root_build_dir+'scons-signatures')
351 B.init_lib_dict()
352
353 ##### END SETUP ##########
354
355 Export('env')
356
357 BuildDir(B.root_build_dir+'/intern', 'intern', duplicate=0)
358 SConscript(B.root_build_dir+'/intern/SConscript')
359 BuildDir(B.root_build_dir+'/extern', 'extern', duplicate=0)
360 SConscript(B.root_build_dir+'/extern/SConscript')
361 BuildDir(B.root_build_dir+'/source', 'source', duplicate=0)
362 SConscript(B.root_build_dir+'/source/SConscript')
363
364 # now that we have read all SConscripts, we know what
365 # libraries will be built. Create list of
366 # libraries to give as objects to linking phase
367 mainlist = []
368 for tp in B.possible_types:
369     if not tp == 'player' and not tp == 'player2':
370         mainlist += B.create_blender_liblist(env, tp)
371
372 if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
373     B.propose_priorities()
374
375 dobj = B.buildinfo(env, "dynamic") + B.resources
376 thestatlibs, thelibincs = B.setup_staticlibs(env)
377 thesyslibs = B.setup_syslibs(env)
378
379 if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
380     env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
381 if env['WITH_BF_PLAYER']:
382     playerlist = B.create_blender_liblist(env, 'player')
383     env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
384
385 ##### Now define some targets
386
387
388 #------------ INSTALL
389
390 #-- binaries
391 blenderinstall = []
392 if  env['OURPLATFORM']=='darwin':
393     for prg in B.program_list:
394         bundle = '%s.app' % prg[0]
395         bundledir = os.path.dirname(bundle)
396         for dp, dn, df in os.walk(bundle):
397             if 'CVS' in dn:
398                 dn.remove('CVS')
399             if '.svn' in dn:
400                 dn.remove('.svn')
401             dir=env['BF_INSTALLDIR']+dp[len(bundledir):]
402             source=[dp+os.sep+f for f in df]
403             blenderinstall.append(env.Install(dir=dir,source=source))
404 else:
405     blenderinstall = env.Install(dir=env['BF_INSTALLDIR'], source=B.program_list)
406
407 #-- .blender
408 #- dont do .blender and scripts for darwin, it is already in the bundle
409 dotblendlist = []
410 dottargetlist = []
411 scriptinstall = []
412
413 if  env['OURPLATFORM']!='darwin':
414         for dp, dn, df in os.walk('bin/.blender'):
415             if 'CVS' in dn:
416                 dn.remove('CVS')
417             if '.svn' in dn:
418                 dn.remove('.svn')
419             for f in df:
420                 dotblendlist.append(dp+os.sep+f)
421                 dottargetlist.append(env['BF_INSTALLDIR']+dp[3:]+os.sep+f)
422
423         dotblenderinstall = []
424         for targetdir,srcfile in zip(dottargetlist, dotblendlist):
425             td, tf = os.path.split(targetdir)
426             dotblenderinstall.append(env.Install(dir=td, source=srcfile))
427         
428         #-- .blender/scripts    
429         scriptpath='release/scripts'
430         for dp, dn, df in os.walk(scriptpath):
431             if 'CVS' in dn:
432                 dn.remove('CVS')
433             if '.svn' in dn:
434                 dn.remove('.svn')
435             dir=env['BF_INSTALLDIR']+'/.blender/scripts'+dp[len(scriptpath):]
436             source=[dp+os.sep+f for f in df]
437             scriptinstall.append(env.Install(dir=dir,source=source))
438
439 #-- icons
440 if env['OURPLATFORM']=='linux2':
441         iconlist = []
442         icontargetlist = []
443
444         for tp, tn, tf in os.walk('release/freedesktop/icons'):
445                 if 'CVS' in tn:
446                         tn.remove('CVS')
447                 if '.svn' in tn:
448                         tn.remove('.svn')
449                 for f in tf:
450                         print ">>>", env['BF_INSTALLDIR'], tp, f
451                         iconlist.append(tp+os.sep+f)
452                         icontargetlist.append(env['BF_INSTALLDIR']+tp[19:]+os.sep+f)
453
454         iconinstall = []
455         for targetdir,srcfile in zip(icontargetlist, iconlist):
456                 td, tf = os.path.split(targetdir)
457                 iconinstall.append(env.Install(dir=td, source=srcfile))
458
459 #-- plugins
460 pluglist = []
461 plugtargetlist = []
462 for tp, tn, tf in os.walk('release/plugins'):
463     if 'CVS' in tn:
464         tn.remove('CVS')
465     if '.svn' in tn:
466         tn.remove('.svn')
467     for f in tf:
468         print ">>>", env['BF_INSTALLDIR'], tp, f
469         pluglist.append(tp+os.sep+f)
470         plugtargetlist.append(env['BF_INSTALLDIR']+tp[7:]+os.sep+f)
471
472 # header files for plugins
473 pluglist.append('source/blender/blenpluginapi/documentation.h')
474 plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'documentation.h')
475 pluglist.append('source/blender/blenpluginapi/externdef.h')
476 plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'externdef.h')
477 pluglist.append('source/blender/blenpluginapi/floatpatch.h')
478 plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'floatpatch.h')
479 pluglist.append('source/blender/blenpluginapi/iff.h')
480 plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'iff.h')
481 pluglist.append('source/blender/blenpluginapi/plugin.h')
482 plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'plugin.h')
483 pluglist.append('source/blender/blenpluginapi/util.h')
484 plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep +'util.h')
485 pluglist.append('source/blender/blenpluginapi/plugin.DEF')
486 plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'include' + os.sep + 'plugin.def')
487
488 plugininstall = []
489 for targetdir,srcfile in zip(plugtargetlist, pluglist):
490     td, tf = os.path.split(targetdir)
491     plugininstall.append(env.Install(dir=td, source=srcfile))
492
493 textlist = []
494 texttargetlist = []
495 for tp, tn, tf in os.walk('release/text'):
496     if 'CVS' in tn:
497         tn.remove('CVS')
498     if '.svn' in tn:
499         tn.remove('.svn')
500     for f in tf:
501         textlist.append(tp+os.sep+f)
502
503 textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist)
504
505 if  env['OURPLATFORM']=='darwin':
506         allinstall = [blenderinstall, plugininstall, textinstall]
507 elif env['OURPLATFORM']=='linux2':
508         allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall, iconinstall]
509 else:
510         allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
511
512 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
513     dllsources = ['${LCGDIR}/gettext/lib/gnu_gettext.dll',
514                         '${LCGDIR}/png/lib/libpng.dll',
515                         '#release/windows/extra/python25.zip',
516                         '#release/windows/extra/zlib.pyd',
517                         '${LCGDIR}/sdl/lib/SDL.dll',
518                         '${LCGDIR}/zlib/lib/zlib.dll',
519                         '${LCGDIR}/tiff/lib/libtiff.dll']
520     if env['BF_DEBUG']:
521         dllsources.append('${LCGDIR}/python/lib/${BF_PYTHON_LIB}_d.dll')
522     else:
523         dllsources.append('${LCGDIR}/python/lib/${BF_PYTHON_LIB}.dll')
524     if env['OURPLATFORM'] == 'win32-mingw':
525         dllsources += ['${LCGDIR}/pthreads/lib/pthreadGC2.dll']
526     else:
527         dllsources += ['${LCGDIR}/pthreads/lib/pthreadVC2.dll']
528     if env['WITH_BF_ICONV']:
529         dllsources += ['${LCGDIR}/iconv/lib/iconv.dll']
530     if env['WITH_BF_FFMPEG']:
531         dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-51.dll',
532                         '${LCGDIR}/ffmpeg/lib/avformat-52.dll',
533                         '${LCGDIR}/ffmpeg/lib/avdevice-52.dll',
534                         '${LCGDIR}/ffmpeg/lib/avutil-49.dll',
535                         '${LCGDIR}/ffmpeg/lib/libfaad-0.dll',
536                         '${LCGDIR}/ffmpeg/lib/libfaac-0.dll',
537                         '${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
538                         '${LCGDIR}/ffmpeg/lib/libx264-59.dll',
539                         '${LCGDIR}/ffmpeg/lib/xvidcore.dll',
540                         '${LCGDIR}/ffmpeg/lib/swscale-0.dll']
541     windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
542     allinstall += windlls
543
544 installtarget = env.Alias('install', allinstall)
545 bininstalltarget = env.Alias('install-bin', blenderinstall)
546
547 nsisaction = env.Action(btools.NSIS_Installer, btools.NSIS_print)
548 nsiscmd = env.Command('nsisinstaller', None, nsisaction)
549 nsisalias = env.Alias('nsis', nsiscmd)
550
551 if 'blender' in B.targets:
552         blenderexe= env.Alias('blender', B.program_list)
553         Depends(blenderexe,installtarget)
554
555 if env['WITH_BF_PLAYER']:
556     blenderplayer = env.Alias('blenderplayer', B.program_list)
557     Depends(blenderplayer,installtarget)
558
559 if not env['WITH_BF_GAMEENGINE']:
560     blendernogame = env.Alias('blendernogame', B.program_list)
561     Depends(blendernogame,installtarget)
562
563 if 'blenderlite' in B.targets:
564         blenderlite = env.Alias('blenderlite', B.program_list)
565         Depends(blenderlite,installtarget)
566
567 Depends(nsiscmd, allinstall)
568
569 Default(B.program_list)
570
571 if not env['WITHOUT_BF_INSTALL']:
572         Default(installtarget)
573
574 #------------ RELEASE
575 # TODO: zipup the installation
576
577 #------------ BLENDERPLAYER
578 # TODO: build stubs and link into blenderplayer
579
580 #------------ EPYDOC
581 if env['WITH_BF_DOCS']:
582     SConscript('source/blender/python/api2_2x/doc/SConscript')
583     SConscript('source/gameengine/PyDoc/SConscript')
584