diff options
author | Joachim Lingner <jl@openoffice.org> | 2004-04-26 14:54:23 +0000 |
---|---|---|
committer | Joachim Lingner <jl@openoffice.org> | 2004-04-26 14:54:23 +0000 |
commit | f17a9b4b44a1c01dd128916e07e047584db98538 (patch) | |
tree | f806492b6c64e1242e3b46cf78411541811ecbb2 /jvmfwk | |
parent | 052f4cf6e4dc35c31d9b736d2b71be1279b2a2bf (diff) |
#i20052#
Diffstat (limited to 'jvmfwk')
-rw-r--r-- | jvmfwk/prj/d.lst | 3 | ||||
-rw-r--r-- | jvmfwk/source/elements.cxx | 13 | ||||
-rw-r--r-- | jvmfwk/source/framework.cxx | 6 | ||||
-rw-r--r-- | jvmfwk/source/fwkutil.cxx | 30 | ||||
-rw-r--r-- | jvmfwk/source/fwkutil.hxx | 14 | ||||
-rw-r--r-- | jvmfwk/source/javasettings_template.xml | 35 |
6 files changed, 83 insertions, 18 deletions
diff --git a/jvmfwk/prj/d.lst b/jvmfwk/prj/d.lst index 9372c9b84c33..26758b1032f1 100644 --- a/jvmfwk/prj/d.lst +++ b/jvmfwk/prj/d.lst @@ -4,5 +4,8 @@ mkdir: %_DEST%\inc%_EXT%\jvmaccess ..\%__SRC%\lib\ijvmfwk.lib %_DEST%\lib%_EXT%\ijvmfwk.lib ..\%__SRC%\bin\jvmfwk*.dll %_DEST%\bin%_EXT%\* ..\%__SRC%\bin\sunjavaplugin*.dll %_DEST%\bin%_EXT%\* +..\source\useatjava.txt %_DEST%\bin%_EXT%\useatjava.txt +..\source\javavendors.xml %_DEST%\bin%_EXT%\javavendors.xml +..\source\javasettings.xml %_DEST%\bin%_EXT%\javasettings.xml linklib: libjvmfwk*.so.*.*.* diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx index 969c2e1e3bd0..306ab28ffc44 100644 --- a/jvmfwk/source/elements.cxx +++ b/jvmfwk/source/elements.cxx @@ -2,9 +2,9 @@ * * $RCSfile: elements.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: jl $ $Date: 2004-04-26 14:47:38 $ + * last change: $Author: jl $ $Date: 2004-04-26 15:52:14 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -258,7 +258,6 @@ javaFrameworkError createSettingsStructure(xmlDoc * document, bool * bNeedsSave) //only copied during first time setup for the current user and client //machine - //!!! ToDo replace root later errcode = copyShareSettings(document, root); return errcode; @@ -271,7 +270,7 @@ javaFrameworkError copyShareSettings(xmlDoc * doc, xmlNode * userParent) CXPathObjectPtr pathObj; //check if there is a share/config/javasettings.xml - rtl::OUString sShareSettings = getSharedSettingsURL(); + rtl::OUString sShareSettings = getSharedSettingsURLNoPlatformSuffix(); osl::DirectoryItem testFileItem; osl::File::RC fileError = osl::DirectoryItem::get( @@ -282,10 +281,8 @@ javaFrameworkError copyShareSettings(xmlDoc * doc, xmlNode * userParent) //file exist already return JFW_E_ERROR; - - //Prepare access to share javasettings.xml - rtl::OString sSettings = getSharedSettingsPath(); + rtl::OString sSettings = getSharedSettingsPathNoPlatformSuffix(); CXmlDocPtr docShare = xmlParseFile(sSettings.getStr()); if (docShare == NULL) return JFW_E_CONFIG_READWRITE; @@ -295,8 +292,6 @@ javaFrameworkError copyShareSettings(xmlDoc * doc, xmlNode * userParent) return JFW_E_CONFIG_READWRITE; //copy <classesDirectory> - //ToDo make sure that this works when admin copied the user javasettings.xml - //to the share/javasettings.xml rtl::OString sExpression= rtl::OString("//jf:classesDirectory[1]/text()"); pathObj = xmlXPathEvalExpression((xmlChar*) sExpression.getStr(), contextShare); diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index 8dfcaa6f0df2..253d05cd9aa9 100644 --- a/jvmfwk/source/framework.cxx +++ b/jvmfwk/source/framework.cxx @@ -2,9 +2,9 @@ * * $RCSfile: framework.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: jl $ $Date: 2004-04-26 14:47:39 $ + * last change: $Author: jl $ $Date: 2004-04-26 15:52:15 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -267,8 +267,6 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi for (it i = vecInfo.begin(); i != vecInfo.end(); i++) (*pparInfo)[index++] = *i; //Add the manually detected JREs - //ToDo compare if the javainfo is already contained - //new function jfw_isEqualJavaInfo for (it i = vecInfoManual.begin();i != vecInfoManual.end(); i++) (*pparInfo)[index++] = *i; diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx index a88afe6cfb28..8db02e06af30 100644 --- a/jvmfwk/source/fwkutil.cxx +++ b/jvmfwk/source/fwkutil.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fwkutil.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: jl $ $Date: 2004-04-26 14:47:39 $ + * last change: $Author: jl $ $Date: 2004-04-26 15:52:15 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -356,6 +356,19 @@ rtl::OUString getSharedSettingsURL() return sBufSettings.makeStringAndClear(); } +rtl::OUString getSharedSettingsURLNoPlatformSuffix() +{ + rtl::OUString sBase = getBaseInstallation(); + if (sBase.getLength() == 0) + return sBase; + rtl::OUStringBuffer sBufSettings(256); + sBufSettings.append(sBase); + sBufSettings.appendAscii("/share/config/"); + sBufSettings.appendAscii(JAVASETTINGS); + sBufSettings.appendAscii(".xml"); + return sBufSettings.makeStringAndClear(); +} + rtl::OString getSharedSettingsPath() { rtl::OUString sURL = getSharedSettingsURL(); @@ -368,6 +381,18 @@ rtl::OString getSharedSettingsPath() rtl::OUStringToOString(sSystemPathSettings,osl_getThreadTextEncoding()); return osSystemPathSettings; } +rtl::OString getSharedSettingsPathNoPlatformSuffix() +{ + rtl::OUString sURL = getSharedSettingsURLNoPlatformSuffix(); + rtl::OUString sSystemPathSettings; + if (osl_getSystemPathFromFileURL(sURL.pData, + & sSystemPathSettings.pData) != osl_File_E_None) + return rtl::OString(); + + rtl::OString osSystemPathSettings = + rtl::OUStringToOString(sSystemPathSettings,osl_getThreadTextEncoding()); + return osSystemPathSettings; +} rtl::OUString getBaseInstallation() { @@ -656,7 +681,6 @@ javaFrameworkError buildClassPathFromDirectory(const rtl::OUString & relPath, osl::FileStatus statLink(FileStatusMask_All); if (statLink.getFileType() != osl::FileStatus::Regular) continue; - //ToDo check if the link is also a regular file: break; } default: diff --git a/jvmfwk/source/fwkutil.hxx b/jvmfwk/source/fwkutil.hxx index 5f7658d7c535..92f17b029e6f 100644 --- a/jvmfwk/source/fwkutil.hxx +++ b/jvmfwk/source/fwkutil.hxx @@ -2,9 +2,9 @@ * * $RCSfile: fwkutil.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: jl $ $Date: 2004-04-26 14:47:39 $ + * last change: $Author: jl $ $Date: 2004-04-26 15:52:15 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,8 +79,18 @@ rtl::OUString getPlatform(); */ rtl::OUString getUserSettingsURL(); rtl::OString getUserSettingsPath(); + +/** returns .../javasettings_wnt_x86.xml. + + Or other platform suffixes + */ rtl::OUString getSharedSettingsURL(); rtl::OString getSharedSettingsPath(); +/** returns .../javasettings.xml. + + */ +rtl::OUString getSharedSettingsURLNoPlatformSuffix(); +rtl::OString getSharedSettingsPathNoPlatformSuffix(); rtl::OUString getBaseInstallation(); rtl::OUString getVendorSettingsURL(); diff --git a/jvmfwk/source/javasettings_template.xml b/jvmfwk/source/javasettings_template.xml new file mode 100644 index 000000000000..3512501d3ee4 --- /dev/null +++ b/jvmfwk/source/javasettings_template.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +This file shows what elements the javasettings_platform.xml can contain. +The children of javaInfo are only created when a JRE is selected. The children of +vmParameters are only created when parameters are added and the children of +jreLocations are only created when the paths are added. +See CNodeJava::loadFromSettings and CNodeJava::writeSettings for details. +When extending the javavendors.xml then use the schema to verify it. +--> + +<java xmlns='http://openoffice.org/2004/java/framework/1.0' + xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' + xsi:schemaLocation='http://openoffice.org/2004/java/framework/1.0 file:/D:/cws-jl6/jvmfwk/source/javasettings.xsd'> + <classesDirectory>program/classes</classesDirectory> + <enabled xsi:nil="true"></enabled> + <userClassPath xsi:nil="true"></userClassPath> + <vmParameters xsi:nil="true"/> + <!--param>-Xdebug</param--> + <!--</vmParameters>--> + <jreLocations xsi:nil="true"/> + <!--location></location--> + <!--</jreLocations>--> + <javaInfo xsi:nil="true"/> + <!--javaInfo vendorUpdate="2004-03-27" xsi:nil="false"--> + <!--vendor></vendor> + <location></location> + <version></version> + <features></features> + <requirements></requirements> + <vendorData></vendorData> + </javaInfo--> + </java> + + |