Open AdriaandeJongh opened 8 months ago
I'm sorry if this is such a weak proposal in terms of technical implementation! I'm hoping people smarter than me and with more insight into the engine's inner workings – engine contributors as opposed to game developers / simple users like myself – read this and immediately know how to do this!
Seems like exporting without the library and then not using the extension is currently the way to go. It causes errors, because extension_list.cfg
is force-included in the PCK file, but they are harmless and don't crash even in release build.
AFAIK disabling extensions is already a planned feature, but there is no ETA for when it's implemented.
Seems like exporting without the library and then not using the extension is currently the way to go. It causes errors, because
extension_list.cfg
is force-included in the PCK file, but they are harmless and don't crash even in release build.
That is my experience indeed. It just feels incredibly dangerous / YOLO to release a game with startup errors like these.
AFAIK disabling extensions is already a planned feature, but there is no ETA for when it's implemented.
I couldn't find a PR / proposal for that disabling extensions functionality, but good to hear. I'd love to follow the progress on this.
I feel like exporting should only export the gdextension stuff if the .gdextension Resource file is included in the export
Was looking into this issue as well. I tried to point to different extension_list.cfg
file in EditorExportPlatform::get_forced_export_files
but it doesn't seem to work. AFAIK, I could see potential solution in:
extension_list.cfg
overrides in the Export Presets.GDExtension::get_extension_list_config_file
to point other files, so we can have multiple copies of extension_list.cfg
for different reasons.extension_list.cfg
to categorize what platforms can build what GDExtensions.All of these suggestions are based on my very very limited knowledge on the codebase so far. Would like to hear more from the devs.
Another real world application I would currently use this for: demos. I've got a game with multiplayer in its full version, shipping with the large WebRTC extension. The demo doesn't come with multiplayer enabled, so I'd much prefer to not to pointlessly include the WebRTC libraries with its exports.
So currently I would, for example, put assets/webrtc/*
in the exclude filters on the demo export and then manually delete the corresponding libraries from the exported files, right? And this will still print errors. Not ideal.
For those looking to exclude gdextensions (like the git plugin) during export, I've posted a working solution here: https://github.com/godotengine/godot-git-plugin/issues/77#issuecomment-2212343975
Using the export exclusion settings, and together with this fix, perhaps this issue can be closed?
I'm still getting errors after excluding extension.
Describe the project you are working on
A multi-platform game for multiple storefronts, requiring multiple storefront SDKs.
Describe the problem or limitation you are having in your project
I'm using the excellent GodotSteam GDExtension (link) to integrate Steamworks into my game on desktop platforms (Windows, macOS, Linux). However, I will also be releasing the game in other storefronts with their own SDKs (GoG, Itch) on those same platforms, as well as on iOS and Android, and it appears there is currently no way to properly exclude the GodotSteam GDExtension and the binaries that it puts in the export. This adds MBs to the export on every platform, regardless of whether I need those binaries on that platform and in that particular export. As I integrate more and more services and SDKs in my game, this is going to become a problem down the line.
Or perhaps there is a way, but both the creator of GodotSteam and I couldn't find a reliable way without silly hacks. Such hacks included:
When I initially thought I found a way, I asked the GodotSteam team to include it in their docs, but upon further investigation my method turned out to be unreliable. You can read through that process here: https://github.com/GodotSteam/GodotSteam-Docs/issues/42
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Ideally, I am able to tell Godot on an export level or through an export template to not include a certain GDExtension. That will mean that the GDExtension and all its binaries are not included for that particular export.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I truly don't know how this should work as I know nothing of the inner workings of plugins, GDExtensions, and exports. I presume the system of enabling / disabling plugins was precisely made for cases like this, but I can't speculate on why GodotSteam was made as a GDExtension as opposed to a plugin.
If this enhancement will not be used often, can it be worked around with a few lines of script?
If there is a workaround, I'd love to hear it.
Is there a reason why this should be core and not an add-on in the asset library?
I don't know.