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

How to prevent the plugin being loaded at runtime/by the game? #174

Closed
h0lley opened this issue Mar 28, 2023 · 5 comments
Closed

How to prevent the plugin being loaded at runtime/by the game? #174

h0lley opened this issue Mar 28, 2023 · 5 comments

Comments

@h0lley
Copy link

h0lley commented Mar 28, 2023

The plugin is intended purely for the editor, but it's still being loaded by the game and I haven't been able to prevent this.
it's even being attempted to be loaded in a release export with the addons directory removed from the resources to be exported, or in a web export, which of course makes no sense and results in error messages:

ERROR: Error loading GDExtension configuration file: res://addons/godot-git-plugin/git_plugin.gdextension
   at: load (core/extension/gdextension.cpp:509)
ERROR: Failed loading resource: res://addons/godot-git-plugin/git_plugin.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (core/io/resource_loader.cpp:222)
ERROR: Error loading extension: res://addons/godot-git-plugin/git_plugin.gdextension
   at: load_extensions (core/extension/gdextension_manager.cpp:120)

web export:

tmp_js_export.js:14008 USER ERROR: No GDExtension library found for current OS and architecture (web.wasm32) in configuration file: res://addons/godot-git-plugin/git_plugin.gdextension
onPrintError @ tmp_js_export.js:14008
tmp_js_export.js:14008    at: load (core/extension/gdextension.cpp:530)
onPrintError @ tmp_js_export.js:14008
tmp_js_export.js:14008 USER ERROR: Failed loading resource: res://addons/godot-git-plugin/git_plugin.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
onPrintError @ tmp_js_export.js:14008
tmp_js_export.js:14008    at: _load (core/io/resource_loader.cpp:223)
onPrintError @ tmp_js_export.js:14008
tmp_js_export.js:14008 USER ERROR: Error loading extension: res://addons/godot-git-plugin/git_plugin.gdextension
onPrintError @ tmp_js_export.js:14008
tmp_js_export.js:14008    at: load_extensions (core/extension/gdextension_manager.cpp:120)
@markeel
Copy link
Contributor

markeel commented Mar 29, 2023

I looked at this a little, I thought you could simply exclude the addon in the export template, but maybe something has changed in Godot 4. I see that (apparently non-fatal) error as well. Since I'm just starting to use the Git plugin, I don't know if it is the fault of the plugin or the fault of the export toolchain/template.

@clemens-tolboom
Copy link

clemens-tolboom commented Jun 7, 2023

I cannot exclude it from a HTML export having addons/* as exclusion

No suitable library found for GDExtension: res://addons/godot-git-plugin/git_plugin.gdextension. Possible feature flags for your platform: web, s3tc, wasm32, template, debug, template_debug

[edit]
I see export files in my export dir ... so guess the export continued.
[/edit]

@clemens-tolboom
Copy link

Testing the Web export gives

image

@markeel
Copy link
Contributor

markeel commented Jun 9, 2023

Here's the only workaround I know of.

  1. Use .gitignore to ignore addons/godot-git-plugin
  2. Commit all changes (but addons/godot-git-plugin will not be there)
  3. Clone repository into another directory.
  4. Do an export using the command line (https://docs.godotengine.org/en/stable/tutorials/editor/command_line_tutorial.html)
  5. This will produce an export without the plugin, and therefore without the error you are seeing.

Nasty but I've used that technique for Linux and Windows exports, so it should work for Web exports too.

@Calinou
Copy link
Member

Calinou commented Dec 15, 2023

Thanks for the report! Consolidating in #77.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants