Add Text Server related options to the build profiles editor.

Adds SCons options to disable Brotli and Graphite.
Adds option categories to the build profiles editor.
Adds options default state to the build profiles editor.
Adds Text Server related options to the build profiles editor.
Fix misplaced OpenGL/Vulkan SCons options.
This commit is contained in:
bruvzg
2022-08-03 13:38:37 +03:00
parent 2c0c76c415
commit 066ca97690
8 changed files with 218 additions and 80 deletions

View File

@ -337,21 +337,27 @@ for path in module_search_paths:
# Add module options.
for name, path in modules_detected.items():
sys.path.insert(0, path)
import config
if env_base["modules_enabled_by_default"]:
enabled = True
sys.path.insert(0, path)
import config
try:
enabled = config.is_enabled()
except AttributeError:
pass
sys.path.remove(path)
sys.modules.pop("config")
else:
enabled = False
# Add module-specific options.
try:
for opt in config.get_opts(selected_platform):
opts.Add(opt)
except AttributeError:
pass
sys.path.remove(path)
sys.modules.pop("config")
opts.Add(BoolVariable("module_" + name + "_enabled", "Enable module '%s'" % (name,), enabled))
methods.write_modules(modules_detected)