Skip to content

[SCons] Add GDExtension method to scons. #901

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Faless
Copy link
Contributor

@Faless Faless commented Oct 26, 2022

Called like:

env.GDExtension("my_library_name", sources)

Optional parameters:

  • entry_symbol = "" ({name}_library_init if empty)
  • output_dir = "" (output extension folder, {name} if empty)
  • library_dir = "lib" (library subdir, relative to the output_dir)

Builds:

{output_dir}/
  {name}.gdextension
  {library_dir}/
    lib{name}.{platform-arch-library-suffix}

Draft:

  • Optional override for for .gdextension file (copy instead of generate).
  • Extension library auto detect feature in Godot (cc @groud )
  • Handle macos framework and their custom structure/Info.plist (auto-generate with optional override? Have it handled by godot platform exporter? cc @bruvzg )

Called like:

```
env.GDExtension("my_library_name", sources)
```

Optional parameters:

- `entry_symbol = ""` (`{name}_library_init` if empty)
- `output_dir = ""` (output extension folder, `{name}` if empty)
- `library_dir = "lib"` (library subdir, relative to the `output_dir`)

Builds:
```
{output_dir}/
  {name}.gdextension
  {library_dir}/
    lib{name}.{platform-arch-library-suffix}
```
@Faless Faless added enhancement This is an enhancement on the current functionality waiting for Godot This issue needs a Godot Engine improvement to be solved topic:buildsystem Related to the buildsystem or CI setup labels Oct 26, 2022
@Faless Faless added this to the 4.0 milestone Oct 26, 2022
@bruvzg
Copy link
Member

bruvzg commented Oct 26, 2022

Handle macos framework and their custom structure/Info.plist (auto-generate with optional override? Have it handled by godot platform exporter?

Exporter will copy the whole directory, without checking internal structure.

Info.plist needs only library file name (always same as framework name, but without extension), id (which should be overridable by user), and (optionally) readable name. See https://github.com/godotengine/godot/blob/2b505b74b9b0a7005586ecaa9aa1236e86b18437/modules/text_server_adv/gdextension_build/SConstruct#L650-L665

@aaronfranke aaronfranke modified the milestones: 4.0, 4.x Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an enhancement on the current functionality topic:buildsystem Related to the buildsystem or CI setup waiting for Godot This issue needs a Godot Engine improvement to be solved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants