summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorJuergen Schmidt <jsc@openoffice.org>2011-02-22 16:13:49 +0100
committerJuergen Schmidt <jsc@openoffice.org>2011-02-22 16:13:49 +0100
commit928af9414dac5ff185e2a8716a585efc33be2001 (patch)
tree9af762d43890966e4323b0d8d2f03bda4b670f7e /odk
parent134b85e8f8c6bb38c7ce9b4f7f159b8738b0f347 (diff)
jsc340: i114609: support passive component registration
Diffstat (limited to 'odk')
-rw-r--r--odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java32
-rw-r--r--odk/examples/DevelopersGuide/Charts/Makefile36
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java19
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Makefile39
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile41
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx56
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Makefile41
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java18
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/Makefile44
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx67
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx21
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java2
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java2
-rw-r--r--odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java2
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java3
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java3
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/Makefile115
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java32
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java32
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java32
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java24
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java63
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/Makefile20
-rwxr-xr-xodk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObjectFactory.java3
-rw-r--r--odk/examples/java/MinimalComponent/MinimalComponent.java3
-rw-r--r--odk/examples/java/PropertySet/PropTest.java3
-rw-r--r--odk/examples/java/Spreadsheet/CalcAddins.java3
-rw-r--r--odk/examples/java/ToDo/ToDo.java3
28 files changed, 427 insertions, 332 deletions
diff --git a/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java b/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java
index 10a137a316d5..06239b6c9851 100644
--- a/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java
+++ b/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java
@@ -459,18 +459,22 @@ public class JavaSampleChartAddIn extends WeakBase implements
* @param regKey the registryKey
* @see com.sun.star.comp.loader.JavaLoader
*/
- public static boolean __writeRegistryServiceInfo( com.sun.star.registry.XRegistryKey regKey )
- {
- boolean bResult = true;
-
- String[] aServices = getSupportedServiceNames_Static();
- int i, nLength = aServices.length;
-
- for( i = 0; i < nLength; ++i )
- {
- bResult = bResult && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
- JavaSampleChartAddIn.class.getName(), aServices[ i ], regKey );
- }
- return bResult;
- }
+ // This method not longer necessary since OOo 3.4 where the component registration
+ // was changed to passive component registration. For more details see
+ // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+
+// public static boolean __writeRegistryServiceInfo( com.sun.star.registry.XRegistryKey regKey )
+// {
+// boolean bResult = true;
+
+// String[] aServices = getSupportedServiceNames_Static();
+// int i, nLength = aServices.length;
+
+// for( i = 0; i < nLength; ++i )
+// {
+// bResult = bResult && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
+// JavaSampleChartAddIn.class.getName(), aServices[ i ], regKey );
+// }
+// return bResult;
+// }
}
diff --git a/odk/examples/DevelopersGuide/Charts/Makefile b/odk/examples/DevelopersGuide/Charts/Makefile
index f35f8fcbb9f7..d6727662bfbb 100644
--- a/odk/examples/DevelopersGuide/Charts/Makefile
+++ b/odk/examples/DevelopersGuide/Charts/Makefile
@@ -57,14 +57,15 @@ APP4_JAR=$(SAMPLE_CLASS_OUT)/$(APP4_NAME).jar
APP5_NAME=SelectionChangeListener
APP5_JAR=$(SAMPLE_CLASS_OUT)/$(APP5_NAME).jar
-COMPONENT_NAME=JavaSampleChartAddIn
-COMPONENT_PACKAGE = $(OUT_BIN)/$(COMPONENT_NAME).$(UNOOXT_EXT)
-COMPONENT_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMPONENT_NAME).$(UNOOXT_EXT)")
-COMPONENT_JAR_NAME = $(COMPONENT_NAME).uno.jar
-COMPONENT_JAR = $(SAMPLE_CLASS_OUT)/$(COMPONENT_JAR_NAME)
-COMPONENT_MANIFESTFILE = $(SAMPLE_CLASS_OUT)/$(COMPONENT_NAME).uno.Manifest
-COMPONENT_UNOPKG_MANIFEST = $(SAMPLE_CLASS_OUT)/$(COMPONENT_NAME)/META-INF/manifest.xml
-COMP_REGISTERFLAG = $(SAMPLE_GEN_OUT)/devguide_$(COMPONENT_NAME)_register_component.flag
+COMP_NAME=JavaSampleChartAddIn
+COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
+COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
+COMP_JAR_NAME = $(COMP_NAME).uno.jar
+COMP_JAR = $(SAMPLE_CLASS_OUT)/$(COMP_JAR_NAME)
+COMP_MANIFESTFILE = $(SAMPLE_CLASS_OUT)/$(COMP_NAME).uno.Manifest
+COMP_UNOPKG_MANIFEST = $(SAMPLE_CLASS_OUT)/$(COMP_NAME)/META-INF/manifest.xml
+COMP_REGISTERFLAG = $(SAMPLE_GEN_OUT)/devguide_$(COMP_NAME)_register_component.flag
+COMP_COMPONENTS=$(COMP_NAME).components
COMPJAVAFILES = \
JavaSampleChartAddIn.java
@@ -79,7 +80,7 @@ COMPCLASSFILES= $(patsubst %.java,$(SAMPLE_CLASS_OUT)/%.class,$(COMPJAVAFILES))
APP_CLASSFILES= $(patsubst %.java,$(SAMPLE_CLASS_OUT)/%.class,$(APP_JAVAFILES))
APP_CLASSNAMES= $(patsubst %.java,%.class,$(APP_JAVAFILES))
-$(COMPONENT_NAME)_CLASSFILES = $(COMPONENT_NAME).class
+$(COMP_NAME)_CLASSFILES = $(COMP_NAME).class
SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
$(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT))
@@ -122,7 +123,7 @@ $(SAMPLE_CLASS_OUT)/%.jar : $(SAMPLE_CLASS_OUT)/%.mf $(SAMPLE_CLASS_OUT)/%.class
+$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
# rule for component jar file
-$(COMPONENT_JAR) : $(COMPONENT_MANIFESTFILE) $(COMPCLASSFILES)
+$(COMP_JAR) : $(COMP_MANIFESTFILE) $(COMPCLASSFILES)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_JAR) cvfm $(@F) $(<F) $($(basename $(basename $(@F)))_CLASSFILES)
@@ -133,22 +134,23 @@ $(SAMPLE_CLASS_OUT)/%/manifest.xml :
@echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
@echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
@echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-component;type=Java$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(SAMPLE_CLASS_OUT)/,,$(@D))).uno.jar$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
+ @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_COMPONENTS)$(QM)"/$(CSEP)>> $@
@echo $(OSEP)/manifest:manifest$(CSEP) >> $@
# rule for component pacakge file
-$(COMPONENT_PACKAGE) : $(COMPONENT_JAR) $(COMPONENT_UNOPKG_MANIFEST)
+$(COMP_PACKAGE) : $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) ../../bin/$(@F) $(<F)
+ $(SDK_ZIP) $@ $(COMP_COMPONENTS)
+ cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) ../../bin/$(@F) -u $(<F)
cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) ../../../bin/$(@F) -u META-INF/manifest.xml
-$(COMP_REGISTERFLAG) : $(COMPONENT_PACKAGE)
+$(COMP_REGISTERFLAG) : $(COMP_PACKAGE)
ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMPONENT_PACKAGE_URL)
+ $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
@echo flagged > $(subst /,$(PS),$@)
else
@echo --------------------------------------------------------------------------------
@@ -195,4 +197,4 @@ AddInChart.ods.load : $(REGISTERFLAG)
clean :
-$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
-$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMPONENT_PACKAGE_URL)))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
diff --git a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
index 14c2659e48a7..4a4733c674ed 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
+++ b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
@@ -415,12 +415,15 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob
}
//___________________________________________
-
- public synchronized static boolean __writeRegistryServiceInfo(com.sun.star.registry.XRegistryKey xRegKey)
- {
- return Factory.writeRegistryServiceInfo(
- AsyncJob.IMPLEMENTATIONNAME,
- AsyncJob.SERVICENAMES,
- xRegKey);
- }
+ // This method not longer necessary since OOo 3.4 where the component registration
+ // was changed to passive component registration. For more details see
+ // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+
+// public synchronized static boolean __writeRegistryServiceInfo(com.sun.star.registry.XRegistryKey xRegKey)
+// {
+// return Factory.writeRegistryServiceInfo(
+// AsyncJob.IMPLEMENTATIONNAME,
+// AsyncJob.SERVICENAMES,
+// xRegKey);
+// }
}
diff --git a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Makefile b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Makefile
index 8b40d9ec87ff..052cea359530 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Makefile
+++ b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Makefile
@@ -42,16 +42,17 @@ include $(SETTINGS)/std.mk
include $(SETTINGS)/dk.mk
# Define non-platform/compiler specific settings
-COMPONENT_NAME=AsyncJob
-OUT_COMP_CLASS=$(OUT_CLASS)/$(COMPONENT_NAME)
-OUT_COMP_MISC=$(OUT_MISC)/$(COMPONENT_NAME)
-COMPONENT_PACKAGE=$(OUT_BIN)/$(COMPONENT_NAME).$(UNOOXT_EXT)
-COMPONENT_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMPONENT_NAME).$(UNOOXT_EXT)")
-COMPONENT_JAR_NAME=$(COMPONENT_NAME).uno.jar
-COMPONENT_JAR=$(OUT_CLASS)/$(COMPONENT_JAR_NAME)
-COMPONENT_MANIFESTFILE=$(OUT_COMP_CLASS)/$(COMPONENT_NAME).uno.Manifest
-COMPONENT_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMPONENT_NAME)/META-INF/manifest.xml
-REGISTERFLAG=$(OUT_COMP_MISC)$(PS)java_$(COMPONENT_NAME)_register_component.flag
+COMP_NAME=AsyncJob
+OUT_COMP_CLASS=$(OUT_CLASS)/$(COMP_NAME)
+OUT_COMP_MISC=$(OUT_MISC)/$(COMP_NAME)
+COMP_PACKAGE=$(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
+COMP_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
+COMP_JAR_NAME=$(COMP_NAME).uno.jar
+COMP_JAR=$(OUT_CLASS)/$(COMP_JAR_NAME)
+COMP_MANIFESTFILE=$(OUT_COMP_CLASS)/$(COMP_NAME).uno.Manifest
+COMP_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMP_NAME)/META-INF/manifest.xml
+REGISTERFLAG=$(OUT_COMP_MISC)$(PS)java_$(COMP_NAME)_register_component.flag
+COMP_COMPONENTS=$(COMP_NAME).components
JAVAFILES = AsyncJob.java
@@ -76,7 +77,7 @@ $(CLASSFILES) : $(JAVAFILES)
$(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(JAVAFILES)
# rule for component jar file
-$(COMPONENT_JAR) : $(COMPONENT_MANIFESTFILE) $(CLASSFILES)
+$(COMP_JAR) : $(COMP_MANIFESTFILE) $(CLASSFILES)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
$(SDK_JAR) cvfm $@ $< -C $(OUT_COMP_CLASS) .
@@ -91,24 +92,24 @@ $(OUT_COMP_CLASS)/%/manifest.xml :
@echo $(SQM) $(SQM)manifest:full-path="$(QM)Addons.xcu$(QM)"/$(CSEP) >> $@
@echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
@echo $(SQM) $(SQM)manifest:full-path="$(QM)Jobs.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-component;type=Java$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(OUT_COMP_CLASS)/,,$(@D))).uno.jar$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
+ @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_COMPONENTS)$(QM)"/$(CSEP)>> $@
@echo $(OSEP)/manifest:manifest$(CSEP) >> $@
# rule for component package file
-$(COMPONENT_PACKAGE) : $(COMPONENT_JAR) Addons.xcu Jobs.xcu $(COMPONENT_UNOPKG_MANIFEST)
+$(COMP_PACKAGE) : $(COMP_JAR) Addons.xcu Jobs.xcu $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
cd $(subst /,$(PS),$(OUT_CLASS)) && $(SDK_ZIP) ../bin/$(@F) $(<F)
- $(SDK_ZIP) -u $@ Addons.xcu Jobs.xcu
+ $(SDK_ZIP) -u $@ Addons.xcu Jobs.xcu $(COMP_COMPONENTS)
cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-$(REGISTERFLAG) : $(COMPONENT_PACKAGE)
+$(REGISTERFLAG) : $(COMP_PACKAGE)
ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMPONENT_PACKAGE_URL)
+ $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
@echo flagged > $(subst /,$(PS),$@)
else
@echo --------------------------------------------------------------------------------
@@ -132,5 +133,5 @@ DevGuideJobsAddon : $(REGISTERFLAG)
clean :
-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_MISC))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMPONENT_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMPONENT_JAR)))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_JAR)))
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile
index c5429565e406..98bbab16ba2c 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile
@@ -43,14 +43,15 @@ include $(SETTINGS)/dk.mk
# Define non-platform/compiler specific settings
COMP_NAME=ProtocolHandlerAddon_cpp
-COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
+COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
OUT_COMP_INC=$(OUT_INC)/$(COMP_NAME)
OUT_COMP_GEN=$(OUT_MISC)/$(COMP_NAME)
OUT_COMP_SLO=$(OUT_SLO)/$(COMP_NAME)
COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
COMP_UNOPKG_MANIFEST = $(OUT_COMP_GEN)/$(COMP_NAME)/META-INF/manifest.xml
-COMP_MAPFILE = $(OUT_COMP_GEN)/$(COMP_NAME).uno.map
+#COMP_MAPFILE = $(OUT_COMP_GEN)/$(COMP_NAME).uno.map
+COMP_COMPONENTS = $(OUT_COMP_GEN)/$(COMP_NAME).components
REGISTERFLAG = $(OUT_MISC)/cpp_$(COMP_NAME)_register_component.flag
@@ -70,12 +71,12 @@ $(OUT_COMP_SLO)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-$(COMP_MAPFILE) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- cat $(PRJ)/settings/component.uno.map > $(COMP_MAPFILE)
-ifeq "$(OS)" "MACOSX"
- nm -gx $(SLOFILES) | $(ADDSYMBOLS) >> $(COMP_MAPFILE)
-endif
+#$(COMP_MAPFILE) : $(SLOFILES)
+# -$(MKDIR) $(subst /,$(PS),$(@D))
+# cat $(PRJ)/settings/component.uno.map > $(COMP_MAPFILE)
+#ifeq "$(OS)" "MACOSX"
+# nm -gx $(SLOFILES) | $(ADDSYMBOLS) >> $(COMP_MAPFILE)
+#endif
ifeq "$(OS)" "WIN"
$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
@@ -86,7 +87,8 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
$(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
$(LINK_MANIFEST)
else
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+#$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
$(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
@@ -105,16 +107,28 @@ $(OUT_COMP_GEN)/%/manifest.xml :
@echo $(SQM) $(SQM)manifest:full-path="$(QM)Addons.xcu$(QM)"/$(CSEP) >> $@
@echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
@echo $(SQM) $(SQM)manifest:full-path="$(QM)ProtocolHandler.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-component;type=native;platform=$(UNOPKG_PLATFORM)$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(OUT_COMP_GEN)/,,$(UNOPKG_PLATFORM)/$(@D))).uno.$(SHAREDLIB_EXT)$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components;platform=$(UNOPKG_PLATFORM)$(QM)">> $@
+ @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_NAME).components$(QM)"/$(CSEP)>> $@
@echo $(OSEP)/manifest:manifest$(CSEP) >> $@
+$(COMP_COMPONENTS) :
+ -$(MKDIR) $(subst /,$(PS),$(@D))
+ @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
+ @echo $(OSEP)components xmlns="$(QM)http://openoffice.org/2010/uno-components$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)component loader="$(QM)com.sun.star.loader.SharedLibrary$(QM)" uri="$(QM)$(UNOPKG_PLATFORM)/$(COMP_IMPL_NAME)$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)org.openoffice.Office.addon.example$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)com.sun.star.frame.ProtocolHandler$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)/component$(CSEP) >> $@
+ @echo $(OSEP)/components$(CSEP) >> $@
+
# rule for component package file
-$(COMP_PACKAGE) : $(SHAREDLIB_OUT)/$(COMP_IMPL_NAME) Addons.xcu ProtocolHandler.xcu $(COMP_UNOPKG_MANIFEST)
+$(COMP_PACKAGE) : $(SHAREDLIB_OUT)/$(COMP_IMPL_NAME) Addons.xcu ProtocolHandler.xcu $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
-$(MKDIR) $(subst /,$(PS),$(@D)) && $(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
$(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
- cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) ../../bin/$(@F) $(UNOPKG_PLATFORM)/$(<F)
+ cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) ../../bin/$(@F) $(COMP_NAME).components
+ cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -u ../../bin/$(@F) $(UNOPKG_PLATFORM)/$(<F)
$(SDK_ZIP) -u $@ Addons.xcu ProtocolHandler.xcu
cd $(subst /,$(PS),$(OUT_COMP_GEN)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
@@ -144,5 +158,6 @@ clean :
-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_SLO))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_COMPONENTS)))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$(REGISTERFLAG)))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$(SHAREDLIB_OUT)/$(COMP_NAME).*))
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
index 724c4996f308..ae8a7bc1476f 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
@@ -60,7 +60,7 @@ using namespace ::com::sun::star::registry;
/**
* Gives the environment this component belongs to.
*/
-extern "C" void SAL_CALL component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv)
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv)
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
@@ -72,33 +72,37 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(const sal_Char *
* @param pServiceManager the service manager
* @param pRegistryKey the registry key
*/
-extern "C" sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void * pRegistryKey)
-{
- sal_Bool result = sal_False;
+// This method not longer necessary since OOo 3.4 where the component registration was
+// was changed to passive component registration. For more details see
+// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+//
+// extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void * pRegistryKey)
+// {
+// sal_Bool result = sal_False;
- if (pRegistryKey)
- {
- try
- {
- Reference< XRegistryKey > xNewKey(
- reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
- OUString( RTL_CONSTASCII_USTRINGPARAM("/" IMPLEMENTATION_NAME "/UNO/SERVICES") ) ) );
+// if (pRegistryKey)
+// {
+// try
+// {
+// Reference< XRegistryKey > xNewKey(
+// reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
+// OUString( RTL_CONSTASCII_USTRINGPARAM("/" IMPLEMENTATION_NAME "/UNO/SERVICES") ) ) );
- const Sequence< OUString > & rSNL =
- Addon_getSupportedServiceNames();
- const OUString * pArray = rSNL.getConstArray();
- for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
- xNewKey->createKey( pArray[nPos] );
+// const Sequence< OUString > & rSNL =
+// Addon_getSupportedServiceNames();
+// const OUString * pArray = rSNL.getConstArray();
+// for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
+// xNewKey->createKey( pArray[nPos] );
- return sal_True;
- }
- catch (InvalidRegistryException &)
- {
- // we should not ignore exceptions
- }
- }
- return result;
-}
+// return sal_True;
+// }
+// catch (InvalidRegistryException &)
+// {
+// // we should not ignore exceptions
+// }
+// }
+// return result;
+// }
/**
* This function is called to get service factories for an implementation.
@@ -108,7 +112,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void *
* @param pRegistryKey the registry key for this component, need for persistent data
* @return a component factory
*/
-extern "C" void * SAL_CALL component_getFactory(const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey)
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey)
{
void * pRet = 0;
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Makefile b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Makefile
index ac6a0670a05a..82a87aea4ecf 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Makefile
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Makefile
@@ -42,17 +42,18 @@ include $(SETTINGS)/std.mk
include $(SETTINGS)/dk.mk
# Define non-platform/compiler specific settings
-COMPONENT_NAME=ProtocolHandlerAddon_java
-OUT_COMP_CLASS=$(OUT_CLASS)/$(COMPONENT_NAME)
-OUT_COMP_MISC=$(OUT_MISC)/$(COMPONENT_NAME)
-COMPONENT_PACKAGE=$(OUT_BIN)/$(COMPONENT_NAME).$(UNOOXT_EXT)
-COMPONENT_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMPONENT_NAME).$(UNOOXT_EXT)")
-COMPONENT_JAR_NAME=$(COMPONENT_NAME).uno.jar
-COMPONENT_JAR=$(OUT_CLASS)/$(COMPONENT_JAR_NAME)
-COMPONENT_MANIFESTFILE=$(OUT_COMP_CLASS)/$(COMPONENT_NAME).uno.Manifest
-COMPONENT_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMPONENT_NAME)/META-INF/manifest.xml
-
-REGISTERFLAG=$(OUT_COMP_MISC)$(PS)java_$(COMPONENT_NAME)_register_component.flag
+COMP_NAME=ProtocolHandlerAddon_java
+OUT_COMP_CLASS=$(OUT_CLASS)/$(COMP_NAME)
+OUT_COMP_MISC=$(OUT_MISC)/$(COMP_NAME)
+COMP_PACKAGE=$(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
+COMP_PACKAGE_URL=$(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
+COMP_JAR_NAME=$(COMP_NAME).uno.jar
+COMP_JAR=$(OUT_CLASS)/$(COMP_JAR_NAME)
+COMP_MANIFESTFILE=$(OUT_COMP_CLASS)/$(COMP_NAME).uno.Manifest
+COMP_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMP_NAME)/META-INF/manifest.xml
+COMP_COMPONENTS=$(COMP_NAME).components
+
+REGISTERFLAG=$(OUT_COMP_MISC)$(PS)java_$(COMP_NAME)_register_component.flag
JAVAFILES = ProtocolHandlerAddon.java
@@ -77,7 +78,7 @@ $(CLASSFILES) : $(JAVAFILES)
$(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(OUT_COMP_CLASS) $(JAVAFILES)
# rule for component jar file
-$(COMPONENT_JAR) : $(COMPONENT_MANIFESTFILE) $(CLASSFILES)
+$(COMP_JAR) : $(COMP_MANIFESTFILE) $(CLASSFILES)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
$(SDK_JAR) cvfm $@ $< -C $(OUT_COMP_CLASS) .
@@ -92,25 +93,25 @@ $(OUT_COMP_CLASS)/%/manifest.xml :
@echo $(SQM) $(SQM)manifest:full-path="$(QM)Addons.xcu$(QM)"/$(CSEP) >> $@
@echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.configuration-data$(QM)" >> $@
@echo $(SQM) $(SQM)manifest:full-path="$(QM)ProtocolHandler.xcu$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-component;type=Java$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(OUT_COMP_CLASS)/,,$(@D))).uno.jar$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
+ @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_COMPONENTS)$(QM)"/$(CSEP)>> $@
@echo $(OSEP)/manifest:manifest$(CSEP) >> $@
# rule for component package file
-$(COMPONENT_PACKAGE) : $(COMPONENT_JAR) Addons.xcu ProtocolHandler.xcu $(COMPONENT_UNOPKG_MANIFEST)
+$(COMP_PACKAGE) : $(COMP_JAR) Addons.xcu ProtocolHandler.xcu $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
-$(MKDIR) $(subst /,$(PS),$(OUT_COMP_MISC))
$(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(OUT_COMP_MISC))
cd $(subst /,$(PS),$(OUT_COMP_MISC)) && $(SDK_ZIP) ../../bin/$(@F) $(<F)
- $(SDK_ZIP) -u $@ Addons.xcu ProtocolHandler.xcu
+ $(SDK_ZIP) -u $@ Addons.xcu ProtocolHandler.xcu $(COMP_COMPONENTS)
cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-$(REGISTERFLAG) : $(COMPONENT_PACKAGE)
+$(REGISTERFLAG) : $(COMP_PACKAGE)
ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMPONENT_PACKAGE_URL)
+ $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
@echo flagged > $(subst /,$(PS),$@)
else
@echo --------------------------------------------------------------------------------
@@ -134,5 +135,5 @@ DevGuideProtocolHandlerAddon : $(REGISTERFLAG)
clean :
-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_MISC))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMPONENT_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMPONENT_JAR)))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_JAR)))
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
index ad3b0efe8747..debc2ce8d8af 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
@@ -273,11 +273,15 @@ public class ProtocolHandlerAddon {
* structures) of a single
* registry key accessible.
*/
- public static boolean __writeRegistryServiceInfo(
- XRegistryKey xRegistryKey ) {
- return Factory.writeRegistryServiceInfo(
- ProtocolHandlerAddonImpl.class.getName(),
- ProtocolHandlerAddonImpl.getServiceNames(),
- xRegistryKey );
- }
+ // This method not longer necessary since OOo 3.4 where the component registration
+ // was changed to passive component registration. For more details see
+ // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+
+// public static boolean __writeRegistryServiceInfo(
+// XRegistryKey xRegistryKey ) {
+// return Factory.writeRegistryServiceInfo(
+// ProtocolHandlerAddonImpl.class.getName(),
+// ProtocolHandlerAddonImpl.getServiceNames(),
+// xRegistryKey );
+// }
}
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/Makefile b/odk/examples/DevelopersGuide/Components/CppComponent/Makefile
index 0a4e7eee4cae..b89d58bd6211 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/Makefile
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/Makefile
@@ -49,7 +49,7 @@ SAMPLE_SLO_OUT=$(OUT_SLO)/$(SAMPLE_NAME)
SAMPLE_OBJ_OUT=$(OUT_OBJ)/$(SAMPLE_NAME)
COMP_NAME=CppComponent
-COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
+COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
APP1_NAME= TestCppComponent
APP1_BINARY= $(OUT_BIN)/$(APP1_NAME)$(EXE_EXT)
@@ -59,7 +59,8 @@ COMP_RDB = $(SAMPLE_GEN_OUT)/$(COMP_RDB_NAME)
COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
COMP_UNOPKG_MANIFEST = $(SAMPLE_GEN_OUT)/$(COMP_NAME)/META-INF/manifest.xml
-COMP_MAPFILE = $(SAMPLE_GEN_OUT)/$(COMP_NAME).uno.map
+#COMP_MAPFILE = $(SAMPLE_GEN_OUT)/$(COMP_NAME).uno.map
+COMP_COMPONENTS = $(SAMPLE_GEN_OUT)/$(COMP_NAME).components
COMP_REGISTERFLAG = $(SAMPLE_GEN_OUT)/devguide_$(COMP_NAME)_register_component.flag
COMP_TYPEFLAG = $(SAMPLE_GEN_OUT)/devguide_$(COMP_NAME)_types.flag
@@ -103,12 +104,12 @@ $(SAMPLE_SLO_OUT)/%.$(OBJ_EXT) : %.cxx $(COMP_TYPEFLAG)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(SAMPLE_INC_OUT) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-$(COMP_MAPFILE) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- cat $(PRJ)/settings/component.uno.map > $(COMP_MAPFILE)
-ifeq "$(OS)" "MACOSX"
- nm -gx $(SLOFILES) | $(ADDSYMBOLS) >> $(COMP_MAPFILE)
-endif
+#$(COMP_MAPFILE) : $(SLOFILES)
+# -$(MKDIR) $(subst /,$(PS),$(@D))
+# cat $(PRJ)/settings/component.uno.map > $(COMP_MAPFILE)
+#ifeq "$(OS)" "MACOSX"
+# nm -gx $(SLOFILES) | $(ADDSYMBOLS) >> $(COMP_MAPFILE)
+#endif
ifeq "$(OS)" "WIN"
$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
@@ -119,7 +120,8 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
$(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
$(LINK_MANIFEST)
else
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+#$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(@D)) && $(DEL) $(subst \\,\,$(subst /,$(PS),$@))
$(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
$(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
@@ -136,16 +138,31 @@ $(SAMPLE_GEN_OUT)/%/manifest.xml :
@echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
@echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@
@echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(SAMPLE_GEN_OUT)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-component;type=native;platform=$(UNOPKG_PLATFORM)$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(SAMPLE_GEN_OUT)/,,$(UNOPKG_PLATFORM)/$(@D))).uno.$(SHAREDLIB_EXT)$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components;platform=$(UNOPKG_PLATFORM)$(QM)">> $@
+ @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_NAME).components$(QM)"/$(CSEP)>> $@
@echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-$(COMP_PACKAGE) : $(SHAREDLIB_OUT)/$(COMP_IMPL_NAME) $(COMP_RDB) $(COMP_UNOPKG_MANIFEST)
+$(COMP_COMPONENTS) :
+ -$(MKDIR) $(subst /,$(PS),$(@D))
+ @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
+ @echo $(OSEP)components xmlns="$(QM)http://openoffice.org/2010/uno-components$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)component loader="$(QM)com.sun.star.loader.SharedLibrary$(QM)" uri="$(QM)$(UNOPKG_PLATFORM)/$(COMP_IMPL_NAME)$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)my_module.my_sc_implementation.MyService1$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)my_module.MyService1$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)my_module.my_sc_implementation.MyService2$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)my_module.MyService2$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)/component$(CSEP) >> $@
+ @echo $(OSEP)/components$(CSEP) >> $@
+
+$(COMP_PACKAGE) : $(SHAREDLIB_OUT)/$(COMP_IMPL_NAME) $(COMP_RDB) $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
-$(MKDIR) $(subst /,$(PS),$(SAMPLE_GEN_OUT)/$(UNOPKG_PLATFORM))
$(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(SAMPLE_GEN_OUT)/$(UNOPKG_PLATFORM))
- cd $(subst /,$(PS),$(SAMPLE_GEN_OUT)) && $(SDK_ZIP) ../../bin/$(@F) $(COMP_RDB_NAME) $(UNOPKG_PLATFORM)/$(<F)
+ cd $(subst /,$(PS),$(SAMPLE_GEN_OUT)) && $(SDK_ZIP) ../../bin/$(@F) $(COMP_NAME).components
+ cd $(subst /,$(PS),$(SAMPLE_GEN_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_RDB_NAME) $(UNOPKG_PLATFORM)/$(<F)
cd $(subst /,$(PS),$(SAMPLE_GEN_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
@@ -216,5 +233,6 @@ clean :
-$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
-$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_SLO_OUT))
-$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_OBJ_OUT))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_COMPONENTS)))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_BIN)/$(COMP_NAME)*))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_BIN)/*$(APP1_NAME)*))
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
index a3c13216066d..c0462395939c 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
@@ -244,42 +244,47 @@ Reference< XInterface > SAL_CALL create_MyService2Impl(
}
/*
-extern "C" void SAL_CALL component_getImplementationEnvironment(
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
sal_Char const ** ppEnvTypeName, uno_Environment ** )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-extern "C" sal_Bool SAL_CALL component_writeInfo(
- lang::XMultiServiceFactory * xMgr, registry::XRegistryKey * xRegistry )
-{
- if (xRegistry)
- {
- try
- {
- // implementation of MyService1A
- Reference< registry::XRegistryKey > xKey(
- xRegistry->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM(
- "my_module.my_sc_implementation.MyService1/UNO/SERVICES") ) ) );
- // subkeys denote implemented services of implementation
- xKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM(
- "my_module.MyService1") ) );
- // implementation of MyService1B
- xKey = xRegistry->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM(
- "my_module.my_sc_implementation.MyService2/UNO/SERVICES") ) );
- // subkeys denote implemented services of implementation
- xKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM(
- "my_module.MyService2") ) );
- return sal_True; // success
- }
- catch (registry::InvalidRegistryException &)
- {
- // function fails if exception caught
- }
- }
- return sal_False;
-}
-extern "C" void * SAL_CALL component_getFactory(
+// This method not longer necessary since OOo 3.4 where the component registration was
+// was changed to passive component registration. For more details see
+// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+//
+// extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
+// lang::XMultiServiceFactory * xMgr, registry::XRegistryKey * xRegistry )
+// {
+// if (xRegistry)
+// {
+// try
+// {
+// // implementation of MyService1A
+// Reference< registry::XRegistryKey > xKey(
+// xRegistry->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM(
+// "my_module.my_sc_implementation.MyService1/UNO/SERVICES") ) ) );
+// // subkeys denote implemented services of implementation
+// xKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM(
+// "my_module.MyService1") ) );
+// // implementation of MyService1B
+// xKey = xRegistry->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM(
+// "my_module.my_sc_implementation.MyService2/UNO/SERVICES") ) );
+// // subkeys denote implemented services of implementation
+// xKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM(
+// "my_module.MyService2") ) );
+// return sal_True; // success
+// }
+// catch (registry::InvalidRegistryException &)
+// {
+// // function fails if exception caught
+// }
+// }
+// return sal_False;
+// }
+
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
sal_Char const * implName, lang::XMultiServiceFactory * xMgr, void * )
{
Reference< lang::XSingleComponentFactory > xFactory;
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
index 8589f8e88ab7..8876c2381870 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
@@ -199,20 +199,25 @@ static struct ::cppu::ImplementationEntry s_component_entries [] =
extern "C"
{
-void SAL_CALL component_getImplementationEnvironment(
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
sal_Char const ** ppEnvTypeName, uno_Environment ** )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-sal_Bool SAL_CALL component_writeInfo(
- lang::XMultiServiceFactory * xMgr, registry::XRegistryKey * xRegistry )
-{
- return ::cppu::component_writeInfoHelper(
- xMgr, xRegistry, ::my_sc_impl::s_component_entries );
-}
+// This method not longer necessary since OOo 3.4 where the component registration was
+// was changed to passive component registration. For more details see
+// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+//
+// sal_Bool SAL_CALL component_writeInfo(
+// lang::XMultiServiceFactory * xMgr, registry::XRegistryKey * xRegistry )
+// {
+// return ::cppu::component_writeInfoHelper(
+// xMgr, xRegistry, ::my_sc_impl::s_component_entries );
+// }
+
-void * SAL_CALL component_getFactory(
+SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
sal_Char const * implName, lang::XMultiServiceFactory * xMgr,
registry::XRegistryKey * xRegistry )
{
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java b/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
index 05662e9d884a..15980bb04a64 100644
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
+++ b/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
@@ -57,7 +57,7 @@ public class TestServiceProvider
return xSingleServiceFactory;
}
- // This method not longer necessary since OOo 3.4 where the component registration was
+ // This method not longer necessary since OOo 3.4 where the component registration
// was changed to passive component registration. For more details see
// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
diff --git a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
index f76f6e2ec56a..d7b6716dcdcc 100644
--- a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
+++ b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
@@ -148,7 +148,7 @@ public class LicenseTest {
* @param regKey the registryKey
* @see com.sun.star.comp.loader.JavaLoader
*/
- // This method not longer necessary since OOo 3.4 where the component registration was
+ // This method not longer necessary since OOo 3.4 where the component registration
// was changed to passive component registration. For more details see
// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
index f10256939a4f..9d6409e26674 100644
--- a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
+++ b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
@@ -316,7 +316,7 @@ public class DialogComponent {
* @param regKey the registryKey
* @see com.sun.star.comp.loader.JavaLoader
*/
- // This method not longer necessary since OOo 3.4 where the component registration was
+ // This method not longer necessary since OOo 3.4 where the component registration
// was changed to passive component registration. For more details see
// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java
index 8ef02f641b7a..475fb4963dbc 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java
@@ -723,9 +723,10 @@ public class AsciiReplaceFilter
*
* @see com.sun.star.comp.loader.JavaLoader
*/
- // This method not longer necessary since OOo 3.4 where the component registration was
+ // This method not longer necessary since OOo 3.4 where the component registration
// was changed to passive component registration. For more details see
// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+
// public static boolean __writeRegistryServiceInfo( com.sun.star.registry.XRegistryKey xRegistryKey )
// {
// return Factory.writeRegistryServiceInfo(
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java
index 307196289f6f..689d9b84fac6 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java
@@ -264,9 +264,10 @@ public class FlatXml implements XImportFilter, XExportFilter, XServiceName,
return xSingleServiceFactory;
}
- // This method not longer necessary since OOo 3.4 where the component registration was
+ // This method not longer necessary since OOo 3.4 where the component registration
// was changed to passive component registration. For more details see
// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+
// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey)
// {
// return FactoryHelper.writeRegistryServiceInfo(__implName,
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/Makefile b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/Makefile
index c2ac5900e862..83491a844dfb 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/Makefile
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/Makefile
@@ -45,29 +45,32 @@ include $(SETTINGS)/dk.mk
EXAMPLE_NAME=OfficeDevLinguisticExample
OUT_COMP_CLASS = $(OUT_CLASS)/$(EXAMPLE_NAME)
-COMPONENT1_NAME=SampleHyphenator
-COMPONENT1_PACKAGE = $(OUT_BIN)/$(COMPONENT1_NAME).$(UNOOXT_EXT)
-COMPONENT1_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMPONENT1_NAME).$(UNOOXT_EXT)")
-COMPONENT1_JAR_NAME = $(COMPONENT1_NAME).uno.jar
-COMPONENT1_JAR = $(OUT_COMP_CLASS)/$(COMPONENT1_JAR_NAME)
-COMPONENT1_MANIFESTFILE = $(OUT_COMP_CLASS)/$(COMPONENT1_NAME).uno.Manifest
-COMPONENT1_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMPONENT1_NAME)/META-INF/manifest.xml
-
-COMPONENT2_NAME=SampleSpellChecker
-COMPONENT2_PACKAGE = $(OUT_BIN)/$(COMPONENT2_NAME).$(UNOOXT_EXT)
-COMPONENT2_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMPONENT2_NAME).$(UNOOXT_EXT)")
-COMPONENT2_JAR_NAME = $(COMPONENT2_NAME).uno.jar
-COMPONENT2_JAR = $(OUT_COMP_CLASS)/$(COMPONENT2_JAR_NAME)
-COMPONENT2_MANIFESTFILE = $(OUT_COMP_CLASS)/$(COMPONENT2_NAME).uno.Manifest
-COMPONENT2_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMPONENT2_NAME)/META-INF/manifest.xml
-
-COMPONENT3_NAME=SampleThesaurus
-COMPONENT3_PACKAGE = $(OUT_BIN)/$(COMPONENT3_NAME).$(UNOOXT_EXT)
-COMPONENT3_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMPONENT3_NAME).$(UNOOXT_EXT)")
-COMPONENT3_JAR_NAME = $(COMPONENT3_NAME).uno.jar
-COMPONENT3_JAR = $(OUT_COMP_CLASS)/$(COMPONENT3_JAR_NAME)
-COMPONENT3_MANIFESTFILE = $(OUT_COMP_CLASS)/$(COMPONENT3_NAME).uno.Manifest
-COMPONENT3_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMPONENT3_NAME)/META-INF/manifest.xml
+COMP1_NAME=SampleHyphenator
+COMP1_PACKAGE = $(OUT_BIN)/$(COMP1_NAME).$(UNOOXT_EXT)
+COMP1_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP1_NAME).$(UNOOXT_EXT)")
+COMP1_JAR_NAME = $(COMP1_NAME).uno.jar
+COMP1_JAR = $(OUT_COMP_CLASS)/$(COMP1_JAR_NAME)
+COMP1_MANIFESTFILE = $(OUT_COMP_CLASS)/$(COMP1_NAME).uno.Manifest
+COMP1_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMP1_NAME)/META-INF/manifest.xml
+COMP1_COMPONENTS=$(COMP1_NAME).components
+
+COMP2_NAME=SampleSpellChecker
+COMP2_PACKAGE = $(OUT_BIN)/$(COMP2_NAME).$(UNOOXT_EXT)
+COMP2_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP2_NAME).$(UNOOXT_EXT)")
+COMP2_JAR_NAME = $(COMP2_NAME).uno.jar
+COMP2_JAR = $(OUT_COMP_CLASS)/$(COMP2_JAR_NAME)
+COMP2_MANIFESTFILE = $(OUT_COMP_CLASS)/$(COMP2_NAME).uno.Manifest
+COMP2_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMP2_NAME)/META-INF/manifest.xml
+COMP2_COMPONENTS=$(COMP2_NAME).components
+
+COMP3_NAME=SampleThesaurus
+COMP3_PACKAGE = $(OUT_BIN)/$(COMP3_NAME).$(UNOOXT_EXT)
+COMP3_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP3_NAME).$(UNOOXT_EXT)")
+COMP3_JAR_NAME = $(COMP3_NAME).uno.jar
+COMP3_JAR = $(OUT_COMP_CLASS)/$(COMP3_JAR_NAME)
+COMP3_MANIFESTFILE = $(OUT_COMP_CLASS)/$(COMP3_NAME).uno.Manifest
+COMP3_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMP3_NAME)/META-INF/manifest.xml
+COMP3_COMPONENTS=$(COMP2_NAME).components
APP1_NAME=LinguisticExamples
APP1_JAR=$(OUT_COMP_CLASS)/$(APP1_NAME).jar
@@ -89,22 +92,22 @@ JAVAFILES = \
CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES))
-$(COMPONENT1_NAME)_CLASSFILES = XHyphenatedWord_impl.class \
+$(COMP1_NAME)_CLASSFILES = XHyphenatedWord_impl.class \
XPossibleHyphens_impl.class \
PropChgHelper.class \
PropChgHelper_Hyph.class \
OneInstanceFactory.class \
- $(COMPONENT1_NAME).class
+ $(COMP1_NAME).class
-$(COMPONENT2_NAME)_CLASSFILES = XSpellAlternatives_impl.class \
+$(COMP2_NAME)_CLASSFILES = XSpellAlternatives_impl.class \
PropChgHelper_Spell.class \
PropChgHelper.class \
OneInstanceFactory.class \
- $(COMPONENT2_NAME).class
+ $(COMP2_NAME).class
-$(COMPONENT3_NAME)_CLASSFILES = XMeaning_impl.class \
+$(COMP3_NAME)_CLASSFILES = XMeaning_impl.class \
OneInstanceFactory.class \
- $(COMPONENT3_NAME).class
+ $(COMP3_NAME).class
SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
$(PATH_SEPARATOR)$(OUT_COMP_CLASS))
@@ -126,67 +129,59 @@ $(CLASSFILES) : $(JAVAFILES)
# rules for the component jars and the packages doesn't work proper and we
# defined explicit rules
-#$(OUT_COMP_CLASS)/%.jar : $(OUT_COMP_CLASS)/%.Manifest $(CLASSFILES)
-# -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-# -$(MKDIR) $(subst /,$(PS),$(@D))
-# cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(<F) $($(basename $(basename $(@F)))_CLASSFILES)
-
# rule for component package manifest
$(OUT_COMP_CLASS)/%/manifest.xml :
-$(MKDIR) $(subst /,$(PS),$(@D))
@echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
@echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
@echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-component;type=Java$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(OUT_COMP_CLASS)/,,$(@D))).uno.jar$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)" >> $@
+ @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(OUT_COMP_CLASS)/,,$(@D))).components$(QM)"/$(CSEP) >> $@
@echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-#$(OUT_BIN)/%.uno.pkg : $(OUT_COMP_CLASS)/%.uno.jar $(OUT_COMP_CLASS)/%/META-INF/manifest.xml
-# -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-# -$(MKDIR) $(subst /,$(PS),$(@D))
-# cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) ../../bin/$(@F) $(<F)
-# cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-
-$(COMPONENT1_JAR) : $(COMPONENT1_MANIFESTFILE) $(CLASSFILES)
+$(COMP1_JAR) : $(COMP1_MANIFESTFILE) $(CLASSFILES)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(<F) $($(basename $(basename $(@F)))_CLASSFILES)
-$(COMPONENT1_PACKAGE) : $(COMPONENT1_JAR) $(COMPONENT1_UNOPKG_MANIFEST)
+$(COMP1_PACKAGE) : $(COMP1_JAR) $(COMP1_UNOPKG_MANIFEST) $(COMP1_COMPONENTS)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) ../../bin/$(@F) $(<F)
+ $(SDK_ZIP) $@ $(COMP1_COMPONENTS)
+ cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) -u ../../bin/$(@F) $(<F)
cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-$(COMPONENT2_JAR) : $(COMPONENT2_MANIFESTFILE) $(CLASSFILES)
+$(COMP2_JAR) : $(COMP2_MANIFESTFILE) $(CLASSFILES)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(<F) $($(basename $(basename $(@F)))_CLASSFILES)
-$(COMPONENT2_PACKAGE) : $(COMPONENT2_JAR) $(COMPONENT2_UNOPKG_MANIFEST)
+$(COMP2_PACKAGE) : $(COMP2_JAR) $(COMP2_UNOPKG_MANIFEST) $(COMP2_COMPONENTS)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) ../../bin/$(@F) $(<F)
+ $(SDK_ZIP) $@ $(COMP2_COMPONENTS)
+ cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) -u ../../bin/$(@F) $(<F)
cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-$(COMPONENT3_JAR) : $(COMPONENT3_MANIFESTFILE) $(CLASSFILES)
+$(COMP3_JAR) : $(COMP3_MANIFESTFILE) $(CLASSFILES)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_JAR) cvfm $(@F) $(<F) $($(basename $(basename $(@F)))_CLASSFILES)
-$(COMPONENT3_PACKAGE) : $(COMPONENT3_JAR) $(COMPONENT3_UNOPKG_MANIFEST)
+$(COMP3_PACKAGE) : $(COMP3_JAR) $(COMP3_UNOPKG_MANIFEST) $(COMP3_COMPONENTS)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) ../../bin/$(@F) $(<F)
+ $(SDK_ZIP) $@ $(COMP3_COMPONENTS)
+ cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) -u ../../bin/$(@F) $(<F)
cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
-$(REGISTERFLAG) : $(COMPONENT1_PACKAGE) $(COMPONENT2_PACKAGE) $(COMPONENT3_PACKAGE)
+$(REGISTERFLAG) : $(COMP1_PACKAGE) $(COMP2_PACKAGE) $(COMP3_PACKAGE)
ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
-$(MKDIR) $(subst /,$(PS),$(@D))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- $(DEPLOYTOOL) $(COMPONENT1_PACKAGE_URL)
- $(DEPLOYTOOL) $(COMPONENT2_PACKAGE_URL)
- $(DEPLOYTOOL) $(COMPONENT3_PACKAGE_URL)
+ $(DEPLOYTOOL) $(COMP1_PACKAGE_URL)
+ $(DEPLOYTOOL) $(COMP2_PACKAGE_URL)
+ $(DEPLOYTOOL) $(COMP3_PACKAGE_URL)
@echo flagged > $(subst /,$(PS),$@)
else
@echo --------------------------------------------------------------------------------
@@ -220,8 +215,8 @@ $(EXAMPLE_NAME) : $(REGISTERFLAG) $(APP1_JAR)
@echo -
@echo $(MAKE) $(APP1_NAME).run
@echo --------
- @echo Before you can run the examples the components "$(QM)$(COMPONENT1_NAME)$(QM)",
- @echo "$(QM)$(COMPONENT2_NAME)$(QM)" and "$(QM)$(COMPONENT3_NAME)$(QM)" must be deployed.
+ @echo Before you can run the examples the components "$(QM)$(COMP1_NAME)$(QM)",
+ @echo "$(QM)$(COMP2_NAME)$(QM)" and "$(QM)$(COMP3_NAME)$(QM)" must be deployed.
@echo The components will be automatically deployed if SDK_AUTO_DEPLOYMENT = YES.
@echo --------------------------------------------------------------------------------
@@ -231,7 +226,7 @@ $(EXAMPLE_NAME) : $(REGISTERFLAG) $(APP1_JAR)
.PHONY: clean
clean :
-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_CLASS))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMPONENT1_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMPONENT2_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMPONENT3_PACKAGE_URL)))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP1_PACKAGE_URL)))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP2_PACKAGE_URL)))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP3_PACKAGE_URL)))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$(REGISTERFLAG)))
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java
index adad109f9a87..8008fcd5affd 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java
@@ -488,7 +488,7 @@ public class SampleHyphenator extends ComponentBase implements
// __________ static things __________
- public static String _aSvcImplName = "com.sun.star.linguistic2.JavaSamples.SampleHyphenator";
+ public static String _aSvcImplName = SampleHyphenator.class.getName();
public static String[] getSupportedServiceNames_Static()
{
@@ -531,18 +531,22 @@ public class SampleHyphenator extends ComponentBase implements
* @param xRegKey the registryKey
* @see com.sun.star.comp.loader.JavaLoader
*/
- public static boolean __writeRegistryServiceInfo(
- com.sun.star.registry.XRegistryKey xRegKey )
- {
- boolean bResult = true;
- String[] aServices = getSupportedServiceNames_Static();
- int i, nLength = aServices.length;
- for( i = 0; i < nLength; ++i )
- {
- bResult = bResult && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
- _aSvcImplName, aServices[i], xRegKey );
- }
- return bResult;
- }
+ // This method not longer necessary since OOo 3.4 where the component registration
+ // was changed to passive component registration. For more details see
+ // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+
+// public static boolean __writeRegistryServiceInfo(
+// com.sun.star.registry.XRegistryKey xRegKey )
+// {
+// boolean bResult = true;
+// String[] aServices = getSupportedServiceNames_Static();
+// int i, nLength = aServices.length;
+// for( i = 0; i < nLength; ++i )
+// {
+// bResult = bResult && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
+// _aSvcImplName, aServices[i], xRegKey );
+// }
+// return bResult;
+// }
}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java
index 9e2cd5a81853..6d28867a3e1d 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java
@@ -431,7 +431,7 @@ public class SampleSpellChecker extends ComponentBase implements
// __________ static things __________
- public static String _aSvcImplName = "com.sun.star.linguistic2.JavaSamples.SampleSpellChecker";
+ public static String _aSvcImplName = SampleSpellChecker.class.getName();
public static String[] getSupportedServiceNames_Static()
{
@@ -474,18 +474,22 @@ public class SampleSpellChecker extends ComponentBase implements
* @param xRegKey the registryKey
* @see com.sun.star.comp.loader.JavaLoader
*/
- public static boolean __writeRegistryServiceInfo(
- com.sun.star.registry.XRegistryKey xRegKey )
- {
- boolean bResult = true;
- String[] aServices = getSupportedServiceNames_Static();
- int i, nLength = aServices.length;
- for( i = 0; i < nLength; ++i )
- {
- bResult = bResult && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
- _aSvcImplName, aServices[i], xRegKey );
- }
- return bResult;
- }
+ // This method not longer necessary since OOo 3.4 where the component registration
+ // was changed to passive component registration. For more details see
+ // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+
+// public static boolean __writeRegistryServiceInfo(
+// com.sun.star.registry.XRegistryKey xRegKey )
+// {
+// boolean bResult = true;
+// String[] aServices = getSupportedServiceNames_Static();
+// int i, nLength = aServices.length;
+// for( i = 0; i < nLength; ++i )
+// {
+// bResult = bResult && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
+// _aSvcImplName, aServices[i], xRegKey );
+// }
+// return bResult;
+// }
}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java
index 7e5bbb1bf442..fd56a5683882 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java
@@ -268,7 +268,7 @@ public class SampleThesaurus extends ComponentBase implements
// __________ static things __________
- public static String _aSvcImplName = "com.sun.star.linguistic2.JavaSamples.SampleThesaurus";
+ public static String _aSvcImplName = SampleThesaurus.class.getName();
public static String[] getSupportedServiceNames_Static()
{
@@ -311,18 +311,22 @@ public class SampleThesaurus extends ComponentBase implements
* @param xRegKey the registryKey
* @see com.sun.star.comp.loader.JavaLoader
*/
- public static boolean __writeRegistryServiceInfo(
- com.sun.star.registry.XRegistryKey xRegKey )
- {
- boolean bResult = true;
- String[] aServices = getSupportedServiceNames_Static();
- int i, nLength = aServices.length;
- for( i = 0; i < nLength; ++i )
- {
- bResult = bResult && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
- _aSvcImplName, aServices[i], xRegKey );
- }
- return bResult;
- }
+ // This method not longer necessary since OOo 3.4 where the component registration
+ // was changed to passive component registration. For more details see
+ // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+
+// public static boolean __writeRegistryServiceInfo(
+// com.sun.star.registry.XRegistryKey xRegKey )
+// {
+// boolean bResult = true;
+// String[] aServices = getSupportedServiceNames_Static();
+// int i, nLength = aServices.length;
+// for( i = 0; i < nLength; ++i )
+// {
+// bResult = bResult && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
+// _aSvcImplName, aServices[i], xRegKey );
+// }
+// return bResult;
+// }
}
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
index 44f17a50c83d..d44de20e345e 100644
--- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
+++ b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
@@ -116,7 +116,7 @@ public class ExampleAddIn
{
static private final String aExampleService = "org.openoffice.sheet.addin.ExampleAddIn";
static private final String aAddInService = "com.sun.star.sheet.AddIn";
- static private final String aImplName = "ExampleAddIn";
+ static private final String aImplName = _ExampleAddIn.class.getName();
private static final short FUNCTION_INVALID = -1;
private static final short FUNCTION_INCREMENT = 0;
@@ -301,14 +301,18 @@ public class ExampleAddIn
return xSingleServiceFactory;
}
- public static boolean __writeRegistryServiceInfo(
- com.sun.star.registry.XRegistryKey regKey)
- {
- // register for both the base AddIn and the own service
- return com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
- _ExampleAddIn.aImplName, _ExampleAddIn.aExampleService, regKey)
- && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
- _ExampleAddIn.aImplName, _ExampleAddIn.aAddInService, regKey);
- }
+ // This method not longer necessary since OOo 3.4 where the component registration
+ // was changed to passive component registration. For more details see
+ // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+
+// public static boolean __writeRegistryServiceInfo(
+// com.sun.star.registry.XRegistryKey regKey)
+// {
+// // register for both the base AddIn and the own service
+// return com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
+// _ExampleAddIn.aImplName, _ExampleAddIn.aExampleService, regKey)
+// && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
+// _ExampleAddIn.aImplName, _ExampleAddIn.aAddInService, regKey);
+// }
}
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java b/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java
index 80f5ff15a4d2..8c827d0cc2f8 100644
--- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java
+++ b/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java
@@ -765,7 +765,7 @@ public class ExampleDataPilotSource
com.sun.star.lang.XServiceInfo
{
static private final String aServiceName = "com.sun.star.sheet.DataPilotSource";
- static private final String aImplName = "ExampleDataPilotSource";
+ static private final String aImplName = _ExampleDataPilotSource.class.getName();
private ExampleSettings aSettings = new ExampleSettings();
private ExampleDimensions aDimensions;
@@ -780,27 +780,34 @@ public class ExampleDataPilotSource
{
// If the first argument (Source) is a number between 2 and 10,
// use it as member count, otherwise keep the default value.
- if ( aArguments.length >= 1 )
+ try
{
- String aSource = (String) aArguments[0];
- if ( aSource != null )
- {
- try
- {
- int nValue = Integer.parseInt( aSource );
- if ( nValue >= 2 && nValue <= 10 )
- aSettings.nMemberCount = nValue;
- }
- catch ( NumberFormatException e )
- {
- System.out.println( "Error: caught exception in " +
- "ExampleDataPilotSource.initialize!\nException Message = "
- + e.getMessage());
- e.printStackTrace();
- }
- }
+ if ( aArguments.length >= 1 )
+ {
+ String aSource = com.sun.star.uno.AnyConverter.toString(aArguments[0]);
+ if ( aSource != null && aSource.length() > 0)
+ {
+ int nValue = Integer.parseInt( aSource );
+ if ( nValue >= 2 && nValue <= 10 )
+ aSettings.nMemberCount = nValue;
}
}
+ }
+ catch ( NumberFormatException e )
+ {
+ System.out.println( "Error: caught exception in " +
+ "ExampleDataPilotSource.initialize!\nException Message = "
+ + e.getMessage());
+ e.printStackTrace();
+ }
+ catch ( com.sun.star.lang.IllegalArgumentException e )
+ {
+ System.out.println( "Error: caught exception in " +
+ "ExampleDataPilotSource.initialize!\nException Message = "
+ + e.getMessage());
+ e.printStackTrace();
+ }
+ }
// XDataPilotResults
@@ -970,12 +977,16 @@ public class ExampleDataPilotSource
return xSingleServiceFactory;
}
- public static boolean __writeRegistryServiceInfo(
- com.sun.star.registry.XRegistryKey regKey)
- {
- return com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
- _ExampleDataPilotSource.aImplName,
- _ExampleDataPilotSource.aServiceName, regKey);
- }
+ // This method not longer necessary since OOo 3.4 where the component registration
+ // was changed to passive component registration. For more details see
+ // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+
+// public static boolean __writeRegistryServiceInfo(
+// com.sun.star.registry.XRegistryKey regKey)
+// {
+// return com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
+// _ExampleDataPilotSource.aImplName,
+// _ExampleDataPilotSource.aServiceName, regKey);
+// }
}
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/Makefile b/odk/examples/DevelopersGuide/Spreadsheet/Makefile
index 3c1748327bac..84fdd9432dd8 100644
--- a/odk/examples/DevelopersGuide/Spreadsheet/Makefile
+++ b/odk/examples/DevelopersGuide/Spreadsheet/Makefile
@@ -59,6 +59,7 @@ COMP1_JAR=$(SAMPLE_CLASS_OUT)/$(COMP1_JAR_NAME)
COMP1_MANIFESTFILE=$(COMP1_GEN_OUT)/$(COMP1_NAME).uno.Manifest
COMP1_UNOPKG_MANIFEST=$(COMP1_GEN_OUT)/$(COMP1_NAME)/META-INF/manifest.xml
COMP1_REGISTERFLAG=$(SAMPLE_GEN_OUT)/devguide_$(COMP1_NAME)_register_component.flag
+COMP1_COMPONENTS=$(COMP1_NAME).components
# Example DataPilot component
COMP2_NAME=ExampleDataPilotSource
@@ -71,6 +72,7 @@ COMP2_JAR=$(SAMPLE_CLASS_OUT)/$(COMP2_JAR_NAME)
COMP2_MANIFESTFILE=$(COMP2_GEN_OUT)/$(COMP2_NAME).uno.Manifest
COMP2_UNOPKG_MANIFEST=$(COMP2_GEN_OUT)/$(COMP2_NAME)/META-INF/manifest.xml
COMP2_REGISTERFLAG=$(SAMPLE_GEN_OUT)/devguide_$(COMP2_NAME)_register_component.flag
+COMP2_COMPONENTS=$(COMP2_NAME).components
#REGISTERFLAG = $(OUT_MISC)$(PS)devguide_$(SAMPLE_NAME)_register_component.flag
@@ -176,8 +178,8 @@ $(COMP1_UNOPKG_MANIFEST) :
@echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
@echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@
@echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(COMP1_GEN_OUT)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-component;type=Java$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(COMP1_GEN_OUT)/,,$(@D))).uno.jar$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
+ @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP1_COMPONENTS)$(QM)"/$(CSEP)>> $@
@echo $(OSEP)/manifest:manifest$(CSEP) >> $@
$(COMP2_UNOPKG_MANIFEST) :
@@ -185,22 +187,24 @@ $(COMP2_UNOPKG_MANIFEST) :
@echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
@echo $(OSEP)!DOCTYPE manifest:manifest PUBLIC "$(QM)-//OpenOffice.org//DTD Manifest 1.0//EN$(QM)" "$(QM)Manifest.dtd$(QM)"$(CSEP) >> $@
@echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-component;type=Java$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(COMP2_GEN_OUT)/,,$(@D))).uno.jar$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
+ @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP2_COMPONENTS)$(QM)"/$(CSEP)>> $@
@echo $(OSEP)/manifest:manifest$(CSEP) >> $@
-$(COMP1_PACKAGE) : $(COMP1_RDB) $(COMP1_JAR) $(COMP1_UNOPKG_MANIFEST)
+$(COMP1_PACKAGE) : $(COMP1_RDB) $(COMP1_JAR) $(COMP1_UNOPKG_MANIFEST) $(COMP1_COMPONENTS)
echo "####" $(@)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(COMP1_GEN_OUT)) && $(SDK_ZIP) ../../../bin/$(@F) $(<F)
+ $(SDK_ZIP) $@ $(COMP1_COMPONENTS)
+ cd $(subst /,$(PS),$(COMP1_GEN_OUT)) && $(SDK_ZIP) -u ../../../bin/$(@F) $(<F)
cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP1_JAR_NAME)
cd $(subst /,$(PS),$(COMP1_GEN_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../../bin/$(@F) META-INF/manifest.xml
-$(COMP2_PACKAGE) : $(COMP2_JAR) $(COMP2_UNOPKG_MANIFEST)
+$(COMP2_PACKAGE) : $(COMP2_JAR) $(COMP2_UNOPKG_MANIFEST) $(COMP2_COMPONENTS)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) ../../bin/$(@F) $(<F)
+ $(SDK_ZIP) $@ $(COMP2_COMPONENTS)
+ cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(<F)
cd $(subst /,$(PS),$(COMP2_GEN_OUT)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../../bin/$(@F) META-INF/manifest.xml
$(SAMPLE_GEN_OUT)/devguide_$(COMP1_NAME)_register_component.flag : $(OUT_BIN)/$(COMP1_NAME).$(UNOOXT_EXT)
diff --git a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObjectFactory.java b/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObjectFactory.java
index f081aaf668f9..a146e04d3ca1 100755
--- a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObjectFactory.java
+++ b/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObjectFactory.java
@@ -37,9 +37,10 @@ public final class OwnEmbeddedObjectFactory extends WeakBase
return xFactory;
}
- // This method not longer necessary since OOo 3.4 where the component registration was
+ // This method not longer necessary since OOo 3.4 where the component registration
// was changed to passive component registration. For more details see
// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+
// public static boolean __writeRegistryServiceInfo( XRegistryKey xRegistryKey ) {
// return Factory.writeRegistryServiceInfo(m_implementationName,
// m_serviceNames,
diff --git a/odk/examples/java/MinimalComponent/MinimalComponent.java b/odk/examples/java/MinimalComponent/MinimalComponent.java
index bce1f1882e29..d4811ab29f1a 100644
--- a/odk/examples/java/MinimalComponent/MinimalComponent.java
+++ b/odk/examples/java/MinimalComponent/MinimalComponent.java
@@ -163,9 +163,10 @@ public class MinimalComponent {
* @param regKey the registryKey
* @see com.sun.star.comp.loader.JavaLoader
*/
- // This method not longer necessary since OOo 3.4 where the component registration was
+ // This method not longer necessary since OOo 3.4 where the component registration
// was changed to passive component registration. For more details see
// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+
// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
// return Factory.writeRegistryServiceInfo(_MinimalComponent.class.getName(),
// _MinimalComponent.getServiceNames(),
diff --git a/odk/examples/java/PropertySet/PropTest.java b/odk/examples/java/PropertySet/PropTest.java
index 3e1014e9a9f2..396cb15b084a 100644
--- a/odk/examples/java/PropertySet/PropTest.java
+++ b/odk/examples/java/PropertySet/PropTest.java
@@ -257,9 +257,10 @@ public class PropTest extends PropertySet implements XServiceInfo
return xSingleServiceFactory;
}
- // This method not longer necessary since OOo 3.4 where the component registration was
+ // This method not longer necessary since OOo 3.4 where the component registration
// was changed to passive component registration. For more details see
// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+
// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey)
// {
// return FactoryHelper.writeRegistryServiceInfo( PropTest.class.getName(),
diff --git a/odk/examples/java/Spreadsheet/CalcAddins.java b/odk/examples/java/Spreadsheet/CalcAddins.java
index 7b5e1d94f698..58de5d492869 100644
--- a/odk/examples/java/Spreadsheet/CalcAddins.java
+++ b/odk/examples/java/Spreadsheet/CalcAddins.java
@@ -295,9 +295,10 @@ public class CalcAddins {
* @param regKey the registryKey
* @see com.sun.star.comp.loader.JavaLoader
*/
- // This method not longer necessary since OOo 3.4 where the component registration was
+ // This method not longer necessary since OOo 3.4 where the component registration
// was changed to passive component registration. For more details see
// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+
// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
// return FactoryHelper.writeRegistryServiceInfo(_CalcAddins.class.getName(),
// _CalcAddins.__serviceName, regKey)
diff --git a/odk/examples/java/ToDo/ToDo.java b/odk/examples/java/ToDo/ToDo.java
index 722ee8a46d37..780c001e346e 100644
--- a/odk/examples/java/ToDo/ToDo.java
+++ b/odk/examples/java/ToDo/ToDo.java
@@ -957,9 +957,10 @@ public class ToDo {
* @param regKey the registryKey
* @see com.sun.star.comp.loader.JavaLoader
*/
- // This method not longer necessary since OOo 3.4 where the component registration was
+ // This method not longer necessary since OOo 3.4 where the component registration
// was changed to passive component registration. For more details see
// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+
// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
// return Factory.writeRegistryServiceInfo(ToDoImpl.class.getName(),
// ToDoImpl.getServiceNames(), regKey);