scons - Added option to not remove and unpack python modules bundle every

compile
This commit is contained in:
Joshua Leung
2012-05-23 03:49:42 +00:00
parent c319d999ef
commit 795edb74fa
2 changed files with 9 additions and 3 deletions

View File

@@ -869,12 +869,17 @@ class BlenderEnvironment(SConsEnvironment):
lenv.AddPostAction(prog,Action(AppIt,strfunction=my_appit_print)) lenv.AddPostAction(prog,Action(AppIt,strfunction=my_appit_print))
elif os.sep == '/' and lenv['OURPLATFORM'] != 'linuxcross': # any unix (except cross-compilation) elif os.sep == '/' and lenv['OURPLATFORM'] != 'linuxcross': # any unix (except cross-compilation)
if lenv['WITH_BF_PYTHON']: if lenv['WITH_BF_PYTHON']:
if not lenv['WITHOUT_BF_INSTALL'] and not lenv['WITHOUT_BF_PYTHON_INSTALL'] and not BlenderEnvironment.PyBundleActionAdded: if (not lenv['WITHOUT_BF_INSTALL'] and
not lenv['WITHOUT_BF_PYTHON_INSTALL'] and
not lenv['WITHOUT_BF_PYTHON_UNPACK'] and
not BlenderEnvironment.PyBundleActionAdded):
lenv.AddPostAction(prog,Action(UnixPyBundle,strfunction=my_unixpybundle_print)) lenv.AddPostAction(prog,Action(UnixPyBundle,strfunction=my_unixpybundle_print))
BlenderEnvironment.PyBundleActionAdded = True BlenderEnvironment.PyBundleActionAdded = True
elif lenv['OURPLATFORM'].startswith('win') or lenv['OURPLATFORM'] == 'linuxcross': # windows or cross-compilation elif lenv['OURPLATFORM'].startswith('win') or lenv['OURPLATFORM'] == 'linuxcross': # windows or cross-compilation
if lenv['WITH_BF_PYTHON']: if lenv['WITH_BF_PYTHON']:
if not lenv['WITHOUT_BF_PYTHON_INSTALL'] and not BlenderEnvironment.PyBundleActionAdded: if (not lenv['WITHOUT_BF_PYTHON_INSTALL'] and
not lenv['WITHOUT_BF_PYTHON_UNPACK'] and
not BlenderEnvironment.PyBundleActionAdded):
lenv.AddPostAction(prog,Action(WinPyBundle,strfunction=my_winpybundle_print)) lenv.AddPostAction(prog,Action(WinPyBundle,strfunction=my_winpybundle_print))
BlenderEnvironment.PyBundleActionAdded = True BlenderEnvironment.PyBundleActionAdded = True
return prog return prog

View File

@@ -134,7 +134,7 @@ def validate_arguments(args, bc):
'BF_CXX', 'WITH_BF_STATICCXX', 'BF_CXX_LIB_STATIC', 'BF_CXX', 'WITH_BF_STATICCXX', 'BF_CXX_LIB_STATIC',
'BF_TWEAK_MODE', 'BF_SPLIT_SRC', 'BF_TWEAK_MODE', 'BF_SPLIT_SRC',
'WITHOUT_BF_INSTALL', 'WITHOUT_BF_INSTALL',
'WITHOUT_BF_PYTHON_INSTALL', 'WITHOUT_BF_PYTHON_INSTALL', 'WITHOUT_BF_PYTHON_UNPACK',
'WITHOUT_BF_OVERWRITE_INSTALL', 'WITHOUT_BF_OVERWRITE_INSTALL',
'WITH_BF_OPENMP', 'BF_OPENMP', 'BF_OPENMP_LIBPATH', 'WITH_BF_OPENMP', 'BF_OPENMP', 'BF_OPENMP_LIBPATH',
'WITH_GHOST_COCOA', 'WITH_GHOST_COCOA',
@@ -519,6 +519,7 @@ def read_opts(env, cfg, args):
(BoolVariable('BF_SPLIT_SRC', 'Split src lib into several chunks if true', False)), (BoolVariable('BF_SPLIT_SRC', 'Split src lib into several chunks if true', False)),
(BoolVariable('WITHOUT_BF_INSTALL', 'dont install if true', False)), (BoolVariable('WITHOUT_BF_INSTALL', 'dont install if true', False)),
(BoolVariable('WITHOUT_BF_PYTHON_INSTALL', 'dont install Python modules if true', False)), (BoolVariable('WITHOUT_BF_PYTHON_INSTALL', 'dont install Python modules if true', False)),
(BoolVariable('WITHOUT_BF_PYTHON_UNPACK', 'dont remove and unpack Python modules everytime if true', False)),
(BoolVariable('WITHOUT_BF_OVERWRITE_INSTALL', 'dont remove existing files before breating the new install directory (set to False when making packages for others)', False)), (BoolVariable('WITHOUT_BF_OVERWRITE_INSTALL', 'dont remove existing files before breating the new install directory (set to False when making packages for others)', False)),
(BoolVariable('BF_FANCY', 'Enable fancy output if true', True)), (BoolVariable('BF_FANCY', 'Enable fancy output if true', True)),
(BoolVariable('BF_QUIET', 'Enable silent output if true', True)), (BoolVariable('BF_QUIET', 'Enable silent output if true', True)),