1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-20 20:23:03 +02:00

remove manual loading of dependent libs from Java

no longer needed in >= Android 4.4 (API level 19)
This commit is contained in:
Andrey Filipenkov 2023-02-25 10:40:37 +03:00
parent 2ced633ad8
commit 8d2064cbfe

View File

@ -12,54 +12,15 @@ import eu.vcmi.vcmi.NativeMethods;
*/ */
public final class LibsLoader public final class LibsLoader
{ {
private static void loadLib(final String libName, final boolean onlyForOldApis)
{
if (!onlyForOldApis || Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
{
Log.v("Loading native lib: " + libName);
SDL.loadLibrary(libName);
}
}
private static void loadCommon()
{
loadLib("c++_shared", true);
loadLib("iconv", true);
loadLib("boost-system", true);
loadLib("boost-datetime", true);
loadLib("boost-locale", true);
loadLib("boost-filesystem", true);
loadLib("boost-program-options", true);
loadLib("boost-thread", true);
loadLib("SDL2", false);
loadLib("x264", true);
loadLib("avutil", true);
loadLib("swscale", true);
loadLib("swresample", true);
loadLib("postproc", true);
loadLib("avcodec", true);
loadLib("avformat", true);
loadLib("avfilter", true);
loadLib("avdevice", true);
loadLib("minizip", true);
loadLib("vcmi-fuzzylite", true);
loadLib("vcmi-lib", true);
loadLib("SDL2_image", false);
loadLib("SDL2_mixer", false);
loadLib("SDL2_ttf", false);
}
public static void loadClientLibs(Context ctx) public static void loadClientLibs(Context ctx)
{ {
loadCommon(); SDL.loadLibrary("vcmiclient");
loadLib("vcmiclient", false);
SDL.setContext(ctx); SDL.setContext(ctx);
} }
public static void loadServerLibs() public static void loadServerLibs()
{ {
loadCommon(); SDL.loadLibrary("vcmiserver");
loadLib("vcmiserver", false);
NativeMethods.initClassloader(); NativeMethods.initClassloader();
} }
} }