Skip to content

Commit

Permalink
Update FCLauncher.java
Browse files Browse the repository at this point in the history
  • Loading branch information
ShirosakiMio committed Aug 16, 2024
1 parent b1d52dd commit afda196
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions FCLauncher/src/main/java/com/tungsten/fclauncher/FCLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,27 @@ private static String getLibraryPath(Context context, String javaPath) throws IO
"/hw" +
split +

nativeDir +
(FFmpegPlugin.isAvailable ? split + FFmpegPlugin.libraryPath : "");
nativeDir;
}

private static String getLibraryPath(Context context) {
String nativeDir = context.getApplicationInfo().nativeLibraryDir;
String libDirName = is64BitsDevice() ? "lib64" : "lib";
String split = ":";
return "/system/" +
libDirName +
split +

"/vendor/" +
libDirName +
split +

"/vendor/" +
libDirName +
"/hw" +
split +

nativeDir;
}

private static String[] rebaseArgs(FCLConfig config) throws IOException {
Expand All @@ -135,10 +154,11 @@ private static void addCommonEnv(FCLConfig config, HashMap<String, String> envMa
envMap.put("FCL_NATIVEDIR", config.getContext().getApplicationInfo().nativeLibraryDir);
envMap.put("TMPDIR", config.getContext().getCacheDir().getAbsolutePath());
envMap.put("PATH", config.getJavaPath() + "/bin:" + Os.getenv("PATH"));
envMap.put("LD_LIBRARY_PATH", getLibraryPath(config.getContext()));
FFmpegPlugin.discover(config.getContext());
if (FFmpegPlugin.isAvailable) {
envMap.put("PATH", FFmpegPlugin.libraryPath + ":" + envMap.get("PATH"));
envMap.put("LD_LIBRARY_PATH", FFmpegPlugin.libraryPath);
envMap.put("LD_LIBRARY_PATH", FFmpegPlugin.libraryPath + ":" + envMap.get("LD_LIBRARY_PATH"));
}
if (config.isUseVKDriverSystem()) {
envMap.put("VULKAN_DRIVER_SYSTEM", "1");
Expand Down

0 comments on commit afda196

Please sign in to comment.