From 6ac523554213f11838443de0cd9b62415f5d2ffd Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 7 Aug 2014 23:26:10 +0300 Subject: Make this work better in the ENABLE_MACOSX_MACLIKE_APP_STRUCTURE case In that case the dylibs won't be in the parent directory of where the jars are (Resources), but in Frameworks. Change-Id: I628d828ca820d07724947050f54f9f5f9148e159 --- jurt/com/sun/star/lib/util/NativeLibraryLoader.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'jurt') diff --git a/jurt/com/sun/star/lib/util/NativeLibraryLoader.java b/jurt/com/sun/star/lib/util/NativeLibraryLoader.java index c6c4c014a536..50b1f0559291 100644 --- a/jurt/com/sun/star/lib/util/NativeLibraryLoader.java +++ b/jurt/com/sun/star/lib/util/NativeLibraryLoader.java @@ -106,6 +106,16 @@ public final class NativeLibraryLoader { if (path.exists()) { return path; } + // In case of ENABLE_MACOSX_MACLIKE_APP_STRUCTURE, + // dir is now the Resources dir, we want to look in Frameworks + if (System.getProperty("os.name").startsWith("Mac") + && dir.getName().equals("Resources")) { + dir = dir.getParentFile(); + path = new File(dir, "Frameworks/" + name); + if (path.exists()) { + return path; + } + } } } } -- cgit