[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25997] trunk/blender/tools: Little fun feature for SCons users: set BF_LINE_OVERWRITE= True in your user-config.py or on command-line when BF_QUIET=True.

Nathan Letwory jesterking at letwory.net
Thu Jan 14 14:42:15 CET 2010


Revision: 25997
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25997
Author:   jesterking
Date:     2010-01-14 14:42:15 +0100 (Thu, 14 Jan 2010)

Log Message:
-----------
Little fun feature for SCons users: set BF_LINE_OVERWRITE=True in your user-config.py or on command-line when BF_QUIET=True. This will reuse the same line of the previous compile message (Compiling ==>...). Warnings and other messages will still go on their own lines. Remember to set BF_LINE_OVERWRITE=False when you are redirecting the build output to a file

Modified Paths:
--------------
    trunk/blender/tools/Blender.py
    trunk/blender/tools/btools.py

Modified: trunk/blender/tools/Blender.py
===================================================================
--- trunk/blender/tools/Blender.py	2010-01-14 12:51:17 UTC (rev 25996)
+++ trunk/blender/tools/Blender.py	2010-01-14 13:42:15 UTC (rev 25997)
@@ -268,6 +268,12 @@
 
 ##### ACTION STUFF #############
 
+def my_print_cmd_line(self, s, target, source, env):
+	sys.stdout.write(' ' * 70 + '\r')
+	sys.stdout.flush()
+	sys.stdout.write(s + "\r")
+	sys.stdout.flush()
+
 def my_compile_print(target, source, env):
 	a = '%s' % (source[0])
 	d, f = os.path.split(a)
@@ -330,6 +336,8 @@
 	env['BUILDERS']['StaticLibrary'] = static_lib
 	env['BUILDERS']['Library'] = static_lib
 	env['BUILDERS']['Program'] = program
+	if env['BF_LINE_OVERWRITE']:
+		SCons.Action._ActionAction.print_cmd_line = my_print_cmd_line
 
 	
 class CompZipFile(zipfile.ZipFile):

Modified: trunk/blender/tools/btools.py
===================================================================
--- trunk/blender/tools/btools.py	2010-01-14 12:51:17 UTC (rev 25996)
+++ trunk/blender/tools/btools.py	2010-01-14 13:42:15 UTC (rev 25997)
@@ -66,7 +66,7 @@
             'WITH_BF_OPENMP',
             'WITH_GHOST_COCOA',
             'USE_QTKIT',
-            'BF_FANCY', 'BF_QUIET',
+            'BF_FANCY', 'BF_QUIET', 'BF_LINE_OVERWRITE',
             'BF_X264_CONFIG',
             'BF_XVIDCORE_CONFIG',
             'WITH_BF_LCMS', 'BF_LCMS_LIB',
@@ -97,7 +97,7 @@
     
     arg_list = ['BF_DEBUG', 'BF_QUIET', 'BF_CROSS', 'BF_UPDATE',
             'BF_INSTALLDIR', 'BF_TOOLSET', 'BF_BINNAME',
-            'BF_BUILDDIR', 'BF_FANCY', 'BF_QUICK', 'BF_PROFILE',
+            'BF_BUILDDIR', 'BF_FANCY', 'BF_QUICK', 'BF_PROFILE', 'BF_LINE_OVERWRITE',
             'BF_BSC', 'BF_CONFIG',
             'BF_PRIORITYLIST', 'BF_BUILDINFO','CC', 'CXX', 'BF_QUICKDEBUG',
             'BF_LISTDEBUG', 'LCGDIR', 'BF_X264_CONFIG', 'BF_XVIDCORE_CONFIG',
@@ -403,6 +403,7 @@
         (BoolVariable('WITHOUT_BF_PYTHON_INSTALL', 'dont install Python modules if true', False)),
         (BoolVariable('BF_FANCY', 'Enable fancy output if true', True)),
         (BoolVariable('BF_QUIET', 'Enable silent output if true', True)),
+        (BoolVariable('BF_LINE_OVERWRITE', 'Enable overwriting of compile line in BF_QUIET mode if true', False)),
         (BoolVariable('WITH_BF_BINRELOC', 'Enable relocatable binary (linux only)', False)),
         
         (BoolVariable('WITH_BF_LZO', 'Enable fast LZO pointcache compression', True)),





More information about the Bf-blender-cvs mailing list