Skip to content

Commit 3d57131

Browse files
committed
added variable on library load on linux
1 parent 0545a5a commit 3d57131

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/quickjs/ffi.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,11 @@ final DynamicLibrary _qjsLib = Platform.environment['FLUTTER_TEST'] == 'true'
121121
: DynamicLibrary.open('test/build/libffiquickjs.so'))
122122
: (Platform.isWindows
123123
? DynamicLibrary.open('quickjs_c_bridge.dll')
124-
: Platform.isAndroid
125-
? DynamicLibrary.open('libfastdev_quickjs_runtime.so')
126-
: DynamicLibrary.process());
124+
: (Platform.isLinux
125+
? DynamicLibrary.open(Platform.environment['LIBQUICKJSC_PATH'] ?? 'libquickjs_c_bridge_plugin.so')
126+
: (Platform.isAndroid
127+
? DynamicLibrary.open('libfastdev_quickjs_runtime.so')
128+
: DynamicLibrary.process())));
127129

128130
/// DLLEXPORT JSValue *jsThrow(JSContext *ctx, JSValue *obj)
129131
final Pointer<JSValue> Function(

0 commit comments

Comments
 (0)