diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2009-06-12 19:37:23 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2009-06-12 19:37:23 +0400 |
commit | dee188df166ed4f5eb5c4bb72793afd5e81142a4 (patch) | |
tree | 9484b73ee815d720cbf3b6da53a43247ba16c3c1 /tools/Blender.py | |
parent | 1c2ce9535caa7ef0ed70aea5bd25c0f281322cf6 (diff) |
=== SCons ===
* make the nsis installer script automatically use the Python version we build against
* bump Python version used
Diffstat (limited to 'tools/Blender.py')
-rw-r--r-- | tools/Blender.py | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tools/Blender.py b/tools/Blender.py index 7f9df068754..58e106b0a73 100644 --- a/tools/Blender.py +++ b/tools/Blender.py @@ -50,6 +50,7 @@ blenderdeps = [] # don't manipulate this one outside this module! possible_types = ['core'] # can be set in ie. SConstruct libs = {} +vcp = [] def getresources(): return resources @@ -402,7 +403,8 @@ class BlenderEnvironment(SConsEnvironment): SConsEnvironment.Default(self, res) resources.append(res) - def BlenderLib(self=None, libname=None, sources=None, includes=[], defines=[], libtype='common', priority = 100, compileflags=None, cc_compileflags=None, cxx_compileflags=None): + def BlenderLib(self=None, libname=None, sources=None, includes=[], defines=[], libtype='common', priority = 100, compileflags=None, cc_compileflags=None, cxx_compileflags=None): + global vcp if not self or not libname or not sources: print bc.FAIL+'Cannot continue. Missing argument for BuildBlenderLib '+libname+bc.ENDC self.Exit() @@ -448,12 +450,24 @@ class BlenderEnvironment(SConsEnvironment): targetdir = '#'+targetdir lib = lenv.Library(target= targetdir, source=sources) SConsEnvironment.Default(self, lib) # we add to default target, because this way we get some kind of progress info during build + if self['BF_MSVS'] and self['OURPLATFORM'] in ('win32-vc', 'win64-vc'): + #if targetdir[0] == '#': + # targetdir = targetdir[1:-1] + print "! ",targetdir+ '.vcproj' # + self['MSVSPROJECTSUFFIX'] + vcproject = self.MSVSProject(target = targetdir + '.vcproj', # + self['MSVSPROJECTSUFFIX'], + srcs = sources, + buildtarget = lib, + variant = 'Release', + auto_build_solution=0) + vcp.append(vcproject) + SConsEnvironment.Default(self, vcproject) else: print bc.WARNING+'Not building '+bc.ENDC+bc.OKGREEN+libname+bc.ENDC+' for '+bc.OKBLUE+'BF_QUICK'+bc.ENDC # note: libs is a global add_lib_to_dict(self, libs, libtype, libname, priority) def BlenderProg(self=None, builddir=None, progname=None, sources=None, includes=None, libs=None, libpath=None, binarykind=''): + global vcp print bc.HEADER+'Configuring program '+bc.ENDC+bc.OKGREEN+progname+bc.ENDC lenv = self.Clone() if lenv['OURPLATFORM'] in ['win32-vc', 'cygwin']: @@ -491,6 +505,12 @@ class BlenderEnvironment(SConsEnvironment): brs = lenv.Command(f, prog, [bsc]) SConsEnvironment.Default(self, brs) SConsEnvironment.Default(self, prog) + if self['BF_MSVS'] and self['OURPLATFORM'] in ('win32-vc', 'win64-vc') and progname == 'blender': + print "! ",builddir + "/" + progname + '.sln' + sln = self.MSVSProject(target = builddir + "/" + progname + '.sln', + projects= vcp, + variant = 'Release') + SConsEnvironment.Default(self, sln) program_list.append(prog) if lenv['OURPLATFORM']=='darwin': lenv['BINARYKIND'] = binarykind |