SCons: Pass env to modules can_build method
This allows to disable modules based on the environment, in particular `env[tools]` which tells us if we are building the editor or not.
This commit is contained in:
parent
28fa82c2de
commit
3334209a73
33 changed files with 53 additions and 61 deletions
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
|
||||
def configure(env):
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
def can_build(platform):
|
||||
return True
|
||||
def can_build(env, platform):
|
||||
return env['tools']
|
||||
|
||||
def configure(env):
|
||||
# Tools only, disabled for non-tools
|
||||
# TODO: Find a cleaner way to achieve that
|
||||
if not env['tools']:
|
||||
env['module_etc_enabled'] = False
|
||||
env.disabled_modules.append("etc")
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
# should probably change this to only be true on iOS and Android
|
||||
return False
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ def find_file_in_dir(directory, files, prefix='', extension=''):
|
|||
return ''
|
||||
|
||||
|
||||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
if platform in ["javascript"]:
|
||||
return False # Not yet supported
|
||||
return True
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
def can_build(platform):
|
||||
return platform != "android"
|
||||
def can_build(env, platform):
|
||||
return env['tools']
|
||||
|
||||
def configure(env):
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
def can_build(platform):
|
||||
return True
|
||||
def can_build(env, platform):
|
||||
return env['tools']
|
||||
|
||||
def configure(env):
|
||||
# Tools only, disabled for non-tools
|
||||
# TODO: Find a cleaner way to achieve that
|
||||
if not env['tools']:
|
||||
env['module_squish_enabled'] = False
|
||||
env.disabled_modules.append("squish")
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
def can_build(platform):
|
||||
return platform != "android" and platform != "ios"
|
||||
def can_build(env, platform):
|
||||
return (env['tools'] and platform not in ["android", "ios"])
|
||||
|
||||
def configure(env):
|
||||
if not env['tools']:
|
||||
env['builtin_thekla_atlas'] = False
|
||||
env.disabled_modules.append("thekla_unwrap")
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
def can_build(platform):
|
||||
return True
|
||||
def can_build(env, platform):
|
||||
return env['tools']
|
||||
|
||||
def configure(env):
|
||||
# Tools only, disabled for non-tools
|
||||
# TODO: Find a cleaner way to achieve that
|
||||
if not env['tools']:
|
||||
env['module_tinyexr_enabled'] = False
|
||||
env.disabled_modules.append("tinyexr")
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
def can_build(platform):
|
||||
return platform != 'iphone'
|
||||
def can_build(env, platform):
|
||||
return platform not in ['iphone']
|
||||
|
||||
def configure(env):
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
|
||||
def can_build(platform):
|
||||
def can_build(env, platform):
|
||||
return True
|
||||
|
||||
|
||||
def configure(env):
|
||||
pass
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue