forked from bartvdbraak/blender
* change BF_CONFIG so that it is understood as 'user-config.py' instead of config/platform-config.py it tried to do before. If defined, it overrides the search (and potential use) of user-config.py.
It didn't work before anyway, so this change should affect nobody. usage: scons BF_CONFIG=someconfigfile
This commit is contained in:
parent
ec02fff2aa
commit
1da7742b8a
11
SConstruct
11
SConstruct
@ -143,7 +143,7 @@ if crossbuild and platform!='win32':
|
||||
|
||||
env['OURPLATFORM'] = platform
|
||||
|
||||
configfile = B.arguments.get('BF_CONFIG', 'config'+os.sep+platform+'-config.py')
|
||||
configfile = 'config'+os.sep+platform+'-config.py'
|
||||
|
||||
if os.path.exists(configfile):
|
||||
print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile
|
||||
@ -157,13 +157,14 @@ if crossbuild and env['PLATFORM'] != 'win32':
|
||||
# Needed for gui programs, console programs should do without it
|
||||
env.Append(LINKFLAGS=['-mwindows'])
|
||||
|
||||
userconfig = B.arguments.get('BF_CONFIG', 'user-config.py')
|
||||
# first read platform config. B.arguments will override
|
||||
optfiles = [configfile]
|
||||
if os.path.exists('user-config.py'):
|
||||
print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + 'user-config.py'
|
||||
optfiles += ['user-config.py']
|
||||
if os.path.exists(userconfig):
|
||||
print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig
|
||||
optfiles += [userconfig]
|
||||
else:
|
||||
print B.bc.WARNING + 'user-config.py' + " not found, no user overrides" + B.bc.ENDC
|
||||
print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC
|
||||
|
||||
opts = btools.read_opts(optfiles, B.arguments)
|
||||
opts.Update(env)
|
||||
|
Loading…
Reference in New Issue
Block a user