summaryrefslogtreecommitdiffstats
path: root/odk/examples/DevelopersGuide/Components/SimpleLicense
diff options
context:
space:
mode:
Diffstat (limited to 'odk/examples/DevelopersGuide/Components/SimpleLicense')
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.components8
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java14
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/Makefile10
3 files changed, 23 insertions, 9 deletions
diff --git a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.components b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.components
new file mode 100644
index 000000000000..94a4848c0ee1
--- /dev/null
+++ b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.components
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://openoffice.org/2010/uno-components">
+ <component loader="com.sun.star.loader.Java2" uri="LicenseTest.uno.jar">
+ <implementation name="LicenseTest$_LicenseTest">
+ <service name="org.openoffice.LicenseTest"/>
+ </implementation>
+ </component>
+</components>
diff --git a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
index 211638c46c58..d7b6716dcdcc 100644
--- a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
+++ b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
@@ -148,11 +148,15 @@ public class LicenseTest {
* @param regKey the registryKey
* @see com.sun.star.comp.loader.JavaLoader
*/
- public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
- return Factory.writeRegistryServiceInfo(_LicenseTest.class.getName(),
- _LicenseTest.getServiceNames(),
- 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(XRegistryKey regKey) {
+// return Factory.writeRegistryServiceInfo(_LicenseTest.class.getName(),
+// _LicenseTest.getServiceNames(),
+// regKey);
+// }
/** This method is a member of the interface for initializing an object
* directly after its creation.
* @param object This array of arbitrary objects will be passed to the
diff --git a/odk/examples/DevelopersGuide/Components/SimpleLicense/Makefile b/odk/examples/DevelopersGuide/Components/SimpleLicense/Makefile
index 976de2d07b40..c82f0ba7e014 100644
--- a/odk/examples/DevelopersGuide/Components/SimpleLicense/Makefile
+++ b/odk/examples/DevelopersGuide/Components/SimpleLicense/Makefile
@@ -62,6 +62,7 @@ COMP_JAR_MANIFEST=$(COMP_GEN_OUT)/$(COMP_NAME).uno.Manifest
COMP_UNOPKG_MANIFEST = $(COMP_GEN_OUT)/META-INF/manifest.xml
COMP_REGISTERFLAG=$(COMP_GEN_OUT)$(PS)java_$(COMP_NAME)_register_component.flag
COMP_LOCAL_FILES = description.xml registration/license_de.txt registration/license_en_US.txt
+COMP_COMPONENTS=$(COMP_NAME).components
IDLFILES = LicenseTest.idl
@@ -130,15 +131,16 @@ $(COMP_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=Java$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(SAMPLE_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)$(COMP_COMPONENTS)$(QM)"/$(CSEP)>> $@
@echo $(OSEP)/manifest:manifest$(CSEP) >> $@
# rule for component package file
-$(COMP_PACKAGE) : $(COMP_RDB) $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_LOCAL_FILES)
+$(COMP_PACKAGE) : $(COMP_RDB) $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_LOCAL_FILES) $(COMP_COMPONENTS)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
- cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) ../../../bin/$(@F) $(COMP_RDB_NAME)
+ $(SDK_ZIP) $@ $(COMP_COMPONENTS)
+ cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) -u ../../../bin/$(@F) $(COMP_RDB_NAME)
cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_JAR_NAME)
cd $(subst /,$(PS),$(COMP_GEN_OUT)) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
$(SDK_ZIP) -u $@ $(COMP_LOCAL_FILES)