diff options
author | Fredia Huya-Kouadio <fhuya@meta.com> | 2023-10-08 15:02:59 -0700 |
---|---|---|
committer | Fredia Huya-Kouadio <fhuya@meta.com> | 2023-10-08 15:02:59 -0700 |
commit | cb57f3f29f36bfaafa9f26140105dc16cd51a5a7 (patch) | |
tree | 364dd705b3f2f06255b3ac5e7d344176681a713e /plugins/hello_gdextension/src/main/assets | |
parent | d9fff97ae273807c8eab768847753f17b9ecda46 (diff) | |
download | godot-android-samples-cb57f3f29f36bfaafa9f26140105dc16cd51a5a7.tar.gz godot-android-samples-cb57f3f29f36bfaafa9f26140105dc16cd51a5a7.tar.bz2 godot-android-samples-cb57f3f29f36bfaafa9f26140105dc16cd51a5a7.zip |
Update the 'HelloGDExtension' plugin sample's directory structure
Diffstat (limited to 'plugins/hello_gdextension/src/main/assets')
8 files changed, 37 insertions, 40 deletions
diff --git a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/.bin/.gdignore b/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/.bin/.gdignore deleted file mode 100644 index 8b13789..0000000 --- a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/.bin/.gdignore +++ /dev/null @@ -1 +0,0 @@ - diff --git a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/.bin/.gitignore b/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/.bin/.gitignore deleted file mode 100644 index 375ed0d..0000000 --- a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/.bin/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!.gitignore -!.gdignore diff --git a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/.export/.gdignore b/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/.export/.gdignore deleted file mode 100644 index 8b13789..0000000 --- a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/.export/.gdignore +++ /dev/null @@ -1 +0,0 @@ - diff --git a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/.export/hello_gdextension_editor_export_plugin.gd b/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/.export/hello_gdextension_editor_export_plugin.gd deleted file mode 100644 index 5131aa2..0000000 --- a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/.export/hello_gdextension_editor_export_plugin.gd +++ /dev/null @@ -1,16 +0,0 @@ -@tool -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/.export/hello_gdextension_editor_plugin.gd b/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/.export/hello_gdextension_editor_plugin.gd deleted file mode 100644 index f74419c..0000000 --- a/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/.export/hello_gdextension_editor_plugin.gd +++ /dev/null @@ -1,15 +0,0 @@ -@tool -extends EditorPlugin - -# A class member to hold the export plugin during its lifecycle -var export_plugin : EditorExportPlugin - -func _enter_tree(): - # Initialization of the plugin goes here. - export_plugin = preload("hello_gdextension_editor_export_plugin.gd").new() - add_export_plugin(export_plugin) - -func _exit_tree(): - # Clean up of the plugin goes here. - remove_export_plugin(export_plugin) - export_plugin = null 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 index 7172dc0..56faff9 100644 --- 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 @@ -6,6 +6,6 @@ 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/libhello_gdextension.so" -android.release.arm64 = "res://addons/hello_gdextension_plugin/.bin/release/libhello_gdextension.so" +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 new file mode 100644 index 0000000..7829c24 --- /dev/null +++ b/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/hello_gdextension_export_plugin.gd @@ -0,0 +1,33 @@ +@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/plugin.cfg b/plugins/hello_gdextension/src/main/assets/addons/hello_gdextension_plugin/plugin.cfg index 5c60f2b..c9f51e0 100644 --- 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 @@ -4,4 +4,4 @@ name="Hello GDExtension plugin" description="Showcases how to package an Android GDExtension plugin" author="Fredia Huya-Kouadio" version="" -script=".export/hello_gdextension_editor_plugin.gd" +script="hello_gdextension_export_plugin.gd" |