summaryrefslogtreecommitdiff
path: root/jurt
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-08-07 23:26:10 +0300
committerAndras Timar <andras.timar@collabora.com>2015-05-19 12:52:20 +0200
commit14508448de969332916d2dac960311628cdacea8 (patch)
tree1c7e58b00cd679bd66e608deb2117cb045ba3534 /jurt
parent0ee23424eb5217fffff2a8c0c45ff09d93902bf2 (diff)
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 (cherry picked from commit 6ac523554213f11838443de0cd9b62415f5d2ffd)
Diffstat (limited to 'jurt')
-rw-r--r--jurt/com/sun/star/lib/util/NativeLibraryLoader.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/jurt/com/sun/star/lib/util/NativeLibraryLoader.java b/jurt/com/sun/star/lib/util/NativeLibraryLoader.java
index d9486550855e..d429a7b8b8ac 100644
--- a/jurt/com/sun/star/lib/util/NativeLibraryLoader.java
+++ b/jurt/com/sun/star/lib/util/NativeLibraryLoader.java
@@ -117,6 +117,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;
+ }
+ }
}
}
}