Merge pull request #62996 from reduz/feature-build-profiles
This commit is contained in:
24
SConstruct
24
SConstruct
@ -195,7 +195,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("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("disable_classes", "Disable given classes (comma separated)", "")
|
||||
opts.Add("build_feature_profile", "Path to a file containing a feature build profile", "")
|
||||
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", True))
|
||||
opts.Add("system_certs_path", "Use this path as SSL certificates default for editor (for package maintainers)", "")
|
||||
@ -752,7 +752,27 @@ if selected_platform in platform_list:
|
||||
|
||||
if env["tools"]:
|
||||
env.Append(CPPDEFINES=["TOOLS_ENABLED"])
|
||||
methods.write_disabled_classes(env["disable_classes"].split(","))
|
||||
|
||||
disabled_classes = []
|
||||
|
||||
if env["build_feature_profile"] != "":
|
||||
print("Using build feature profile: " + env["build_feature_profile"])
|
||||
import json
|
||||
|
||||
try:
|
||||
ft = json.load(open(env["build_feature_profile"]))
|
||||
if "disabled_classes" in ft:
|
||||
disabled_classes = ft["disabled_classes"]
|
||||
if "disabled_build_options" in ft:
|
||||
dbo = ft["disabled_build_options"]
|
||||
for c in dbo:
|
||||
env[c] = dbo[c]
|
||||
except:
|
||||
print("Error opening feature build profile: " + env["build_feature_profile"])
|
||||
Exit(255)
|
||||
|
||||
methods.write_disabled_classes(disabled_classes)
|
||||
|
||||
if env["disable_3d"]:
|
||||
if env["tools"]:
|
||||
print(
|
||||
|
||||
Reference in New Issue
Block a user