Skip to content
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

Add dependency section to gdextension file docs #9569

Merged

Conversation

paddy-exe
Copy link
Contributor

Continuation of #9383
Fixes #9462

also removes a double word

@paddy-exe paddy-exe added enhancement area:manual Issues and PRs related to the Manual/Tutorials section of the documentation cherrypick:4.0 cherrypick:4.1 cherrypick:4.2 labels Jul 1, 2024
@paddy-exe paddy-exe requested a review from dsnopek July 1, 2024 17:22
@mhilbrunner mhilbrunner merged commit ea6b9da into godotengine:master Jul 2, 2024
1 check passed
@mhilbrunner
Copy link
Member

Merged! Feedback by @dsnopek still appreciated, saw the review request too late, oops.

@paddy-exe
Copy link
Contributor Author

@mhilbrunner No worries. I can patch it up very quickly if there is any feedback 👍🏻

@dsnopek
Copy link
Contributor

dsnopek commented Jul 2, 2024

This looks good to me!

The only note that I would add, is that the most common way to use [dependencies] is with a path of "", which means to copy the dependency into the same folder as the Godot executable, and so it'd be good to have an example of that, ie:

windows.debug = {
    "res://bin/libdependency.windows.template_debug.x86_64.dll" : "",
    "res://bin/libdependency.windows.template_debug.x86_32.dll" : ""
}

On MacOS, I think using the path "Contents/Resources" or "Content/Frameworks/" is common, but I'm not 100% sure about those.

In any case, I think we should try to include some paths that are actually used in the wild, in order to help folks figure out how to use this.

@paddy-exe paddy-exe deleted the dependencies-gdextension-file branch July 2, 2024 17:30
@YuriSizov
Copy link
Contributor

YuriSizov commented Jul 15, 2024

Hey, @paddy-exe and @dsnopek! Am I missing something about these dependencies? When I looked into Godot codebase, I only saw OS_Android using this data. GDExtension::open_library takes the info and extracts paths from it, puts it into OS::GDExtensionData::library_dependencies, and then library_dependencies is only accessed in OS_Android::open_dynamic_library.

If this is only implemented on Android, then this must be reflected in the documentation in two ways: an explicit note and all examples for other platforms must be removed. Or am I missing some indirect use?

PS. Well, export plugins system also extracts this information for its own use via GDExtension::find_extension_dependencies, but that doesn't seem to be related to loading GDExtension libraries.

PPS. Or is that it, the export part is what handles most other platforms and that's sufficient? Sorry if this is a dumb question.

@paddy-exe
Copy link
Contributor Author

@YuriSizov I haven't looked at the implementation for specific platforms but I assure you I have tested it both on Linux and even more extensively on Mac to make sure it works. I am not aware if there are more specific requirements for loading on mobile platforms though.

@mhilbrunner
Copy link
Member

Cherry-picked to 4.2 in #9648.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation cherrypick:4.0 cherrypick:4.1 enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a sample of GDExtention's dependencies syntax
4 participants