1
0
mirror of https://github.com/godotengine/godot synced 2024-07-05 16:03:36 +00:00

Use BoolVariable for module options.

This commit is contained in:
Elliott Sales de Andrade 2017-09-25 00:27:32 -04:00
parent 45a9a680a3
commit 5be675eb03
7 changed files with 9 additions and 9 deletions

View File

@ -189,7 +189,7 @@ for k in platform_opts.keys():
opts.Add(o)
for x in module_list:
opts.Add('module_' + x + '_enabled', "Enable module '" + x + "' (yes/no)", "yes")
opts.Add(BoolVariable('module_' + x + '_enabled', "Enable module '%s'" % (x, ), True))
opts.Update(env_base) # update environment
Help(opts.GenerateHelpText(env_base)) # generate help
@ -359,7 +359,7 @@ if selected_platform in platform_list:
env.doc_class_path={}
for x in module_list:
if env['module_' + x + '_enabled'] != "yes":
if not env['module_' + x + '_enabled']:
continue
tmppath = "./modules/" + x
sys.path.append(tmppath)

View File

@ -7,5 +7,5 @@ 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"] = "no"
env['module_etc_enabled'] = False
env.disabled_modules.append("etc")

View File

@ -7,5 +7,5 @@ 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"] = "no"
env['module_squish_enabled'] = False
env.disabled_modules.append("squish")

View File

@ -7,5 +7,5 @@ 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"] = "no"
env['module_tinyexr_enabled'] = False
env.disabled_modules.append("tinyexr")

View File

@ -244,7 +244,7 @@ def configure(env):
env.Append(LIBS=['OpenSLES', 'EGL', 'GLESv3', 'android', 'log', 'z', 'dl'])
# TODO: Move that to opus module's config
if("module_opus_enabled" in env and env["module_opus_enabled"] != "no"):
if 'module_opus_enabled' in env and env['module_opus_enabled']:
if (env["android_arch"] == "armv6" or env["android_arch"] == "armv7"):
env.Append(CFLAGS=["-DOPUS_ARM_OPT"])
env.opus_fixed_point = "yes"

View File

@ -151,7 +151,7 @@ def configure(env):
env.Append(CPPFLAGS=['-DIPHONE_ENABLED', '-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DMPC_FIXED_POINT'])
# TODO: Move that to opus module's config
if("module_opus_enabled" in env and env["module_opus_enabled"] != "no"):
if 'module_opus_enabled' in env and env['module_opus_enabled']:
env.opus_fixed_point = "yes"
if (env["arch"] == "arm"):
env.Append(CFLAGS=["-DOPUS_ARM_OPT"])

View File

@ -28,7 +28,7 @@ def get_flags():
return [
('tools', False),
('module_theora_enabled', 'no'),
('module_theora_enabled', False),
]
@ -116,5 +116,5 @@ def configure(env):
env.Append(LINKFLAGS=['--memory-init-file', '1'])
# TODO: Move that to opus module's config
if("module_opus_enabled" in env and env["module_opus_enabled"] != "no"):
if 'module_opus_enabled' in env and env['module_opus_enabled']:
env.opus_fixed_point = "yes"