diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-11-03 14:11:00 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-11-03 14:18:59 +0100 |
commit | a72a7dc500ffd57662e8b9be61e4676266861c33 (patch) | |
tree | 6cc21e11fbaec37563ad42d5749f103c0a635146 /scripting | |
parent | 7a17b2b9d0e9bc0a95ba8bee72c2b24fb529005b (diff) |
fdo#42312: Change bsh and js script providers from extensions to optional modules.
Their jar files reference other non-URE jars, so they cannot be extensions.
bsh.jar has been moved into the optional module (it used to be installed
always, but it looks like only the bsh script provider needs it; also, it
had been added to URE_MORE_JAVA_CLASSPATH_URLS if SYSTEM_BSH, which also
appears unnecessary as it is mentioned with an absolute file URL in the
Class-Path of the script provider jar).
js.jar has been included in the optional module (it used to be not installed
at all?).
Diffstat (limited to 'scripting')
15 files changed, 100 insertions, 206 deletions
diff --git a/scripting/Extension_ScriptProviderForBeanShell.mk b/scripting/Extension_ScriptProviderForBeanShell.mk deleted file mode 100644 index a70322986551..000000000000 --- a/scripting/Extension_ScriptProviderForBeanShell.mk +++ /dev/null @@ -1,34 +0,0 @@ -# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*- -# Version: MPL 1.1 / GPLv3+ / LGPLv3+ -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License or as specified alternatively below. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Initial Developer of the Original Code is -# Matúš Kukan <matus.kukan@gmail.com> -# Portions created by the Initial Developer are Copyright (C) 2011 the -# Initial Developer. All Rights Reserved. -# -# Major Contributor(s): -# -# For minor contributions see the git repository. -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 3 or later (the "GPLv3+"), or -# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), -# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable -# instead of those above. - -$(eval $(call gb_Extension_Extension,script-provider-for-beanshell,scripting/util/provider/beanshell)) - -$(eval $(call gb_Extension_add_file,script-provider-for-beanshell,ScriptProviderForBeanShell.jar,\ - $(call gb_Jar_get_target,ScriptProviderForBeanShell))) - -# vim: set noet sw=4 ts=4: diff --git a/scripting/Extension_ScriptProviderForJavaScript.mk b/scripting/Extension_ScriptProviderForJavaScript.mk deleted file mode 100644 index daebae9211a7..000000000000 --- a/scripting/Extension_ScriptProviderForJavaScript.mk +++ /dev/null @@ -1,34 +0,0 @@ -# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*- -# Version: MPL 1.1 / GPLv3+ / LGPLv3+ -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License or as specified alternatively below. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Initial Developer of the Original Code is -# Matúš Kukan <matus.kukan@gmail.com> -# Portions created by the Initial Developer are Copyright (C) 2011 the -# Initial Developer. All Rights Reserved. -# -# Major Contributor(s): -# -# For minor contributions see the git repository. -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 3 or later (the "GPLv3+"), or -# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), -# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable -# instead of those above. - -$(eval $(call gb_Extension_Extension,script-provider-for-javascript,scripting/util/provider/javascript)) - -$(eval $(call gb_Extension_add_file,script-provider-for-javascript,ScriptProviderForJavaScript.jar,\ - $(call gb_Jar_get_target,ScriptProviderForJavaScript))) - -# vim: set noet sw=4 ts=4: diff --git a/scripting/Jar_ScriptProviderForBeanShell.mk b/scripting/Jar_ScriptProviderForBeanShell.mk index ef064ae7171e..753ea101546a 100644 --- a/scripting/Jar_ScriptProviderForBeanShell.mk +++ b/scripting/Jar_ScriptProviderForBeanShell.mk @@ -39,12 +39,20 @@ $(eval $(call gb_Jar_add_jars,ScriptProviderForBeanShell,\ $(eval $(call gb_Jar_use_externals,ScriptProviderForBeanShell,\ bsh \ )) + +$(eval $(call gb_Jar_set_manifest,ScriptProviderForBeanShell,$(SRCDIR)/scripting/java/com/sun/star/script/framework/provider/beanshell/MANIFEST.MF)) + +#TODO: Ensure "file://$(BSH_JAR)" is a proper file URL: ifeq ($(SYSTEM_BSH),YES) -$(eval $(call gb_Jar_set_jarclasspath,ScriptProviderForBeanShell,\ - $(BSH_JAR) \ -)) +$(eval $(call gb_Jar_set_jarclasspath,ScriptProviderForBeanShell, \ + unoil.jar ScriptFramework.jar file://$(BSH_JAR))) +else +$(eval $(call gb_Jar_set_jarclasspath,ScriptProviderForBeanShell, \ + unoil.jar ScriptFramework.jar bsh.jar)) endif +$(eval $(call gb_Jar_set_componentfile,ScriptProviderForBeanShell,scripting/java/ScriptProviderForBeanShell,OOO)) + $(eval $(call gb_Jar_set_packageroot,ScriptProviderForBeanShell,com)) $(eval $(call gb_Jar_add_sourcefiles,ScriptProviderForBeanShell,\ diff --git a/scripting/Jar_ScriptProviderForJavaScript.mk b/scripting/Jar_ScriptProviderForJavaScript.mk index 93ab3e10f315..5f690858ec16 100644 --- a/scripting/Jar_ScriptProviderForJavaScript.mk +++ b/scripting/Jar_ScriptProviderForJavaScript.mk @@ -37,6 +37,13 @@ $(eval $(call gb_Jar_add_jars,ScriptProviderForJavaScript,\ $(OUTDIR)/bin/js.jar \ )) +$(eval $(call gb_Jar_set_manifest,ScriptProviderForJavaScript,$(SRCDIR)/scripting/java/com/sun/star/script/framework/provider/javascript/MANIFEST.MF)) + +$(eval $(call gb_Jar_set_jarclasspath,ScriptProviderForJavaScript, \ + unoil.jar ScriptFramework.jar js.jar)) + +$(eval $(call gb_Jar_set_componentfile,ScriptProviderForJavaScript,scripting/java/ScriptProviderForJavaScript,OOO)) + $(eval $(call gb_Jar_set_packageroot,ScriptProviderForJavaScript,com)) $(eval $(call gb_Jar_add_sourcefiles,ScriptProviderForJavaScript,\ diff --git a/scripting/Module_scripting.mk b/scripting/Module_scripting.mk index b926b079e87b..252a1dfaad8f 100644 --- a/scripting/Module_scripting.mk +++ b/scripting/Module_scripting.mk @@ -30,17 +30,15 @@ $(eval $(call gb_Module_Module,scripting)) $(eval $(call gb_Module_add_targets,scripting,\ $(if $(SOLAR_JAVA),\ - $(if $(filter $(ENABLE_SCRIPTING_JAVASCRIPT),YES),\ - Extension_ScriptProviderForJavaScript) \ - $(if $(filter $(ENABLE_SCRIPTING_BEANSHELL),YES),\ - Extension_ScriptProviderForBeanShell) \ Jar_HelloWorld \ Jar_Highlight \ Jar_MemoryUsage \ Jar_ScriptFramework \ - Jar_ScriptProviderForBeanShell \ + $(if $(filter $(ENABLE_SCRIPTING_BEANSHELL),YES),\ + Jar_ScriptProviderForBeanShell) \ Jar_ScriptProviderForJava \ - Jar_ScriptProviderForJavaScript \ + $(if $(filter $(ENABLE_SCRIPTING_JAVASCRIPT),YES),\ + Jar_ScriptProviderForJavaScript) \ Zip_ScriptsJava \ ) \ $(if $(filter $(ENABLE_SCRIPTING_PYTHON),YES),\ diff --git a/scripting/java/ScriptProviderForBeanShell.component b/scripting/java/ScriptProviderForBeanShell.component new file mode 100644 index 000000000000..fe040d71d90d --- /dev/null +++ b/scripting/java/ScriptProviderForBeanShell.component @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.Java2" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.script.framework.provider.beanshell.ScriptProviderForBeanShell$_ScriptProviderForBeanShell"> + <service name="com.sun.star.script.browse.BrowseNode"/> + <service name="com.sun.star.script.provider.LanguageScriptProvider"/> + <service name="com.sun.star.script.provider.ScriptProvider"/> + <service name="com.sun.star.script.provider.ScriptProviderForBeanShell"/> + </implementation> +</component> diff --git a/scripting/java/ScriptProviderForJavaScript.component b/scripting/java/ScriptProviderForJavaScript.component new file mode 100644 index 000000000000..e9725d865983 --- /dev/null +++ b/scripting/java/ScriptProviderForJavaScript.component @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.Java2" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.script.framework.provider.javascript.ScriptProviderForJavaScript$_ScriptProviderForJavaScript"> + <service name="com.sun.star.script.browse.BrowseNode"/> + <service name="com.sun.star.script.provider.LanguageScriptProvider"/> + <service name="com.sun.star.script.provider.ScriptProvider"/> + <service name="com.sun.star.script.provider.ScriptProviderForJavaScript"/> + </implementation> +</component> diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/MANIFEST.MF b/scripting/java/com/sun/star/script/framework/provider/beanshell/MANIFEST.MF new file mode 100644 index 000000000000..689b6fde958f --- /dev/null +++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/MANIFEST.MF @@ -0,0 +1,2 @@ +RegistrationClassName: com.sun.star.script.framework.provider.beanshell.ScriptProviderForBeanShell +UNO-Type-Path: diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java index d3a0fdf3bc82..95c727881427 100755 --- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java +++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java @@ -123,41 +123,6 @@ public class ScriptProviderForBeanShell return xSingleServiceFactory; } - - - /** - * Writes the service information into the given registry key. - * This method is called by the <code>JavaLoader</code> - * <p> - * - * @param regKey the registryKey - * @return returns true if the operation succeeded - * @see com.sun.star.comp.loader.JavaLoader - */ - public static boolean __writeRegistryServiceInfo( XRegistryKey regKey ) - { - String impl = "com.sun.star.script.framework.provider.beanshell." + - "ScriptProviderForBeanShell$_ScriptProviderForBeanShell"; - - String service1 = "com.sun.star.script.provider." + - "ScriptProvider"; - String service2 = "com.sun.star.script.provider." + - "LanguageScriptProvider"; - String service3 = "com.sun.star.script.provider." + - "ScriptProviderForBeanShell"; - String service4 = "com.sun.star.script.browse." + - "BrowseNode"; - - if ( FactoryHelper.writeRegistryServiceInfo(impl, service1, regKey) && - FactoryHelper.writeRegistryServiceInfo(impl, service2, regKey) && - FactoryHelper.writeRegistryServiceInfo(impl, service3, regKey) && - FactoryHelper.writeRegistryServiceInfo(impl, service4, regKey) ) - { - return true; - } - return false; - } - } class ScriptImpl implements XScript diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/MANIFEST.MF b/scripting/java/com/sun/star/script/framework/provider/javascript/MANIFEST.MF new file mode 100644 index 000000000000..fe2f543c028b --- /dev/null +++ b/scripting/java/com/sun/star/script/framework/provider/javascript/MANIFEST.MF @@ -0,0 +1,2 @@ +RegistrationClassName: com.sun.star.script.framework.provider.javascript.ScriptProviderForJavaScript +UNO-Type-Path: diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java index c053b4166063..9f04d9105374 100755 --- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java +++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java @@ -124,40 +124,6 @@ public class ScriptProviderForJavaScript return xSingleServiceFactory; } - - - /** - * Writes the service information into the given registry key. - * This method is called by the <code>JavaLoader</code> - * <p> - * - * @param regKey the registryKey - * @return returns true if the operation succeeded - * @see com.sun.star.comp.loader.JavaLoader - */ - public static boolean __writeRegistryServiceInfo( XRegistryKey regKey ) - { - String impl = "com.sun.star.script.framework.provider.javascript." + - "ScriptProviderForJavaScript$_ScriptProviderForJavaScript"; - - String service1 = "com.sun.star.script.provider." + - "ScriptProvider"; - String service2 = "com.sun.star.script.provider." + - "LanguageScriptProvider"; - String service3 = "com.sun.star.script.provider." + - "ScriptProviderForJavaScript"; - String service4 = "com.sun.star.script.browse." + - "BrowseNode"; - - if ( FactoryHelper.writeRegistryServiceInfo(impl, service1, regKey) && - FactoryHelper.writeRegistryServiceInfo(impl, service2, regKey) && - FactoryHelper.writeRegistryServiceInfo(impl, service3, regKey) && - FactoryHelper.writeRegistryServiceInfo(impl, service4, regKey) ) - { - return true; - } - return false; - } } class ScriptImpl implements XScript { diff --git a/scripting/util/provider/beanshell/description.xml b/scripting/util/provider/beanshell/description.xml deleted file mode 100644 index 8d8a4a88ead3..000000000000 --- a/scripting/util/provider/beanshell/description.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0"?> -<description - xmlns="http://openoffice.org/extensions/description/2006" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:dep="http://openoffice.org/extensions/description/2006"> - - <identifier value="com.sun.star.script.provider.ScriptProviderForBeanShell"/> - - <dependencies> - <OpenOffice.org-minimal-version value="3.0" dep:name="OpenOffice.org 3.0"/> - </dependencies> - - <version value="3.3.0"/> - - <publisher> - <name xlink:href="http://www.documentfoundation.org" lang="en-US">The Document Foundation</name> - </publisher> - - <display-name> - <name lang="en-US">Script provider for BeanShell</name> - </display-name> - -</description> diff --git a/scripting/util/provider/beanshell/manifest.xml b/scripting/util/provider/beanshell/manifest.xml deleted file mode 100755 index da8e620281a0..000000000000 --- a/scripting/util/provider/beanshell/manifest.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd"> -<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest"> - <manifest:file-entry - manifest:media-type="application/vnd.sun.star.uno-component;type=java" - manifest:full-path="ScriptProviderForBeanShell.jar"/> -</manifest:manifest> diff --git a/scripting/util/provider/javascript/description.xml b/scripting/util/provider/javascript/description.xml deleted file mode 100644 index 08c0284b20c2..000000000000 --- a/scripting/util/provider/javascript/description.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0"?> -<description - xmlns="http://openoffice.org/extensions/description/2006" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:dep="http://openoffice.org/extensions/description/2006"> - - <identifier value="com.sun.star.script.provider.ScriptProviderForJavaScript"/> - - <dependencies> - <OpenOffice.org-minimal-version value="3.0" dep:name="OpenOffice.org 3.0"/> - </dependencies> - - <version value="3.3.0"/> - - <publisher> - <name xlink:href="http://www.documentfoundation.org" lang="en-US">The Document Foundation</name> - </publisher> - - <display-name> - <name lang="en-US">Script provider for JavaScript</name> - </display-name> - -</description> diff --git a/scripting/util/provider/javascript/manifest.xml b/scripting/util/provider/javascript/manifest.xml deleted file mode 100755 index d052ad8bc3ea..000000000000 --- a/scripting/util/provider/javascript/manifest.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd"> -<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest"> - <manifest:file-entry - manifest:media-type="application/vnd.sun.star.uno-component;type=java" - manifest:full-path="ScriptProviderForJavaScript.jar"/> -</manifest:manifest> |