Add support directory path to JNI isolate configuration

This commit is contained in:
Kevin Rodrigues Borges
2026-05-19 10:21:00 +01:00
parent 18af239f88
commit 11f22f6bfc
2 changed files with 7 additions and 1 deletions

Binary file not shown.

View File

@@ -39,6 +39,7 @@ class JniIsolate {
'mainIsolateSendPort': mainIsolateReceiverPort.sendPort,
'dylibDir': dyLibDir,
'classPath': classPath,
'supportDirectoryPath': _supportDirectoryPath,
}, debugName: 'Aniyomi-JNI-Isolate');
final message = await readyPort.first;
readyPort.close();
@@ -57,10 +58,15 @@ class JniIsolate {
final SendPort mainIsolateSendPort = parameters['mainIsolateSendPort'];
final String dylibDir = parameters['dylibDir'];
final List<String> classPath = parameters['classPath'];
final String supportDirectoryPath = parameters['supportDirectoryPath'];
try {
debugPrint('[JNI Isolate] Spawning JVM...');
Jni.spawnIfNotExists(dylibDir: dylibDir, classPath: classPath);
Jni.spawnIfNotExists(
dylibDir: dylibDir,
classPath: classPath,
jvmOptions: ['-Djava.util.prefs.userRoot=$supportDirectoryPath'],
);
debugPrint('[JNI Isolate] JVM spawned. Running init...');
JAniyomiBridge.init();
debugPrint('[JNI Isolate] Init complete. Creating bridge instance...');