summaryrefslogtreecommitdiff
path: root/jvmfwk/plugins
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-09-09 10:44:56 +0300
committerTor Lillqvist <tml@collabora.com>2014-09-09 13:55:23 +0300
commit6492c8576e0393f7ee548cd938e84c80e8d37127 (patch)
tree2a633846a61c060481341389e104896b8a17598d /jvmfwk/plugins
parent43efd9b40d40b791a2c2deedcac36b99f7efb2cf (diff)
Make the "Mac-like" or "canonical" app bundle structure always used on OS X
In other words, only executable files go in the MacOS folder. Dynamic libraries and bundled frameworks (i.e., LibreOfficePython), and nothing else, go in the Frameworks folder, and all other files go in the Resources folder. Especially, note that Java class files and rc (.ini) files also go in Resources. Such an app bundle structure is what Apple strongly suggests one should use, and it has been hinted that future versions of code signing and/or Gatekeeper will require such a structure. There is still some ugliness thanks to traces of the historical separation of URE from "the office". Like there are two separate "unorc" files, one for URE, one for the LibreOffice application. IMHO, this should be cleaned up, but is probably controversial. (Eek! I now see there are actually *three* unorc files in the app bundle. Not intentional. Need to fix that later.) Change-Id: Idcf235038deb5b8e1d061734993e9f31869b7606
Diffstat (limited to 'jvmfwk/plugins')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index ccf29fc95eea..4e46a67ad0d0 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -160,7 +160,7 @@ namespace
static OUString sIni;
OUStringBuffer buf( 255);
buf.append( getLibraryLocation());
-#if HAVE_FEATURE_MACOSX_MACLIKE_APP_STRUCTURE
+#ifdef MACOSX
buf.appendAscii( "/../" LIBO_ETC_FOLDER );
#endif
buf.appendAscii( SAL_CONFIGFILE("/sunjavaplugin") );
@@ -385,7 +385,8 @@ bool getJavaProps(const OUString & exePath,
OUString usStartDir;
//We need to set the CLASSPATH in case the office is started from
//a different directory. The JREProperties.class is expected to reside
- //next to the plugin.
+ //next to the plugin, except on OS X where it is in ../Resources/java relative
+ //to the plugin.
OUString sThisLib;
if (osl_getModuleURLFromAddress((void *) (sal_IntPtr)& getJavaProps,
& sThisLib.pData) == sal_False)
@@ -396,6 +397,13 @@ bool getJavaProps(const OUString & exePath,
!= osl_File_E_None)
return false;
+#ifdef MACOSX
+ if (sClassPath.endsWith("/"))
+ sClassPath += "../Resources/java/";
+ else
+ sClassPath += "/../Resources/java";
+#endif
+
//check if we shall examine a Java for accessibility support
//If the bootstrap variable is "1" then we pass the argument
//"noaccessibility" to JREProperties.class. This will prevent