Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-06-13 15:09:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-06-13 15:09:13 +0400
commiteed13b43b19c619ccdcda67b17c0da65ad44879c (patch)
treeaa759322ad2b18becaf237671dd71ffbda9c2076 /tools
parente10e1ac04e63ed04a5712e515ed28eb92a78fd62 (diff)
parent2f1e118c30946bd3117c59cd45f13d79e4b612ec (diff)
merged from trunk 20741:20848
* Missing changes to release/windows/installer * Sequencer fixes in source/blender/src/seqaudio.c dont apply to 2.5 * brechts fix for #18855 r20763 wasnt merged, does this apply to 2.5?
Diffstat (limited to 'tools')
-rw-r--r--tools/Blender.py22
-rwxr-xr-xtools/btools.py8
2 files changed, 28 insertions, 2 deletions
diff --git a/tools/Blender.py b/tools/Blender.py
index bb82f9caa1d..164a9d097e6 100644
--- a/tools/Blender.py
+++ b/tools/Blender.py
@@ -51,6 +51,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
@@ -406,7 +407,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()
@@ -452,12 +454,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', 'win64-vc'):
@@ -495,6 +509,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
diff --git a/tools/btools.py b/tools/btools.py
index 7a71e1b678d..377a389941f 100755
--- a/tools/btools.py
+++ b/tools/btools.py
@@ -65,6 +65,7 @@ def validate_arguments(args, bc):
'WITH_BF_LCMS', 'BF_LCMS_LIB',
'WITH_BF_DOCS',
'BF_NUMJOBS',
+ 'BF_MSVS',
]
# Have options here that scons expects to be lists
@@ -363,7 +364,8 @@ def read_opts(cfg, args):
(BoolVariable('WITH_BF_DOCS', 'Generate API documentation', False)),
('BF_CONFIG', 'SCons python config file used to set default options', 'user_config.py'),
- ('BF_NUMJOBS', 'Number of build processes to spawn', '1')
+ ('BF_NUMJOBS', 'Number of build processes to spawn', '1'),
+ ('BF_MSVS', 'Generate MSVS project files and solution', False)
) # end of opts.AddOptions()
@@ -403,9 +405,13 @@ def NSIS_Installer(target=None, source=None, env=None):
ns = open("00.sconsblender.nsi","r")
+
ns_cnt = str(ns.read())
ns.close()
+ # set Python version we compile against
+ ns_cnt = string.replace(ns_cnt, "[PYTHON_VERSION]", env['BF_PYTHON_VERSION'])
+
# do root
rootlist = []
rootdir = os.listdir(inst_dir+"\\")