diff --git a/extras/CustomTarget_tplwizdesktop.mk b/extras/CustomTarget_tplwizdesktop.mk new file mode 100644 index 000000000000..cb51cf5400ca --- /dev/null +++ b/extras/CustomTarget_tplwizdesktop.mk @@ -0,0 +1,89 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# 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/. +# + +$(eval $(call gb_CustomTarget_CustomTarget,extras/source/templates/wizard)) + +# mimetype, content.xml, meta.xml, styles.xml and META-INF/manifest.xml +# files are automatically added for each template +# list of meta.xml files (one per template) + other files (manifest.rdf, pictures...) +extras_WIZDESKTOP_XMLFILES := \ + desktop/html/meta.xml \ + desktop/idxexample/meta.xml \ + desktop/idxexample/Pictures/2000008600001923000012C24E0D0895.wmf \ + +# param: style-base (e.g. agenda/10grey) +extras_WIZDESKTOP_XMLFILES_RELATIVE = $(subst $(1)/,,$(filter $(1)/%,$(extras_WIZDESKTOP_XMLFILES))) + +.SECONDEXPANSION: +# secondexpansion since the patterns not just cover a filename portion, but also include a +# directory portion with different number of elements +# copy regular files (mimetype, *.jpg, *.png, *.rdf, *.svg, *.svm, …) +$(gb_CustomTarget_workdir)/extras/source/templates/wizard/% : $(SRCDIR)/extras/source/templates/wizard/% \ + | $$(dir $(gb_CustomTarget_workdir)/extras/source/templates/wizard/$$*).dir + $(call gb_Output_announce,templates/wizard/$*,$(true),CPY,1) + $(call gb_Trace_StartRange,templates/wizard/$*,CPY) + cp $< $@ + $(call gb_Trace_EndRange,templates/wizard/$*,CPY) + +# test and copy xml files +$(gb_CustomTarget_workdir)/extras/source/templates/wizard/%.xml : $(SRCDIR)/extras/source/templates/wizard/%.xml \ + | $(call gb_ExternalExecutable_get_dependencies,xsltproc) \ + $$(dir $(gb_CustomTarget_workdir)/extras/source/templates/wizard/$$*.xml).dir + $(call gb_Output_announce,templates/wizard/$*.xml,$(true),XSL,1) + $(call gb_Trace_StartRange,templates/wizard/$*.xml,XSL) + $(call gb_ExternalExecutable_get_command,xsltproc) --nonet -o $@ $(SRCDIR)/extras/util/compact.xsl $< + $(call gb_Trace_EndRange,templates/wizard/$*.xml,XSL) + +# zip files to OTH +$(gb_CustomTarget_workdir)/extras/source/templates/wizard/%.oth : \ + $$(addprefix $(gb_CustomTarget_workdir)/extras/source/templates/wizard/$$*/,\ + mimetype $$(call extras_WIZDESKTOP_XMLFILES_RELATIVE,$$*) ) \ + $$(addprefix $(gb_CustomTarget_workdir)/extras/source/templates/wizard/$$*/,\ + content.xml $$(call extras_WIZDESKTOP_XMLFILES_RELATIVE,$$*) ) \ + $$(addprefix $(gb_CustomTarget_workdir)/extras/source/templates/wizard/$$*/,\ + styles.xml $$(call extras_WIZDESKTOP_XMLFILES_RELATIVE,$$*) ) \ + $$(addprefix $(gb_CustomTarget_workdir)/extras/source/templates/wizard/$$*/,\ + settings.xml $$(call extras_WIZDESKTOP_XMLFILES_RELATIVE,$$*) ) \ + $$(addprefix $(gb_CustomTarget_workdir)/extras/source/templates/wizard/$$*/,\ + META-INF/manifest.xml $$(call extras_WIZDESKTOP_XMLFILES_RELATIVE,$$*) ) + $(call gb_Output_announce,templates/wizard/$*.oth,$(true),ZIP,2) + $(call gb_Trace_StartRange,templates/wizard/$*.oth,ZIP) + $(call gb_Helper_abbreviate_dirs,\ + cd $(dir $<) && \ + $(call gb_Helper_wsl_path,\ + $(WSL) zip -q0X --filesync --must-match $@ mimetype && \ + $(WSL) zip -qrX --must-match $@ content.xml settings.xml styles.xml META-INF/manifest.xml && \ + $(WSL) zip -qrX --must-match $@ $(call extras_WIZDESKTOP_XMLFILES_RELATIVE,$*)) \ + ) + $(call gb_Trace_EndRange,templates/wizard/$*.oth,ZIP) + +# zip files to ODT +$(gb_CustomTarget_workdir)/extras/source/templates/wizard/%.odt : \ + $$(addprefix $(gb_CustomTarget_workdir)/extras/source/templates/wizard/$$*/,\ + mimetype $$(call extras_WIZDESKTOP_XMLFILES_RELATIVE,$$*) ) \ + $$(addprefix $(gb_CustomTarget_workdir)/extras/source/templates/wizard/$$*/,\ + content.xml $$(call extras_WIZDESKTOP_XMLFILES_RELATIVE,$$*) ) \ + $$(addprefix $(gb_CustomTarget_workdir)/extras/source/templates/wizard/$$*/,\ + settings.xml $$(call extras_WIZDESKTOP_XMLFILES_RELATIVE,$$*) ) \ + $$(addprefix $(gb_CustomTarget_workdir)/extras/source/templates/wizard/$$*/,\ + styles.xml $$(call extras_WIZDESKTOP_XMLFILES_RELATIVE,$$*) ) \ + $$(addprefix $(gb_CustomTarget_workdir)/extras/source/templates/wizard/$$*/,\ + META-INF/manifest.xml $$(call extras_WIZDESKTOP_XMLFILES_RELATIVE,$$*) ) + $(call gb_Output_announce,templates/wizard/$*.odt,$(true),ZIP,2) + $(call gb_Trace_StartRange,templates/wizard/$*.odt,ZIP) + $(call gb_Helper_abbreviate_dirs,\ + cd $(dir $<) && \ + $(call gb_Helper_wsl_path,\ + $(WSL) zip -q0X --filesync --must-match $@ mimetype && \ + $(WSL) zip -qrX --must-match $@ content.xml settings.xml styles.xml META-INF/manifest.xml && \ + $(WSL) zip -qrX --must-match $@ $(call extras_WIZDESKTOP_XMLFILES_RELATIVE,$*)) \ + ) + $(call gb_Trace_EndRange,templates/wizard/$*.odt,ZIP) + +# vim: set noet sw=4 ts=4: diff --git a/extras/Module_extras.mk b/extras/Module_extras.mk index 497a188cc142..38632ca5b2a3 100644 --- a/extras/Module_extras.mk +++ b/extras/Module_extras.mk @@ -17,6 +17,7 @@ $(eval $(call gb_Module_add_targets,extras,\ CustomTarget_templates \ CustomTarget_tplpresnt \ CustomTarget_tplwizard \ + CustomTarget_tplwizdesktop \ Package_autocorr \ Package_autotextuser \ Package_cfgsrvnolang \ diff --git a/extras/Package_tplwizdesktop.mk b/extras/Package_tplwizdesktop.mk index aafdf791cd7a..548d74430f13 100644 --- a/extras/Package_tplwizdesktop.mk +++ b/extras/Package_tplwizdesktop.mk @@ -7,10 +7,10 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_Package_Package,extras_tplwizdesktop,$(SRCDIR)/extras/source/templates/wizard/desktop)) +$(eval $(call gb_Package_Package,extras_tplwizdesktop,$(gb_CustomTarget_workdir)/extras/source/templates/wizard/desktop)) -$(eval $(call gb_Package_add_files,extras_tplwizdesktop,$(LIBO_SHARE_FOLDER)/template/common/internal,\ - html.stw \ +$(eval $(call gb_Package_add_files_with_dir,extras_tplwizdesktop,$(LIBO_SHARE_FOLDER)/template/common/internal,\ + html.oth \ idxexample.odt \ )) diff --git a/extras/source/templates/wizard/desktop/html.stw b/extras/source/templates/wizard/desktop/html.stw deleted file mode 100644 index 8f275848b448..000000000000 Binary files a/extras/source/templates/wizard/desktop/html.stw and /dev/null differ diff --git a/extras/source/templates/wizard/desktop/html/META-INF/manifest.xml b/extras/source/templates/wizard/desktop/html/META-INF/manifest.xml new file mode 100644 index 000000000000..f1e8613895a0 --- /dev/null +++ b/extras/source/templates/wizard/desktop/html/META-INF/manifest.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/extras/source/templates/wizard/desktop/html/content.xml b/extras/source/templates/wizard/desktop/html/content.xml new file mode 100644 index 000000000000..162e0b565d63 --- /dev/null +++ b/extras/source/templates/wizard/desktop/html/content.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/extras/source/templates/wizard/desktop/html/meta.xml b/extras/source/templates/wizard/desktop/html/meta.xml new file mode 100644 index 000000000000..a755d7d7d02c --- /dev/null +++ b/extras/source/templates/wizard/desktop/html/meta.xml @@ -0,0 +1,9 @@ + + + + LibreOffice/24.2.3.2$Linux_X86_64 LibreOffice_project/4f88f79086d18691a72ac668802d5bc5b5a88122 + Standard template for HTML documents + Laurent BALLAND + + + diff --git a/extras/source/templates/wizard/desktop/html/mimetype b/extras/source/templates/wizard/desktop/html/mimetype new file mode 100644 index 000000000000..101ca206a5c8 --- /dev/null +++ b/extras/source/templates/wizard/desktop/html/mimetype @@ -0,0 +1 @@ +application/vnd.oasis.opendocument.text-web \ No newline at end of file diff --git a/extras/source/templates/wizard/desktop/html/settings.xml b/extras/source/templates/wizard/desktop/html/settings.xml new file mode 100644 index 000000000000..16eadaae8a5f --- /dev/null +++ b/extras/source/templates/wizard/desktop/html/settings.xml @@ -0,0 +1,24 @@ + + + + + true + true + true + true + false + true + false + true + false + false + false + false + true + false + false + true + false + + + diff --git a/extras/source/templates/wizard/desktop/html/styles.xml b/extras/source/templates/wizard/desktop/html/styles.xml new file mode 100644 index 000000000000..f8908ba826b8 --- /dev/null +++ b/extras/source/templates/wizard/desktop/html/styles.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extras/source/templates/wizard/desktop/idxexample.odt b/extras/source/templates/wizard/desktop/idxexample.odt deleted file mode 100644 index 30582e494f1a..000000000000 Binary files a/extras/source/templates/wizard/desktop/idxexample.odt and /dev/null differ diff --git a/extras/source/templates/wizard/desktop/idxexample/META-INF/manifest.xml b/extras/source/templates/wizard/desktop/idxexample/META-INF/manifest.xml new file mode 100644 index 000000000000..378c700f759f --- /dev/null +++ b/extras/source/templates/wizard/desktop/idxexample/META-INF/manifest.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/extras/source/templates/wizard/desktop/idxexample/Pictures/2000008600001923000012C24E0D0895.wmf b/extras/source/templates/wizard/desktop/idxexample/Pictures/2000008600001923000012C24E0D0895.wmf new file mode 100644 index 000000000000..4475a244f3da Binary files /dev/null and b/extras/source/templates/wizard/desktop/idxexample/Pictures/2000008600001923000012C24E0D0895.wmf differ diff --git a/extras/source/templates/wizard/desktop/idxexample/content.xml b/extras/source/templates/wizard/desktop/idxexample/content.xml new file mode 100644 index 000000000000..05496c83de70 --- /dev/null +++ b/extras/source/templates/wizard/desktop/idxexample/content.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HEADING1 + ENTRY1 + HEADING11 + ENTRY11 + HEADING12 + ENTRY12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TABLE1 + + + + + + + + + + + + + + + + + IMAGE1 + + + diff --git a/extras/source/templates/wizard/desktop/idxexample/meta.xml b/extras/source/templates/wizard/desktop/idxexample/meta.xml new file mode 100644 index 000000000000..6ae86ea98a9f --- /dev/null +++ b/extras/source/templates/wizard/desktop/idxexample/meta.xml @@ -0,0 +1,13 @@ + + + + LibreOffice/3.7$Linux_x86 LibreOffice_project/720e290-386c48f-abf2002-30b3fc + 1999-12-07T16:24:14 + pista + 2012-08-07T13:45:35 + en-US + 45 + PT1H34M37S + + + diff --git a/extras/source/templates/wizard/desktop/idxexample/mimetype b/extras/source/templates/wizard/desktop/idxexample/mimetype new file mode 100644 index 000000000000..2e95b81c92b0 --- /dev/null +++ b/extras/source/templates/wizard/desktop/idxexample/mimetype @@ -0,0 +1 @@ +application/vnd.oasis.opendocument.text \ No newline at end of file diff --git a/extras/source/templates/wizard/desktop/idxexample/settings.xml b/extras/source/templates/wizard/desktop/idxexample/settings.xml new file mode 100644 index 000000000000..a121f97567aa --- /dev/null +++ b/extras/source/templates/wizard/desktop/idxexample/settings.xml @@ -0,0 +1,24 @@ + + + + + true + true + true + true + false + true + false + true + true + true + true + true + false + false + false + true + false + + + diff --git a/extras/source/templates/wizard/desktop/idxexample/styles.xml b/extras/source/templates/wizard/desktop/idxexample/styles.xml new file mode 100644 index 000000000000..8b86bbcea735 --- /dev/null +++ b/extras/source/templates/wizard/desktop/idxexample/styles.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +