-
-
Notifications
You must be signed in to change notification settings - Fork 575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let gdextension_dir
function as standalone argument
#1258
Let gdextension_dir
function as standalone argument
#1258
Conversation
3a1fae9
to
30e6c43
Compare
Thank you for looking into this, I agree this is a needed change. I would prefer doing the following though: diff --git a/tools/godotcpp.py b/tools/godotcpp.py
index 69a4652..6b44272 100644
--- a/tools/godotcpp.py
+++ b/tools/godotcpp.py
@@ -284,8 +284,8 @@ def generate(env):
def _godot_cpp(env):
- api_file = normalize_path(env.get("custom_api_file", env.File("gdextension/extension_api.json").abspath), env)
extension_dir = normalize_path(env.get("gdextension_dir", env.Dir("gdextension").abspath), env)
+ api_file = normalize_path(env.get("custom_api_file", env.File(extension_dir + "/extension_api.json").abspath), env)
bindings = env.GodotCPPBindings(
env.Dir("."),
[ |
This comment was marked as off-topic.
This comment was marked as off-topic.
I think this also needs to be rebased on the latest |
@Faless That'd certainly be simpler! I'll have double-check and see if that will work as expected, as I recall this variable being particularly finicky for some reason EDIT: Everything seems to work! |
30e6c43
to
5e53b7a
Compare
5e53b7a
to
7a5cbca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Cherry-picked for 4.1 in PR #1281 |
Right now, if you have a custom build of Godot to build against, you have to redundantly provide arguments for both a
gdextension_dir
andcustom_api_file
. This changes it so that, if onlygdextension_dir
is provided, it will implicitly setup a path forcustom_api_file
using the default name