mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-21 23:38:50 -05:00
Ensure JNA 4.x compatibility (i.e. use JNA package on Linux)
This commit is contained in:
parent
dc80f2d9fc
commit
f3308493f7
@ -16,8 +16,13 @@ interface MediaInfoLibrary extends Library {
|
||||
|
||||
// libmediainfo for linux depends on libzen, so we need to load dependencies first, because we know where our native libs are (e.g. Java Web Start Cache).
|
||||
// if we do not, the system will look for dependencies, but only in the library path
|
||||
|
||||
// Ensure JNA 4.x compatibility (i.e. use JNA package on Linux)
|
||||
@SuppressWarnings("deprecation")
|
||||
Library LIB_ZEN = Platform.isLinux() ? (Library) Native.loadLibrary("zen", Library.class) : null;
|
||||
|
||||
// Ensure JNA 4.x compatibility (i.e. use JNA package on Linux)
|
||||
@SuppressWarnings("deprecation")
|
||||
MediaInfoLibrary INSTANCE = (MediaInfoLibrary) Native.loadLibrary("mediainfo", MediaInfoLibrary.class, singletonMap(OPTION_FUNCTION_MAPPER, new FunctionMapper() {
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,8 @@ import com.sun.jna.Pointer;
|
||||
|
||||
public class NativeGVFS implements GVFS {
|
||||
|
||||
// Ensure JNA 4.x compatibility (i.e. use JNA package on Linux)
|
||||
@SuppressWarnings("deprecation")
|
||||
private static final LibGIO lib_gio = (LibGIO) Native.loadLibrary("gio-2.0", LibGIO.class);
|
||||
private static final Pointer gvfs = lib_gio.g_vfs_get_default();
|
||||
|
||||
|
@ -6,8 +6,7 @@ import com.sun.jna.Pointer;
|
||||
|
||||
public interface XAttr extends Library {
|
||||
|
||||
// load from current image
|
||||
XAttr INSTANCE = Native.loadLibrary(null, XAttr.class);
|
||||
XAttr INSTANCE = Native.load(null, XAttr.class);
|
||||
|
||||
// see /usr/include/sys/xattr.h
|
||||
int XATTR_NOFOLLOW = 0x0001;
|
||||
|
@ -9,7 +9,7 @@ import com.sun.jna.win32.W32APIOptions;
|
||||
|
||||
public interface Kernel32 extends StdCallLibrary {
|
||||
|
||||
Kernel32 INSTANCE = Native.loadLibrary("kernel32", Kernel32.class, W32APIOptions.DEFAULT_OPTIONS);
|
||||
Kernel32 INSTANCE = Native.load("kernel32", Kernel32.class, W32APIOptions.DEFAULT_OPTIONS);
|
||||
|
||||
long APPMODEL_ERROR_NO_PACKAGE = 15700;
|
||||
long ERROR_INSUFFICIENT_BUFFER = 122;
|
||||
|
Loading…
Reference in New Issue
Block a user