Add support directory path to JNI isolate configuration
This commit is contained in:
Binary file not shown.
@@ -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...');
|
||||
|
||||
Reference in New Issue
Block a user