From f32f5b0022629454e135e3dae3c88d5f2a022466 Mon Sep 17 00:00:00 2001 From: Fredia Huya-Kouadio Date: Sun, 26 Nov 2023 20:52:54 -0800 Subject: Fix the plugins packaging to address https://github.com/godotengine/godot/issues/85395 --- .../hello_gdextension/src/main/assets/.gitignore | 2 ++ .../hello_gdextension.gdextension | 11 -------- .../hello_gdextension_export_plugin.gd | 33 ---------------------- .../interface/android_icon.svg | 2 -- .../interface/hello_gdextension_plugin.gd | 26 ----------------- .../addons/hello_gdextension_plugin/plugin.cfg | 7 ----- 6 files changed, 2 insertions(+), 79 deletions(-) create mode 100644 plugins/hello_gdextension/src/main/assets/.gitignore delete mode 100644 plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/hello_gdextension.gdextension delete mode 100644 plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/hello_gdextension_export_plugin.gd delete mode 100644 plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/interface/android_icon.svg delete mode 100644 plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/interface/hello_gdextension_plugin.gd delete mode 100644 plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/plugin.cfg (limited to 'plugins/hello_gdextension/src/main') diff --git a/plugins/hello_gdextension/src/main/assets/.gitignore b/plugins/hello_gdextension/src/main/assets/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/plugins/hello_gdextension/src/main/assets/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/hello_gdextension.gdextension b/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/hello_gdextension.gdextension deleted file mode 100644 index 56faff9..0000000 --- a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/hello_gdextension.gdextension +++ /dev/null @@ -1,11 +0,0 @@ -[configuration] - -entry_symbol = "example_library_init" -compatibility_minimum = "4.2" -android_aar_plugin = true - -[libraries] - -macos = "res://addons/hello_gdextension_plugin/bin/libhello_gdextension.macos.template_debug.framework" -android.debug.arm64 = "res://addons/hello_gdextension_plugin/bin/debug/arm64-v8a/libhello_gdextension.so" -android.release.arm64 = "res://addons/hello_gdextension_plugin/bin/release/arm64-v8a/libhello_gdextension.so" diff --git a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/hello_gdextension_export_plugin.gd b/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/hello_gdextension_export_plugin.gd deleted file mode 100644 index 7829c24..0000000 --- a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/hello_gdextension_export_plugin.gd +++ /dev/null @@ -1,33 +0,0 @@ -@tool -extends EditorPlugin - -# A class member to hold the export plugin during its lifecycle -var export_plugin : AndroidExportPlugin - -func _enter_tree(): - # Initialization of the plugin goes here. - export_plugin = AndroidExportPlugin.new() - add_export_plugin(export_plugin) - - -func _exit_tree(): - # Clean up of the plugin goes here. - remove_export_plugin(export_plugin) - export_plugin = null - - -class AndroidExportPlugin extends EditorExportPlugin: - - func _supports_platform(platform): - if platform is EditorExportPlatformAndroid: - return true - return false - - func _get_android_libraries(platform, debug): - if debug: - return PackedStringArray(["hello_gdextension_plugin/bin/debug/HelloGDExtension.debug.aar"]) - else: - return PackedStringArray(["hello_gdextension_plugin/bin/release/HelloGDExtension.release.aar"]) - - func _get_name(): - return "Hello GDExtension plugin" diff --git a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/interface/android_icon.svg b/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/interface/android_icon.svg deleted file mode 100644 index 29c0fde..0000000 --- a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/interface/android_icon.svg +++ /dev/null @@ -1,2 +0,0 @@ - diff --git a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/interface/hello_gdextension_plugin.gd b/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/interface/hello_gdextension_plugin.gd deleted file mode 100644 index b46fb27..0000000 --- a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/interface/hello_gdextension_plugin.gd +++ /dev/null @@ -1,26 +0,0 @@ -class_name HelloGDExtensionPlugin extends Object - -## Interface used to access the functionality provided by the HelloGDExtension plugin - -var _hello_gdextension_singleton - -func _init(): - if Engine.has_singleton("HelloGDExtension"): - _hello_gdextension_singleton = Engine.get_singleton("HelloGDExtension") - else: - printerr("Couldn't find HelloGDExtension singleton") - - -## Add a GDExample node -func add_gdexample_node(parent_node_path: NodePath): - if _hello_gdextension_singleton: - _hello_gdextension_singleton.addGDExampleNode(parent_node_path) - else: - printerr("Unable to add gdexample node") - -## Update the visibility of the gdexample node -func set_gdexample_visible(visible: bool): - if _hello_gdextension_singleton: - _hello_gdextension_singleton.setGDExampleVisible(visible) - else: - printerr("Unable to update gdexample visibility") diff --git a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/plugin.cfg b/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/plugin.cfg deleted file mode 100644 index c9f51e0..0000000 --- a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/plugin.cfg +++ /dev/null @@ -1,7 +0,0 @@ -[plugin] - -name="Hello GDExtension plugin" -description="Showcases how to package an Android GDExtension plugin" -author="Fredia Huya-Kouadio" -version="" -script="hello_gdextension_export_plugin.gd" -- cgit v1.2.3