-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Plugin is included in exported projects #77
Comments
This is currently a known issue with Godot's GDNative export process. Some GDNative plugins (mostly it seems to be just this plugin) seem to be exported even though they are explicitly added as You can track this issue and find some workarounds here: godotengine/godot#44213 |
Also, I will keep this issue open till this gets fixed so that this problem is still visible to newer people who encounter this issue |
Has this issue been fixed yet? Still having issues 2 years later |
As a workaround, I simply created a
@tool
extends EditorExportPlugin
const PATH_EXTENSION_DEF = "res://.godot/extension_list.cfg"
var extension_definition_buffer : String
func _export_begin(features: PackedStringArray, is_debug: bool, path: String, flags: int) -> void:
var file_extension_list := FileAccess.open(PATH_EXTENSION_DEF, FileAccess.READ)
var extensions : String = file_extension_list.get_as_text()
file_extension_list.close()
extension_definition_buffer = extensions
var lines : PackedStringArray = extensions.split("\n")
var extensions_without_git : String = ""
for line in lines:
if "git_plugin.gdextension" in line:
continue
extensions_without_git += line + "\n"
extensions_without_git = extensions_without_git.trim_suffix("\n")
file_extension_list = FileAccess.open(PATH_EXTENSION_DEF, FileAccess.WRITE)
file_extension_list.store_string(extensions_without_git)
file_extension_list.close()
func _export_file(path: String, type: String, features: PackedStringArray) -> void:
if "godot-git-plugin" in path:
skip()
func _export_end() -> void:
var file_extension_list := FileAccess.open(PATH_EXTENSION_DEF, FileAccess.WRITE)
file_extension_list.store_string(extension_definition_buffer)
file_extension_list.close()
func _get_name() -> String:
return "ZZ-git-export-plugin"
@tool
extends EditorPlugin
var export_plugin = preload("editor-export-plugin.gd").new()
func _enter_tree() -> void:
add_export_plugin(export_plugin)
func _exit_tree() -> void:
remove_export_plugin(export_plugin) Then I simply enabled the gdscript plugin -> ProjectSettings/Plugins/Godot\ Git\ Plugin. Edit: Both files are placed in Edit2: This might be solved now! @vedit s naive solution might now work, since @markeel s pr essentially generalized this at godot/master for all exports. It has just been merged! |
Workaround thanks to godotengine/godot-git-plugin#77 (comment)
I guess this just makes the export fail to find the plugin definition file and disable it on export. It's nice to have it as a workaround but probably not the best UX. Editor-only plugins are a clear use case so it's not really a per-export setting decided by the end user, nor is excluding the contents of a folder a good approach in terms of discoverability. |
The consequence of excluding the plugin is an error during startup of the exported project. |
After adding the plugin on windows, linux export start failing saying the templates where corrupted. Checking the error log it seems the editor was looking for the .so libraries for this plugin.
I guess I can workaround that by also adding those files to my project even if I'm not working on linux but I wouldn't want an increased pck size due to some plugin that's only used by the editor.
The text was updated successfully, but these errors were encountered: