- Fix for bug #8264: SSS turned off by "default" render settings button,
[plumiferos.git] / SConstruct
blobb59720bffb6ebf4e4de1cb3d2ef50333587929aa
1 #!/usr/bin/env python
2 # $Id: SConstruct 12962 2007-12-20 17:52:57Z jesterking $
3 # ***** BEGIN GPL/BL DUAL 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. The Blender
9 # Foundation also sells licenses for use in proprietary software under
10 # the Blender License. See http://www.blender.org/BL/ for information
11 # about this.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software Foundation,
20 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 # The Original Code is Copyright (C) 2006, Blender Foundation
23 # All rights reserved.
25 # The Original Code is: all of this file.
27 # Contributor(s): Nathan Letwory.
29 # ***** END GPL/BL DUAL LICENSE BLOCK *****
31 # Main entry-point for the SCons building system
32 # Set up some custom actions and target/argument handling
33 # Then read all SConscripts and build
35 import sys
36 import os
37 import os.path
38 import string
39 import shutil
40 import glob
41 import re
43 import tools.Blender
44 import tools.btools
45 import tools.bcolors
47 BlenderEnvironment = tools.Blender.BlenderEnvironment
48 btools = tools.btools
49 B = tools.Blender
51 ### globals ###
52 platform = sys.platform
53 quickie = None
54 quickdebug = None
55 nsis_build = None
57 ##### BEGIN SETUP #####
59 B.possible_types = ['core', 'common', 'blender', 'intern',
60 'international', 'game', 'game2',
61 'player', 'player2', 'system']
63 B.binarykind = ['blender' , 'blenderplayer']
64 ##################################
65 # target and argument validation #
66 ##################################
67 # XX cheating for BF_FANCY, we check for BF_FANCY before args are validated
68 use_color = ARGUMENTS.get('BF_FANCY', '1')
69 if platform=='win32':
70 use_color = None
72 if not use_color=='1':
73 B.bc.disable()
75 #on defaut white Os X terminal, some colors are totally unlegible
76 if platform=='darwin':
77 B.bc.OKGREEN = '\033[34m'
78 B.bc.WARNING = '\033[36m'
80 # arguments
81 print B.bc.HEADER+'Command-line arguments'+B.bc.ENDC
82 B.arguments = btools.validate_arguments(ARGUMENTS, B.bc)
83 btools.print_arguments(B.arguments, B.bc)
85 # targets
86 print B.bc.HEADER+'Command-line targets'+B.bc.ENDC
87 B.targets = btools.validate_targets(COMMAND_LINE_TARGETS, B.bc)
88 btools.print_targets(B.targets, B.bc)
90 ##########################
91 # setting up environment #
92 ##########################
94 # handling cmd line arguments & config file
96 # first check cmdline for toolset and we create env to work on
97 quickie = B.arguments.get('BF_QUICK', None)
98 quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
100 if quickdebug:
101 B.quickdebug=string.split(quickdebug, ',')
102 else:
103 B.quickdebug=[]
105 if quickie:
106 B.quickie=string.split(quickie,',')
107 else:
108 B.quickie=[]
110 toolset = B.arguments.get('BF_TOOLSET', None)
111 if toolset:
112 print "Using " + toolset
113 if toolset=='mstoolkit':
114 env = BlenderEnvironment(ENV = os.environ)
115 env.Tool('mstoolkit', ['tools'])
116 else:
117 env = BlenderEnvironment(tools=[toolset], ENV = os.environ)
118 else:
119 env = BlenderEnvironment(ENV = os.environ)
121 if not env:
122 print "Could not create a build environment"
123 Exit()
125 env.SConscriptChdir(0)
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
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'
138 # Fix me!
139 #if platform == 'win32-mingw':
140 if 0:
141 try:
142 import win32file
143 import win32event
144 import win32process
145 import win32security
146 import string
148 slash= re.compile(r"\\")
150 def myesc(b):
151 if b[0]!= "-":
152 b = slash.sub(r"\\\\", b[1:-1])
153 return "\"" + b + "\""
154 else:
155 return b
157 def my_spawn(sh, escape, cmd, args, spawnenv):
158 for var in spawnenv:
159 spawnenv[var] = spawnenv[var].encode('ascii', 'replace')
161 sAttrs = win32security.SECURITY_ATTRIBUTES()
162 StartupInfo = win32process.STARTUPINFO()
163 if cmd=='ar' and args[1]=='r':
164 args[1] = '-r'
165 newargs = string.join(map(myesc, args[1:]), ' ')
166 cmdline = cmd + " " + newargs
168 # check for any special operating system commands
169 if cmd == 'del':
170 for arg in args[1:]:
171 win32file.DeleteFile(arg)
172 exit_code = 0
173 else:
174 # otherwise execute the command.
175 hProcess, hThread, dwPid, dwTid = win32process.CreateProcess(None, cmdline, None, None, 1, 0, spawnenv, None, StartupInfo)
176 win32event.WaitForSingleObject(hProcess, win32event.INFINITE)
177 exit_code = win32process.GetExitCodeProcess(hProcess)
178 win32file.CloseHandle(hProcess);
179 win32file.CloseHandle(hThread);
180 return exit_code
182 env['SPAWN'] = my_spawn
183 except:
184 print "install win32all from http://sourceforge.net/project/showfiles.php?group_id=78018"
186 crossbuild = B.arguments.get('BF_CROSS', None)
187 if crossbuild and platform!='win32':
188 platform = 'linuxcross'
190 env['OURPLATFORM'] = platform
192 configfile = B.arguments.get('BF_CONFIG', 'config'+os.sep+platform+'-config.py')
194 if os.path.exists(configfile):
195 print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile
196 else:
197 print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC
199 if crossbuild and env['PLATFORM'] != 'win32':
200 print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC
201 env.Tool('crossmingw', ['tools'])
202 # todo: determine proper libs/includes etc.
203 # Needed for gui programs, console programs should do without it
204 env.Append(LINKFLAGS=['-mwindows'])
206 # first read platform config. B.arguments will override
207 optfiles = [configfile]
208 if os.path.exists('user-config.py'):
209 print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + 'user-config.py'
210 optfiles += ['user-config.py']
211 else:
212 print B.bc.WARNING + 'user-config.py' + " not found, no user overrides" + B.bc.ENDC
214 opts = btools.read_opts(optfiles, B.arguments)
215 opts.Update(env)
217 if not env['BF_FANCY']:
218 B.bc.disable()
220 # disable elbeem (fluidsim) compilation?
221 if env['BF_NO_ELBEEM'] == 1:
222 env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
223 env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
224 env['CCFLAGS'].append('-DDISABLE_ELBEEM')
226 #check for additional debug libnames
228 if env.has_key('BF_DEBUG_LIBS'):
229 B.quickdebug += env['BF_DEBUG_LIBS']
231 printdebug = B.arguments.get('BF_LISTDEBUG', 0)
233 # see if this linux distro has libalut
235 if env['OURPLATFORM'] == 'linux2' :
236 if env['WITH_BF_OPENAL']:
237 mylib_test_source_file = """
238 #include "AL/alut.h"
239 int main(int argc, char **argv)
241 alutGetMajorVersion();
242 return 0;
246 def CheckFreeAlut(context,env):
247 context.Message( B.bc.OKGREEN + "Linux platform detected:\n checking for FreeAlut... " + B.bc.ENDC )
248 env['LIBS'] = 'alut'
249 result = context.TryLink(mylib_test_source_file, '.c')
250 context.Result(result)
251 return result
253 env2 = env.Copy( LIBPATH = env['BF_OPENAL'] )
254 conf = Configure( env2, {'CheckFreeAlut' : CheckFreeAlut}, '.sconf_temp', '/dev/null' )
255 if conf.CheckFreeAlut( env2 ):
256 env['BF_OPENAL_LIB'] += ' alut'
257 del env2
258 for root, dirs, files in os.walk('.sconf_temp', topdown=False):
259 for name in files:
260 os.remove(os.path.join(root, name))
261 for name in dirs:
262 os.rmdir(os.path.join(root, name))
263 os.rmdir(root)
265 if len(B.quickdebug) > 0 and printdebug != 0:
266 print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC
267 for l in B.quickdebug:
268 print "\t" + l
270 # check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline
271 if 'blenderplayer' in B.targets:
272 env['WITH_BF_PLAYER'] = True
274 if 'blendernogame' in B.targets:
275 env['WITH_BF_GAMEENGINE'] = False
277 # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
278 #B.root_build_dir = B.arguments.get('BF_BUILDDIR', '..'+os.sep+'build'+os.sep+platform+os.sep)
279 B.root_build_dir = env['BF_BUILDDIR']
280 env['BUILDDIR'] = B.root_build_dir
281 if not B.root_build_dir[-1]==os.sep:
282 B.root_build_dir += os.sep
284 def NSIS_Installer():
286 if env['OURPLATFORM'] != 'win32-vc' and env['OURPLATFORM'] != 'win32-mingw':
287 print "NSIS installer is only available on Windows."
288 Exit()
290 install_base_dir = os.getcwd() + "\\"
292 if not os.path.exists(install_base_dir+env['BF_INSTALLDIR']+'/plugins/include'):
293 os.mkdir(install_base_dir+env['BF_INSTALLDIR']+'/plugins/include')
295 for f in glob.glob('source/blender/blenpluginapi/*.h'):
296 shutil.copy(f,install_base_dir+env['BF_INSTALLDIR']+'/plugins/include')
298 shutil.copy('source/blender/blenpluginapi/plugin.def',install_base_dir+env['BF_INSTALLDIR']+'/plugins/include/')
300 os.chdir("release")
301 v = open("VERSION")
302 version = v.read()[:-1]
303 shortver = version.split('.')[0] + version.split('.')[1]
304 v.close()
306 #### change to suit install dir ####
307 inst_dir = install_base_dir + env['BF_INSTALLDIR']
309 os.chdir("windows/installer")
311 ns = open("00.sconsblender.nsi","r")
313 ns_cnt = str(ns.read())
314 ns.close()
316 # do root
317 rootlist = []
318 rootdir = os.listdir(inst_dir+"\\")
319 for rootitem in rootdir:
320 if os.path.isdir(inst_dir+"\\"+ rootitem) == 0:
321 rootlist.append("File " + inst_dir + "\\" + rootitem)
322 rootstring = string.join(rootlist, "\n ")
323 rootstring += "\n\n"
324 ns_cnt = string.replace(ns_cnt, "[ROOTDIRCONTS]", rootstring)
326 # do delete items
327 delrootlist = []
328 for rootitem in rootdir:
329 if os.path.isdir(inst_dir + rootitem) == 0:
330 delrootlist.append("Delete $INSTDIR\\" + rootitem)
331 delrootstring = string.join(delrootlist, "\n ")
332 delrootstring += "\n"
333 ns_cnt = string.replace(ns_cnt, "[DELROOTDIRCONTS]", delrootstring)
335 # do scripts
336 scriptlist = []
337 scriptpath = "%s%s" % (inst_dir, "\\.blender\\scripts")
338 scriptdir = os.listdir(scriptpath)
339 for scriptitem in scriptdir:
340 scriptfile = "%s\\%s" % (scriptpath, scriptitem)
341 if os.path.isdir(scriptfile) == 0:
342 scriptlist.append("File %s" % scriptfile)
343 scriptstring = string.join(scriptlist, "\n ")
344 scriptstring += "\n\n"
345 ns_cnt = string.replace(ns_cnt, "[SCRIPTCONTS]", scriptstring)
347 # do scripts\bpymodules
348 bpymodlist = []
349 bpymodpath = "%s%s" % (inst_dir, "\\.blender\\scripts\\bpymodules")
350 bpymoddir = os.listdir(bpymodpath)
352 for bpymoditem in bpymoddir:
353 bpymodfile = "%s\\%s" % (bpymodpath, bpymoditem)
354 if os.path.isdir(bpymodfile) == 0:
355 bpymodlist.append("File %s" % bpymodfile)
356 bpymodstring = string.join(bpymodlist, "\n ")
357 bpymodstring += "\n\n"
358 ns_cnt = string.replace(ns_cnt, "[SCRIPTMODCONTS]", bpymodstring)
360 # do scripts\bpymodules\colladaimex
361 colladalist = []
362 bpymodpath = "%s%s" % (inst_dir, "\\.blender\\scripts\\bpymodules\\ColladaImEx")
363 bpymoddir = os.listdir(bpymodpath)
365 for bpymoditem in bpymoddir:
366 bpymodfile = "%s\\%s" % (bpymodpath, bpymoditem)
367 if os.path.isdir(bpymodfile) == 0:
368 colladalist.append("File %s" % bpymodfile)
369 bpymodstring = string.join(colladalist, "\n ")
370 bpymodstring += "\n\n"
371 ns_cnt = string.replace(ns_cnt, "[SCRIPTMODCOLLADACONT]", bpymodstring)
373 # do scripts\bpydata
374 bpydatalist = []
375 bpydatapath = "%s%s" % (inst_dir, "\\.blender\\scripts\\bpydata")
376 bpydatadir = os.listdir(bpydatapath)
377 for bpydataitem in bpydatadir:
378 bpydatafile = "%s\\%s" % (bpydatapath, bpydataitem)
379 if os.path.isdir(bpydatafile) == 0:
380 bpydatalist.append("File %s" % bpydatafile)
381 bpydatastring = string.join(bpydatalist, "\n ")
382 bpydatastring += "\n\n"
383 ns_cnt = string.replace(ns_cnt, "[SCRIPTDATACONTS]", bpydatastring)
385 # do plugins\include
386 plugincludelist = []
387 plugincludepath = "%s%s" % (inst_dir, "\\plugins\\include")
388 plugincludedir = os.listdir(plugincludepath)
389 for plugincludeitem in plugincludedir:
390 plugincludefile = "%s\\%s" % (plugincludepath, plugincludeitem)
391 if os.path.isdir(plugincludefile) == 0:
392 if plugincludefile.find('.h') or plugincludefile.find('.DEF'):
393 plugincludelist.append("File %s" % plugincludefile)
394 plugincludestring = string.join(plugincludelist, "\n ")
395 plugincludestring += "\n\n"
396 ns_cnt = string.replace(ns_cnt, "[PLUGINCONTS]", plugincludestring)
398 # do scripts\bpydata\config
399 cfglist = []
400 cfgpath = "%s%s" % (inst_dir, "\\.blender\\scripts\\bpydata\\config")
401 cfgdir = os.listdir(cfgpath)
402 for cfgitem in cfgdir:
403 cfgfile = "%s\\%s" % (cfgpath, cfgitem)
404 if os.path.isdir(cfgfile) == 0:
405 cfglist.append("File %s" % cfgfile)
406 cfgstring = string.join(cfglist, "\n ")
407 cfgstring += "\n\n"
408 ns_cnt = string.replace(ns_cnt, "[SCRIPTDATACFGCONTS]", cfgstring)
410 # do dotblender
411 dotblendlist = []
412 dotblenddir = os.listdir(inst_dir+"\\.blender")
413 for dotblenditem in dotblenddir:
414 if os.path.isdir(inst_dir + "\\.blender\\" + dotblenditem) == 0:
415 dotblendlist.append("File " + inst_dir + "\\.blender\\" + dotblenditem)
416 dotblendstring = string.join(dotblendlist, "\n ")
417 dotblendstring += "\n\n"
418 ns_cnt = string.replace(ns_cnt, "[DOTBLENDERCONTS]", dotblendstring)
420 # do language files
421 langlist = []
422 langfiles = []
423 langdir = os.listdir(inst_dir + "\\.blender\\locale")
424 for langitem in langdir:
425 if os.path.isdir(inst_dir + "\\.blender\\locale\\" + langitem) == 1:
426 langfiles.append("SetOutPath $BLENDERHOME\\.blender\\locale\\" + langitem + "\\LC_MESSAGES")
427 langfiles.append("File " + inst_dir + "\\.blender\\locale\\" + langitem + "\\LC_MESSAGES\\blender.mo")
428 langstring = string.join(langfiles, "\n ")
429 langstring += "\n\n"
430 ns_cnt = string.replace(ns_cnt, "[LANGUAGECONTS]", langstring)
432 # var replacements
433 ns_cnt = string.replace(ns_cnt, "DISTDIR", inst_dir+"\\")
434 ns_cnt = string.replace(ns_cnt, "SHORTVER", shortver)
435 ns_cnt = string.replace(ns_cnt, "VERSION", version)
437 new_nsis = open("00.blender_tmp.nsi", 'w')
438 new_nsis.write(ns_cnt)
439 new_nsis.close()
441 sys.stdout = os.popen("makensis 00.blender_tmp.nsi", 'w')
443 nsis_build = None
444 if 'nsis' in B.targets:
445 NSIS_Installer()
446 Exit()
448 # We do a shortcut for clean when no quicklist is given: just delete
449 # builddir without reading in SConscripts
450 do_clean = None
451 if 'clean' in B.targets:
452 do_clean = True
454 if not quickie and do_clean:
455 print B.bc.HEADER+'Cleaning...'+B.bc.ENDC
456 dirs = os.listdir(B.root_build_dir)
457 for dir in dirs:
458 if os.path.isdir(B.root_build_dir + dir) == 1:
459 print "clean dir %s"%(B.root_build_dir+dir)
460 shutil.rmtree(B.root_build_dir+dir)
461 print B.bc.OKGREEN+'...done'+B.bc.ENDC
462 Exit()
464 if not os.path.isdir ( B.root_build_dir):
465 os.makedirs ( B.root_build_dir )
466 os.makedirs ( B.root_build_dir + 'source' )
467 os.makedirs ( B.root_build_dir + 'intern' )
468 os.makedirs ( B.root_build_dir + 'extern' )
469 os.makedirs ( B.root_build_dir + 'lib' )
470 os.makedirs ( B.root_build_dir + 'bin' )
472 Help(opts.GenerateHelpText(env))
474 # default is new quieter output, but if you need to see the
475 # commands, do 'scons BF_QUIET=0'
476 bf_quietoutput = B.arguments.get('BF_QUIET', '1')
477 if bf_quietoutput=='1':
478 B.set_quiet_output(env)
479 else:
480 if toolset=='msvc':
481 B.msvc_hack(env)
483 print B.bc.HEADER+'Building in '+B.bc.ENDC+B.root_build_dir
484 env.SConsignFile(B.root_build_dir+'scons-signatures')
485 B.init_lib_dict()
487 ##### END SETUP ##########
489 Export('env')
490 #Export('root_build_dir') # this one is still needed for makesdna
491 ##TODO: improve makesdna usage
493 BuildDir(B.root_build_dir+'/intern', 'intern', duplicate=0)
494 SConscript(B.root_build_dir+'/intern/SConscript')
495 BuildDir(B.root_build_dir+'/extern', 'extern', duplicate=0)
496 SConscript(B.root_build_dir+'/extern/SConscript')
497 BuildDir(B.root_build_dir+'/source', 'source', duplicate=0)
498 SConscript(B.root_build_dir+'/source/SConscript')
500 # now that we have read all SConscripts, we know what
501 # libraries will be built. Create list of
502 # libraries to give as objects to linking phase
503 mainlist = []
504 for tp in B.possible_types:
505 if not tp == 'player' and not tp == 'player2':
506 mainlist += B.create_blender_liblist(env, tp)
508 if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
509 B.propose_priorities()
511 dobj = B.buildinfo(env, "dynamic") + B.resources
512 thestatlibs, thelibincs = B.setup_staticlibs(env)
513 thesyslibs = B.setup_syslibs(env)
515 env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
516 if env['WITH_BF_PLAYER']:
517 playerlist = B.create_blender_liblist(env, 'player')
518 env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
520 ##### Now define some targets
523 #------------ INSTALL
525 #-- binaries
526 blenderinstall = []
527 if env['OURPLATFORM']=='darwin':
528 for prg in B.program_list:
529 bundle = '%s.app' % prg[0]
530 bundledir = os.path.dirname(bundle)
531 for dp, dn, df in os.walk(bundle):
532 if 'CVS' in dn:
533 dn.remove('CVS')
534 if '.svn' in dn:
535 dn.remove('.svn')
536 dir=env['BF_INSTALLDIR']+dp[len(bundledir):]
537 source=[dp+os.sep+f for f in df]
538 blenderinstall.append(env.Install(dir=dir,source=source))
539 else:
540 blenderinstall = env.Install(dir=env['BF_INSTALLDIR'], source=B.program_list)
542 #-- .blender
543 dotblendlist = []
544 dottargetlist = []
545 for dp, dn, df in os.walk('bin/.blender'):
546 if 'CVS' in dn:
547 dn.remove('CVS')
548 if '.svn' in dn:
549 dn.remove('.svn')
550 for f in df:
551 dotblendlist.append(dp+os.sep+f)
552 dottargetlist.append(env['BF_INSTALLDIR']+dp[3:]+os.sep+f)
554 dotblenderinstall = []
555 for targetdir,srcfile in zip(dottargetlist, dotblendlist):
556 td, tf = os.path.split(targetdir)
557 dotblenderinstall.append(env.Install(dir=td, source=srcfile))
559 #-- .blender/scripts
560 scriptinstall = []
561 scriptpath='release/scripts'
562 for dp, dn, df in os.walk(scriptpath):
563 if 'CVS' in dn:
564 dn.remove('CVS')
565 if '.svn' in dn:
566 dn.remove('.svn')
567 dir=env['BF_INSTALLDIR']+'/.blender/scripts'+dp[len(scriptpath):]
568 source=[dp+os.sep+f for f in df]
569 scriptinstall.append(env.Install(dir=dir,source=source))
571 #-- plugins
572 pluglist = []
573 plugtargetlist = []
574 for tp, tn, tf in os.walk('release/plugins'):
575 if 'CVS' in tn:
576 tn.remove('CVS')
577 if '.svn' in tn:
578 tn.remove('.svn')
579 for f in tf:
580 pluglist.append(tp+os.sep+f)
581 plugtargetlist.append(env['BF_INSTALLDIR']+tp[7:]+os.sep+f)
583 plugininstall = []
584 for targetdir,srcfile in zip(plugtargetlist, pluglist):
585 td, tf = os.path.split(targetdir)
586 plugininstall.append(env.Install(dir=td, source=srcfile))
588 textlist = []
589 texttargetlist = []
590 for tp, tn, tf in os.walk('release/text'):
591 if 'CVS' in tn:
592 tn.remove('CVS')
593 if '.svn' in tn:
594 tn.remove('.svn')
595 for f in tf:
596 textlist.append(tp+os.sep+f)
598 textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist)
600 allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
602 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
603 dllsources = ['${LCGDIR}/gettext/lib/gnu_gettext.dll',
604 '${LCGDIR}/png/lib/libpng.dll',
605 '#release/windows/extra/python25.zip',
606 # '#release/windows/extra/zlib.pyd',
607 '${LCGDIR}/sdl/lib/SDL.dll',
608 '${LCGDIR}/zlib/lib/zlib.dll',
609 '${LCGDIR}/tiff/lib/libtiff.dll']
610 if env['BF_DEBUG']:
611 dllsources.append('${LCGDIR}/python/lib/${BF_PYTHON_LIB}.dll')
612 else:
613 dllsources.append('${LCGDIR}/python/lib/${BF_PYTHON_LIB}.dll')
614 if env['OURPLATFORM'] == 'win32-mingw':
615 dllsources += ['${LCGDIR}/pthreads/lib/pthreadGC2.dll']
616 else:
617 dllsources += ['${LCGDIR}/pthreads/lib/pthreadVC2.dll']
618 if env['WITH_BF_ICONV']:
619 dllsources += ['${LCGDIR}/iconv/lib/iconv.dll']
620 if env['WITH_BF_FFMPEG']:
621 dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-51.dll',
622 '${LCGDIR}/ffmpeg/lib/avformat-51.dll',
623 '${LCGDIR}/ffmpeg/lib/avutil-49.dll']
624 windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
625 allinstall += windlls
627 installtarget = env.Alias('install', allinstall)
628 bininstalltarget = env.Alias('install-bin', blenderinstall)
630 if env['WITH_BF_PLAYER']:
631 blenderplayer = env.Alias('blenderplayer', B.program_list)
632 Depends(blenderplayer,installtarget)
634 if not env['WITH_BF_GAMEENGINE']:
635 blendernogame = env.Alias('blendernogame', B.program_list)
636 Depends(blendernogame,installtarget)
638 Default(B.program_list)
640 if not env['WITHOUT_BF_INSTALL']:
641 Default(installtarget)
643 #------------ RELEASE
644 # TODO: zipup the installation
646 #------------ BLENDERPLAYER
647 # TODO: build stubs and link into blenderplayer
649 #------------ EPYDOC
650 # TODO: run epydoc