summaryrefslogtreecommitdiff
path: root/jurt
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-08-07 23:26:10 +0300
committerTor Lillqvist <tml@collabora.com>2014-09-23 09:50:17 +0300
commitc5d65fe25f308eb4a96bf2f93a7d7b88bd94562f (patch)
tree3a2c440b418c898f60a5d6b0b11b9a65ddcb3ab6 /jurt
parent1766aa619045306b3247aede7c718bef3dcffd0f (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 749dcb1378c3..a2f92e053d17 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;
+ }
+ }
}
}
}