Add option modules_enabled_by_default
This commit is contained in:
parent
d3c492b7d4
commit
634ed3e128
|
@ -137,6 +137,7 @@ opts.Add("extra_suffix", "Custom extra suffix added to the base filename of all
|
||||||
opts.Add(BoolVariable("vsproj", "Generate a Visual Studio solution", False))
|
opts.Add(BoolVariable("vsproj", "Generate a Visual Studio solution", False))
|
||||||
opts.Add(BoolVariable("disable_3d", "Disable 3D nodes for a smaller executable", False))
|
opts.Add(BoolVariable("disable_3d", "Disable 3D nodes for a smaller executable", False))
|
||||||
opts.Add(BoolVariable("disable_advanced_gui", "Disable advanced GUI nodes and behaviors", False))
|
opts.Add(BoolVariable("disable_advanced_gui", "Disable advanced GUI nodes and behaviors", False))
|
||||||
|
opts.Add(BoolVariable("modules_enabled_by_default", "If no, disable all modules except ones explicitly enabled", True))
|
||||||
opts.Add(BoolVariable("no_editor_splash", "Don't use the custom splash screen for the editor", False))
|
opts.Add(BoolVariable("no_editor_splash", "Don't use the custom splash screen for the editor", False))
|
||||||
opts.Add("system_certs_path", "Use this path as SSL certificates default for editor (for package maintainers)", "")
|
opts.Add("system_certs_path", "Use this path as SSL certificates default for editor (for package maintainers)", "")
|
||||||
opts.Add(BoolVariable("use_precise_math_checks", "Math checks use very precise epsilon (debug option)", False))
|
opts.Add(BoolVariable("use_precise_math_checks", "Math checks use very precise epsilon (debug option)", False))
|
||||||
|
@ -259,7 +260,9 @@ for path in module_search_paths:
|
||||||
|
|
||||||
# Add module options.
|
# Add module options.
|
||||||
for name, path in modules_detected.items():
|
for name, path in modules_detected.items():
|
||||||
|
if env_base["modules_enabled_by_default"]:
|
||||||
enabled = True
|
enabled = True
|
||||||
|
|
||||||
sys.path.insert(0, path)
|
sys.path.insert(0, path)
|
||||||
import config
|
import config
|
||||||
|
|
||||||
|
@ -269,6 +272,9 @@ for name, path in modules_detected.items():
|
||||||
pass
|
pass
|
||||||
sys.path.remove(path)
|
sys.path.remove(path)
|
||||||
sys.modules.pop("config")
|
sys.modules.pop("config")
|
||||||
|
else:
|
||||||
|
enabled = False
|
||||||
|
|
||||||
opts.Add(BoolVariable("module_" + name + "_enabled", "Enable module '%s'" % (name,), enabled))
|
opts.Add(BoolVariable("module_" + name + "_enabled", "Enable module '%s'" % (name,), enabled))
|
||||||
|
|
||||||
methods.write_modules(modules_detected)
|
methods.write_modules(modules_detected)
|
||||||
|
|
|
@ -375,8 +375,8 @@ void Main::print_help(const char *p_binary) {
|
||||||
#ifdef TESTS_ENABLED
|
#ifdef TESTS_ENABLED
|
||||||
OS::get_singleton()->print(" --test [--help] Run unit tests. Use --test --help for more information.\n");
|
OS::get_singleton()->print(" --test [--help] Run unit tests. Use --test --help for more information.\n");
|
||||||
#endif
|
#endif
|
||||||
OS::get_singleton()->print("\n");
|
|
||||||
#endif
|
#endif
|
||||||
|
OS::get_singleton()->print("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TESTS_ENABLED
|
#ifdef TESTS_ENABLED
|
||||||
|
|
Loading…
Reference in New Issue