Skip to content

Commit 53722ed

Browse files
committed
Share PythonUtil.java between bootstraps
Note we're using `addLibraryIfExists()` for libraries that are needed by the `sdl2` bootstrap, but may not be compiled on other bootstraps. This way it should fail gracefully while letting us share 100% of the code.
1 parent 7b27577 commit 53722ed

File tree

2 files changed

+6
-79
lines changed

2 files changed

+6
-79
lines changed

pythonforandroid/bootstraps/common/build/src/main/java/org/kivy/android/PythonUtil.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@ protected static ArrayList<String> getLibraries(File libsDir) {
3333
ArrayList<String> libsList = new ArrayList<String>();
3434
addLibraryIfExists(libsList, "sqlite3", libsDir);
3535
addLibraryIfExists(libsList, "ffi", libsDir);
36+
addLibraryIfExists(libsList, "png16", libsDir);
3637
addLibraryIfExists(libsList, "ssl.*", libsDir);
3738
addLibraryIfExists(libsList, "crypto.*", libsDir);
39+
addLibraryIfExists(libsList, "SDL2", libsDir);
40+
addLibraryIfExists(libsList, "SDL2_image", libsDir);
41+
addLibraryIfExists(libsList, "SDL2_mixer", libsDir);
42+
addLibraryIfExists(libsList, "SDL2_ttf", libsDir);
3843
libsList.add("python3.5m");
3944
libsList.add("python3.6m");
4045
libsList.add("python3.7m");
@@ -70,5 +75,5 @@ public static void loadLibraries(File filesDir, File libsDir) {
7075
}
7176

7277
Log.v(TAG, "Loaded everything!");
73-
}
78+
}
7479
}

pythonforandroid/bootstraps/sdl2/build/src/main/java/org/kivy/android/PythonUtil.java

Lines changed: 0 additions & 78 deletions
This file was deleted.

0 commit comments

Comments
 (0)