summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/Components/Thumbs
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-02-22 12:00:00 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-02-25 16:46:26 +0100
commit40f2aee6584eafcf4cd1d95fcf1f775e5435440d (patch)
tree1873928bc36bb68b6986c2af833ed9d8ca21969b /odk/examples/DevelopersGuide/Components/Thumbs
parent72f836fb0c0c3daaf0e47832809a352888577905 (diff)
Provide unoidl-write also for the SDK
...after the new types.rdb format that unoidl-write generates has been used internally since LibreOffice 4.1 in 2013; following up on 6db34b6b33ba8e3b13683efd05df8441b87e9c92 "Directly build UNOIDL .rdb files from .idl files" and its "The legacy tools idlc, regcompare, regmerge, and regview are still contained in the URE or SDK for now." The tools idlc and regmerge are deprecated but still shipped in the SDK for now. The plan is to drop them completely for LO 7.5. odk/examples/ and ure/source/uretest/ are adapted to use unoidl-write instead of idlc and regmerge: * unoidl-write does not use a C preprocessor and the # directives in .idl files, it supports reading a single .idl file (containing an arbitrary number of declarations) or a directory tree where each directory corresponds to a UNOIDL module of the same name and each .idl file contains the declaration of the (non-module) UNOIDL entity of the same name. For some of the odk/examples/, that required moving individual .idl files into sub-directories named after the respective modules. In odk/settings/std.mk, definitinos of IDL and REGMERGE have been replaced with a new UNOIDLWRITE. * unoidl-write always enforces reserved UNOIDL identifier restrictions (see 04af4e4f55f3ef319a78edd4d0109e2e7eba90b6 "[API CHANGE] Fix all bad UNOIDL identifiers across offapi" and 620179240670bd00f60555f1f5c5b0268492f97c "Enforce the UNOIDL identifier scheme") (which idlc only enforced optionally with -cid -we). That required renaming "my_module" in odk/examples/DevelopersGuide/Components/CppComponent/. * The new types.rdb format is not compatibly with LibreOffice < 4.1. Clients generating extensions containing such files are advised to use appropriate LibreOffice-minimal-version elements. Change-Id: I1a248fd96e86ecbf407f829bc100d44bfe7f4e7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130533 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'odk/examples/DevelopersGuide/Components/Thumbs')
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Makefile4
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/description.xml15
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/Makefile8
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/thumbs.mk1
4 files changed, 19 insertions, 9 deletions
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Makefile b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Makefile
index c89cbb62f0a6..8792173e645f 100644
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Makefile
+++ b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Makefile
@@ -91,11 +91,11 @@ $(OUT_COMP_CLASS)/%/manifest.xml :
@echo $(OSEP)/manifest:manifest$(CSEP) >> $@
# rule for component package file
-$(COMP_PACKAGE) : $(COMP_RDB) $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
+$(COMP_PACKAGE) : $(COMP_RDB) $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS) description.xml
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
$(COPY) $(subst /,$(PS),$(COMP_RDB)) $(subst /,$(PS),$(OUT_COMP_CLASS))
- $(SDK_ZIP) $@ $(COMP_COMPONENTS)
+ $(SDK_ZIP) $@ $(COMP_COMPONENTS) description.xml
cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_RDB_NAME) $(COMP_JAR_NAME)
cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_CLASS)/$(COMP_RDB_NAME)))
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/description.xml b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/description.xml
new file mode 100644
index 000000000000..6c4e2396bd1b
--- /dev/null
+++ b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/description.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+<d:description xmlns:d="http://openoffice.org/extensions/description/2006">
+ <d:dependencies>
+ <l:LibreOffice-minimal-version value="4.1" d:name="LibreOffice 4.1"
+ xmlns:l="http://libreoffice.org/extensions/description/2011"/>
+ </d:dependencies>
+</d:description>
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/Makefile b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/Makefile
index a9f13dbf5920..b2622e9e69f8 100644
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/Makefile
+++ b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/Makefile
@@ -54,14 +54,10 @@ ALL : \
include $(SETTINGS)/stdtarget.mk
-$(OUT_COMP_GEN)/%.urd : %.idl
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(IDLC) -I. -I../../.. -I$(IDL_DIR) -O$(OUT_COMP_GEN) $^
-
-$(OUT_COMP_GEN)/%.rdb : $(GENURDFILES)
+$(OUT_COMP_GEN)/%.rdb : $(IDLFILES)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
- $(REGMERGE) $@ /UCR $(GENURDFILES)
+ $(UNOIDLWRITE) $(URE_TYPES) $(OFFICE_TYPES) ../../.. $@
$(OUT_COMP_CLASS)/%.class : $(COMP_RDB)
-$(MKDIR) $(subst /,$(PS),$(@D))
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/thumbs.mk b/odk/examples/DevelopersGuide/Components/Thumbs/thumbs.mk
index d5dbc181e83e..07f9bfea9848 100644
--- a/odk/examples/DevelopersGuide/Components/Thumbs/thumbs.mk
+++ b/odk/examples/DevelopersGuide/Components/Thumbs/thumbs.mk
@@ -40,7 +40,6 @@ IDLFILES = XImageShrink.idl \
GENCLASSFILES = $(patsubst %.idl,$(OUT_COMP_CLASS)/$(IDL_PACKAGE)/%.class,$(IDLFILES))
GENCLASSNAMES = $(patsubst %.idl,$(IDL_PACKAGE)/%.class,$(IDLFILES))
GENTYPELIST = $(subst /,.,$(patsubst %.idl,-T$(IDL_PACKAGE)/% ,$(IDLFILES)))
-GENURDFILES = $(patsubst %.idl,$(OUT_COMP_GEN)/%.urd,$(IDLFILES))
APP1_NAME=Thumbs
APP1_JAR=$(OUT_COMP_CLASS)/$(APP1_NAME).jar