-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated pyjnius patch for Webview boostrao
- Loading branch information
Showing
2 changed files
with
24 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 20 additions & 22 deletions
42
pythonforandroid/recipes/pyjnius/genericndkbuild_jnienv_getter.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
diff --git a/jnius/jnius_jvm_android.pxi b/jnius/jnius_jvm_android.pxi | ||
index ac89fec..71daa43 100644 | ||
--- a/jnius/jnius_jvm_android.pxi | ||
+++ b/jnius/jnius_jvm_android.pxi | ||
@@ -1,5 +1,5 @@ | ||
diff -Naur pyjnius.orig/jnius/env.py pyjnius/jnius/env.py | ||
--- pyjnius.orig/jnius/env.py 2022-05-28 11:16:02.000000000 +0200 | ||
+++ pyjnius/jnius/env.py 2022-05-28 11:18:30.000000000 +0200 | ||
@@ -268,7 +268,7 @@ | ||
|
||
class AndroidJavaLocation(UnixJavaLocation): | ||
def get_libraries(self): | ||
- return ['SDL2', 'log'] | ||
+ return ['main', 'log'] | ||
|
||
def get_include_dirs(self): | ||
# When cross-compiling for Android, we should not use the include dirs | ||
diff -Naur pyjnius.orig/jnius/jnius_jvm_android.pxi pyjnius/jnius/jnius_jvm_android.pxi | ||
--- pyjnius.orig/jnius/jnius_jvm_android.pxi 2022-05-28 11:16:02.000000000 +0200 | ||
+++ pyjnius/jnius/jnius_jvm_android.pxi 2022-05-28 11:17:17.000000000 +0200 | ||
@@ -1,6 +1,6 @@ | ||
# on android, rely on SDL to get the JNI env | ||
-cdef extern JNIEnv *SDL_ANDROID_GetJNIEnv() | ||
-cdef extern JNIEnv *SDL_AndroidGetJNIEnv() | ||
+cdef extern JNIEnv *WebView_AndroidGetJNIEnv() | ||
|
||
cdef JNIEnv *get_platform_jnienv(): | ||
- return SDL_ANDROID_GetJNIEnv() | ||
+ return <JNIEnv*>WebView_AndroidGetJNIEnv() | ||
diff --git a/jnius/env.py b/jnius/env.py | ||
--- a/jnius/env.py | ||
+++ b/jnius/env.py | ||
@@ -185,10 +185,10 @@ except ImportError: | ||
|
||
def get_libraries(platform): | ||
if platform == 'android': | ||
# for android, we use SDL... | ||
- return ['sdl', 'log'] | ||
+ return ['main', 'log'] | ||
|
||
elif platform == 'win32': | ||
return ['jvm'] | ||
|
||
cdef JNIEnv *get_platform_jnienv() except NULL: | ||
- return <JNIEnv*>SDL_AndroidGetJNIEnv() | ||
+ return <JNIEnv*>WebView_AndroidGetJNIEnv() |