From d328372f384c625eb0a11a9d98317cf563ea56f8 Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 24 Mar 2022 21:39:55 +0100 Subject: [PATCH] Updated old paths in the android jni wrapper classes. This fixes the export templates. --- misc/scripts/clang_format.sh | 2 +- platform/android/export/export_plugin.cpp | 2 +- platform/android/java_pandemonium_io_wrapper.h | 2 +- platform/android/java_pandemonium_lib_jni.cpp | 8 ++++---- platform/android/java_pandemonium_lib_jni.h | 2 +- platform/android/java_pandemonium_wrapper.cpp | 2 +- platform/android/jni_utils.cpp | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/misc/scripts/clang_format.sh b/misc/scripts/clang_format.sh index 95dda9c75..9d95bc8de 100755 --- a/misc/scripts/clang_format.sh +++ b/misc/scripts/clang_format.sh @@ -31,7 +31,7 @@ while IFS= read -rd '' f; do continue 2 elif [[ "$f" == *"theme_data.h" ]]; then continue 2 - elif [[ "$f" == "platform/android/java/lib/src/org/pandemoniumengine/pandemonium/input/InputManager"* ]]; then + elif [[ "$f" == "platform/android/java/lib/src/net/relintai/pandemonium/pandemonium/input/InputManager"* ]]; then continue 2 fi #python misc/scripts/copyright_headers.py "$f" diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index 17f547c8c..3eab1ed6f 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -2129,7 +2129,7 @@ bool EditorExportPlatformAndroid::can_export(const Ref &p_pr // The PandemoniumPaymentV3 module was converted to the external PandemoniumGooglePlayBilling plugin in Pandemonium 3.2.2, // this check helps users to notice the change to ensure that they change their settings. String modules = ProjectSettings::get_singleton()->get("android/modules"); - if (modules.find("org/pandemoniumengine/pandemonium/PandemoniumPaymentV3") != -1) { + if (modules.find("net/relintai/pandemonium/pandemonium/PandemoniumPaymentV3") != -1) { bool pandemonium_google_play_billing_enabled = p_preset->get("plugins/PandemoniumGooglePlayBilling"); if (!pandemonium_google_play_billing_enabled) { valid = false; diff --git a/platform/android/java_pandemonium_io_wrapper.h b/platform/android/java_pandemonium_io_wrapper.h index efc4339ab..76f3a57c8 100644 --- a/platform/android/java_pandemonium_io_wrapper.h +++ b/platform/android/java_pandemonium_io_wrapper.h @@ -38,7 +38,7 @@ #include "string_android.h" -// Class that makes functions in java/src/org/pandemoniumengine/pandemonium/PandemoniumIO.java callable from C++ +// Class that makes functions in java/src/net/relintai/pandemonium/pandemonium/PandemoniumIO.java callable from C++ class PandemoniumIOJavaWrapper { private: jobject pandemonium_io_instance; diff --git a/platform/android/java_pandemonium_lib_jni.cpp b/platform/android/java_pandemonium_lib_jni.cpp index f2bdaa21e..1f2473bda 100644 --- a/platform/android/java_pandemonium_lib_jni.cpp +++ b/platform/android/java_pandemonium_lib_jni.cpp @@ -91,7 +91,7 @@ static void _initialize_java_modules() { String m = mods[i]; // Deprecated in Pandemonium 3.2.2, it's now a plugin to enable in export preset. - if (m == "org/pandemoniumengine/pandemonium/PandemoniumPaymentV3") { + if (m == "java/src/net/relintai/pandemonium/pandemonium/PandemoniumPaymentV3") { WARN_PRINT("PandemoniumPaymentV3 is deprecated and is replaced by the 'PandemoniumPayment' plugin, which should be enabled in the Android export preset."); print_line("Skipping Android module: " + m); continue; @@ -102,7 +102,7 @@ static void _initialize_java_modules() { jclass singletonClass = (jclass)env->CallObjectMethod(cls, findClass, strClassName); ERR_CONTINUE_MSG(!singletonClass, "Couldn't find singleton for class: " + m + "."); - jmethodID initialize = env->GetStaticMethodID(singletonClass, "initialize", "(Landroid/app/Activity;)Lorg/pandemoniumengine/pandemonium/Pandemonium$SingletonBase;"); + jmethodID initialize = env->GetStaticMethodID(singletonClass, "initialize", "(Landroid/app/Activity;)Ljava/src/net/relintai/pandemonium/pandemonium/Pandemonium$SingletonBase;"); ERR_CONTINUE_MSG(!initialize, "Couldn't find proper initialize function 'public static Pandemonium.SingletonBase Class::initialize(Activity p_activity)' initializer for singleton class: " + m + "."); jobject obj = env->CallStaticObjectMethod(singletonClass, initialize, pandemonium_java->get_activity()); @@ -127,7 +127,7 @@ JNIEXPORT void JNICALL Java_net_relintai_pandemonium_pandemonium_PandemoniumLib_ // create our wrapper classes pandemonium_java = new PandemoniumJavaWrapper(env, activity, pandemonium_instance); - pandemonium_io_java = new PandemoniumIOJavaWrapper(env, pandemonium_java->get_member_object("io", "Lorg/pandemoniumengine/pandemonium/PandemoniumIO;", env)); + pandemonium_io_java = new PandemoniumIOJavaWrapper(env, pandemonium_java->get_member_object("io", "Lnet/relintai/pandemonium/pandemonium/PandemoniumIO;", env)); init_thread_jandroid(jvm, env); @@ -136,7 +136,7 @@ JNIEXPORT void JNICALL Java_net_relintai_pandemonium_pandemonium_PandemoniumLib_ FileAccessAndroid::asset_manager = AAssetManager_fromJava(env, amgr); DirAccessJAndroid::setup(pandemonium_io_java->get_instance()); - NetSocketAndroid::setup(pandemonium_java->get_member_object("netUtils", "Lorg/pandemoniumengine/pandemonium/utils/PandemoniumNetUtils;", env)); + NetSocketAndroid::setup(pandemonium_java->get_member_object("netUtils", "Lnet/relintai/pandemonium/pandemonium/utils/PandemoniumNetUtils;", env)); os_android = new OS_Android(pandemonium_java, pandemonium_io_java, p_use_apk_expansion); diff --git a/platform/android/java_pandemonium_lib_jni.h b/platform/android/java_pandemonium_lib_jni.h index 57346b0aa..bda0580de 100644 --- a/platform/android/java_pandemonium_lib_jni.h +++ b/platform/android/java_pandemonium_lib_jni.h @@ -34,7 +34,7 @@ #include // These functions can be called from within JAVA and are the means by which our JAVA implementation calls back into our C++ code. -// See java/src/org/pandemoniumengine/pandemonium/PandemoniumLib.java for the JAVA side of this (yes that's why we have the long names) +// See java/src/net/relintai/pandemonium/pandemonium/PandemoniumLib.java for the JAVA side of this (yes that's why we have the long names) extern "C" { JNIEXPORT void JNICALL Java_net_relintai_pandemonium_pandemonium_PandemoniumLib_initialize(JNIEnv *env, jclass clazz, jobject activity, jobject pandemonium_instance, jobject p_asset_manager, jboolean p_use_apk_expansion); JNIEXPORT void JNICALL Java_net_relintai_pandemonium_pandemonium_PandemoniumLib_ondestroy(JNIEnv *env, jclass clazz); diff --git a/platform/android/java_pandemonium_wrapper.cpp b/platform/android/java_pandemonium_wrapper.cpp index 7b9e8beb3..b89831838 100644 --- a/platform/android/java_pandemonium_wrapper.cpp +++ b/platform/android/java_pandemonium_wrapper.cpp @@ -42,7 +42,7 @@ PandemoniumJavaWrapper::PandemoniumJavaWrapper(JNIEnv *p_env, jobject p_activity activity = p_env->NewGlobalRef(p_activity); // get info about our Pandemonium class so we can get pointers and stuff... - pandemonium_class = p_env->FindClass("org/pandemoniumengine/pandemonium/Pandemonium"); + pandemonium_class = p_env->FindClass("net/relintai/pandemonium/pandemonium/Pandemonium"); if (pandemonium_class) { pandemonium_class = (jclass)p_env->NewGlobalRef(pandemonium_class); } else { diff --git a/platform/android/jni_utils.cpp b/platform/android/jni_utils.cpp index a20769bd4..6b10f9e2a 100644 --- a/platform/android/jni_utils.cpp +++ b/platform/android/jni_utils.cpp @@ -100,7 +100,7 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant *p_a case Variant::DICTIONARY: { Dictionary dict = *p_arg; - jclass dclass = env->FindClass("org/pandemoniumengine/pandemonium/Dictionary"); + jclass dclass = env->FindClass("net/relintai/pandemonium/pandemonium/Dictionary"); jmethodID ctor = env->GetMethodID(dclass, "", "()V"); jobject jdict = env->NewObject(dclass, ctor); @@ -377,7 +377,7 @@ const char *get_jni_sig(const String &p_type) { { "float", "F" }, { "double", "D" }, { "java.lang.String", "Ljava/lang/String;" }, - { "net.relintai.pandemonium.pandemonium.Dictionary", "Lorg/pandemoniumengine/pandemonium/Dictionary;" }, + { "net.relintai.pandemonium.pandemonium.Dictionary", "Lnet/relintai/pandemonium/pandemonium/Dictionary;" }, { "[I", "[I" }, { "[B", "[B" }, { "[F", "[F" },