main-executable: extract native libs before instantiating the Application class

This commit is contained in:
Mis012
2025-08-01 13:40:29 +02:00
parent 53def20d4d
commit ebd16f01dc
5 changed files with 12 additions and 10 deletions

View File

@@ -532,16 +532,16 @@ static void open(GtkApplication *app, GFile **files, gint nfiles, const gchar *h
prepare_main_looper(env);
/* extract native libraries from apk*/
if (!getenv("ATL_SKIP_NATIVES_EXTRACTION"))
extract_from_apk("lib/" NATIVE_ARCH "/", "lib/");
// construct Application
application_object = (*env)->CallStaticObjectMethod(env, handle_cache.context.class,
_STATIC_METHOD(handle_cache.context.class, "createApplication", "(J)Landroid/app/Application;"), window);
if ((*env)->ExceptionCheck(env))
(*env)->ExceptionDescribe(env);
/* extract native libraries from apk*/
if (!getenv("ATL_SKIP_NATIVES_EXTRACTION"))
extract_from_apk("lib/" NATIVE_ARCH "/", "lib/");
jclass content_provider = (*env)->FindClass(env, "android/content/ContentProvider");
(*env)->CallStaticVoidMethod(env, content_provider, _STATIC_METHOD(content_provider, "createContentProviders", "()V"));
if ((*env)->ExceptionCheck(env))