office-gobmx/extras
Christian Lohmaier 2fd72ed9cb makefile simplification: cleanup template packaging mess
the tmplate packaging code was full of copy'n'paste code with little
understanding on how the rules actually work/what the statements
actually do. (e.g. using separate calls to addprefix can be a matter
of taste, but adding the call to get the extra files each time is
pointless and just adds the same set of files multiple times).

Unifying the fixed list of files and standardizing the base path for the
relative filenames further allows to streamline the recipes

Change-Id: I814fdb6f6534a9d5046281c45b6da87110f2093e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169342
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-06-28 12:56:49 +02:00
..
source tdf#92029 AutoCorrect: correct 's and 't in Dutch to apostrophe 2024-06-27 23:07:29 +02:00
util
AllLangPackage_autotextshare.mk
CustomTarget_autocorr.mk
CustomTarget_autotextshare.mk
CustomTarget_autotextuser.mk
CustomTarget_gallsystem.mk
CustomTarget_glade.mk
CustomTarget_opensymbol.mk
CustomTarget_templates.mk makefile simplification: cleanup template packaging mess 2024-06-28 12:56:49 +02:00
Gallery_backgrounds.mk
Gallery_sound.mk
Makefile
Module_extras.mk makefile simplification: cleanup template packaging mess 2024-06-28 12:56:49 +02:00
Package_autocorr.mk
Package_autotextuser.mk
Package_cfgsrvnolang.mk
Package_cfgusr.mk
Package_database.mk
Package_databasebiblio.mk
Package_fonts.mk
Package_gallbullets.mk
Package_gallmytheme.mk
Package_gallroot.mk
Package_gallsystem.mk
Package_gallsystemstr.mk
Package_glade.mk
Package_labels.mk
Package_newfiles.mk
Package_palettes.mk
Package_resource_fonts.mk
Package_templates.mk
Package_tplpresnt.mk
Package_tplwizard.mk
Package_tplwizbitmap.mk
Package_tplwizdesktop.mk tdf#161173 Replace HTML template and idxexample 2024-06-12 10:42:19 +02:00
Package_wordbook.mk
Personas.mk
README.md makefile simplification: cleanup template packaging mess 2024-06-28 12:56:49 +02:00
template_files.mk makefile simplification: cleanup template packaging mess 2024-06-28 12:56:49 +02:00

Extra Modules

Contains templates, clipart galleries, palettes, symbol font, autocorrections, autotexts etc.

  • How-to add a new gallery:

    • create a directory extras/source/gallery/foo/
    • create a .str file extras/source/gallery/foo/foo.str
    • add a foo section to extras/source/gallery/share/gallery_names.ulf
    • add a Gallery_foo.mk at the top-level (and mention in Module_extra.mk)
    • add a new GALLERY_FILELIST statement in scp2/
  • How-to add a new autotext category

    • create a directory extras/source/autotext/lang/xx/foo/ where xx is your lang code. xx must exactly fit with an UI lang code.
    • unzip your foo.bau autotext file in this directory (excluding an empty mimetype file)
    • add xx/foo.bau in extras/AllLangPackage_autotextshare.mk
    • in extras/CustomTarget_autotextshare.mk:
      • add all files contained in foo.bau (except mimetype) in extras_AUTOTEXTSHARE_XMLFILES
  • How-to add a new autotext to an existing category

    • create a directory extras/source/autotext/lang/xx/standard/FOO/ to add it in category standard of lang xx
    • add files of the autotext (at least FOO.xml for an unformatted autotext)
    • add autotext name in extras/source/autotext/lang/xx/standard/BlockList.xml
    • add all files of autotext in extras/source/autotext/lang/xx/standard/META-INF/manifest.xml
    • in extras/CustomTarget_autotextshare.mk:
      • add all files of autotext in extras_AUTOTEXTSHARE_XMLFILES
  • How-to add a new template category

    • add long category name in TEMPLATE_LONG_NAMES_ARY in sfx2/inc/doctempl.hrc
    • add short category name in TEMPLATE_SHORT_NAMES_ARY in sfx2/source/doc/doctemplates.cxx
  • How-to add a new template to an existing category

    • clean-up template file as indicated on wiki https://wiki.documentfoundation.org/Documentation/HowTo/Impress/Make_template_language_independent
    • recommendation for settings.xml are given on wiki https://wiki.documentfoundation.org/Documentation/CompatibilityFlags#Settings_to_include_in_a_new_template
    • add <dc:title>Foo</dc:title> in meta.xml to make presentation name translatable
    • choose a template category <Category>
    • unzip Foo.ot? (? = p, t, s or g) in extras/source/templates/<Category>/Foo (no space allowed in any file names)
    • add <Category>/Foo.ot? / in Package_templates.mk (or Package_tplpresnt.mk if it's a presentation)
    • in template_files.mk:
      • add e.g. <Category>/Foo/settings.xml (and all other files which are not automatically added) to extra_files_COMMON (or extra_files_PRESENTATIONS in case of a presentation template)
    • for translation of template name
      • define a new STR_TEMPLATE_NAMExx in include/sfx2/strings.hrc
      • define a new STR_TEMPLATE_NAMExx_DEF in sfx2/inc/strings.hxx
      • in sfx2/source/doc/doctempl.cxx
        • add STR_TEMPLATE_NAMExx_DEF to aTemplateNames
        • add STR_TEMPLATE_NAMExx to STR_TEMPLATE_NAME