mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-03 18:09:13 +03:00
Fix custom_api_file with SCons 4.0.1
This commit is contained in:
@@ -258,8 +258,7 @@ def options(opts, env):
|
|||||||
help="Path to a custom directory containing GDExtension interface header and API JSON file",
|
help="Path to a custom directory containing GDExtension interface header and API JSON file",
|
||||||
default=env.get("gdextension_dir", None),
|
default=env.get("gdextension_dir", None),
|
||||||
validator=validate_dir,
|
validator=validate_dir,
|
||||||
),
|
)
|
||||||
converter=normalize_path,
|
|
||||||
)
|
)
|
||||||
opts.Add(
|
opts.Add(
|
||||||
PathVariable(
|
PathVariable(
|
||||||
@@ -267,8 +266,7 @@ def options(opts, env):
|
|||||||
help="Path to a custom GDExtension API JSON file (takes precedence over `gdextension_dir`)",
|
help="Path to a custom GDExtension API JSON file (takes precedence over `gdextension_dir`)",
|
||||||
default=env.get("custom_api_file", None),
|
default=env.get("custom_api_file", None),
|
||||||
validator=validate_file,
|
validator=validate_file,
|
||||||
),
|
)
|
||||||
converter=normalize_path,
|
|
||||||
)
|
)
|
||||||
opts.Add(
|
opts.Add(
|
||||||
BoolVariable(
|
BoolVariable(
|
||||||
@@ -537,8 +535,10 @@ def generate(env):
|
|||||||
|
|
||||||
|
|
||||||
def _godot_cpp(env):
|
def _godot_cpp(env):
|
||||||
extension_dir = env.get("gdextension_dir", default=env.Dir("gdextension").srcnode().abspath)
|
extension_dir = normalize_path(env.get("gdextension_dir", default=env.Dir("gdextension").srcnode().abspath), env)
|
||||||
api_file = env.get("custom_api_file", default=os.path.join(extension_dir, "extension_api.json"))
|
api_file = normalize_path(
|
||||||
|
env.get("custom_api_file", default=os.path.join(extension_dir, "extension_api.json")), env
|
||||||
|
)
|
||||||
|
|
||||||
bindings = env.GodotCPPBindings(
|
bindings = env.GodotCPPBindings(
|
||||||
env.Dir("."),
|
env.Dir("."),
|
||||||
|
|||||||
Reference in New Issue
Block a user