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:
authorNathan Letwory <nathan@letworyinteractive.com>2006-10-19 16:35:39 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2006-10-19 16:35:39 +0400
commitd1066fc266aeade4b2380db6b0e0ca49a5a12b7b (patch)
tree12c54bfd2e5db78ec88e039de875e66ac184c631 /tools
parentba4f678b5c630cd41ccc28898748a25e0e868783 (diff)
==SCons==
* Source Browser support. When BF_DEBUG=1 .bsc-files will be created in BF_BUILDDIR. .pdb-files are in the root source dir
Diffstat (limited to 'tools')
-rw-r--r--tools/Blender.py33
1 files changed, 30 insertions, 3 deletions
diff --git a/tools/Blender.py b/tools/Blender.py
index 4f7fd2ebcdc..4e8ac0f5bf2 100644
--- a/tools/Blender.py
+++ b/tools/Blender.py
@@ -291,8 +291,8 @@ def AppIt(target=None, source=None, env=None):
binary = env['BINARYKIND']
if b=='verse':
- print bc.OKBLUE+"no bundle for verse"+bc.ENDC
- return 0
+ print bc.OKBLUE+"no bundle for verse"+bc.ENDC
+ return 0
sourcedir = bldroot + '/source/darwin/%s.app'%binary
@@ -330,6 +330,27 @@ def AppIt(target=None, source=None, env=None):
#### END ACTION STUFF #########
+def bsc(env, target, source):
+
+ bd = os.path.dirname(target[0].abspath)
+ bscfile = '\"'+target[0].abspath+'\"'
+ bscpathcollect = '\"'+bd + os.sep + '*.sbr\"'
+ bscpathtmp = '\"'+bd + os.sep + 'bscmake.tmp\"'
+
+ os.system('dir /b/s '+bscpathcollect+' >'+bscpathtmp)
+
+ myfile = open(bscpathtmp[1:-1], 'r')
+ lines = myfile.readlines()
+ myfile.close()
+
+ newfile = open(bscpathtmp[1:-1], 'w')
+ for l in lines:
+ newfile.write('\"'+l[:-1]+'\"\n')
+ newfile.close()
+
+ os.system('bscmake /nologo /n /o'+bscfile+' @'+bscpathtmp)
+ os.system('del '+bscpathtmp)
+
class BlenderEnvironment(SConsEnvironment):
def BlenderRes(self=None, libname=None, source=None, libtype=['core'], priority=[100]):
@@ -339,7 +360,7 @@ class BlenderEnvironment(SConsEnvironment):
Exit()
if self['OURPLATFORM'] not in ('win32-vc','win32-mingw','linuxcross'):
print bc.FAIL+'BlenderRes is for windows only!'+bc.END
- Exit()
+ self.Exit()
print bc.HEADER+'Configuring resource '+bc.ENDC+bc.OKGREEN+libname+bc.ENDC
lenv = self.Copy()
@@ -385,6 +406,8 @@ class BlenderEnvironment(SConsEnvironment):
lenv = self.Copy()
if lenv['OURPLATFORM'] in ['win32-vc', 'cygwin']:
lenv.Append(LINKFLAGS = Split(lenv['PLATFORM_LINKFLAGS']))
+ if lenv['BF_DEBUG']:
+ lenv.Prepend(LINKFLAGS = ['/DEBUG','/PDB:'+progname+'.pdb'])
if lenv['OURPLATFORM']=='linux2':
lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS'])
@@ -404,6 +427,10 @@ class BlenderEnvironment(SConsEnvironment):
lenv.Append(LIBS = lenv['BF_QUICKTIME_LIB'])
lenv.Append(LIBPATH = lenv['BF_QUICKTIME_LIBPATH'])
prog = lenv.Program(target=builddir+'bin/'+progname, source=sources)
+ if lenv['BF_DEBUG'] and lenv['OURPLATFORM']=='win32-vc':
+ f = lenv.File(progname + '.bsc', builddir)
+ brs = lenv.Command(f, prog, [bsc])
+ SConsEnvironment.Default(self, brs)
SConsEnvironment.Default(self, prog)
program_list.append(prog)
if lenv['OURPLATFORM']=='darwin':