diff options
-rw-r--r-- | CustomTarget_imagelist.mk | 21 | ||||
-rw-r--r-- | Module_helpcontent2.mk | 1 | ||||
-rw-r--r-- | Package_images.mk | 16 | ||||
-rw-r--r-- | helpers/create_ilst.pl | 3 |
4 files changed, 38 insertions, 3 deletions
diff --git a/CustomTarget_imagelist.mk b/CustomTarget_imagelist.mk index ee42949fe0..b616d4de60 100644 --- a/CustomTarget_imagelist.mk +++ b/CustomTarget_imagelist.mk @@ -9,16 +9,33 @@ $(eval $(call gb_CustomTarget_CustomTarget,helpcontent2/source/auxiliary)) +helpmedia_DIR := $(SRCDIR)/helpcontent2/source + $(eval $(call gb_CustomTarget_register_targets,helpcontent2/source/auxiliary,\ helpimg.ilst \ screenshotimg.ilst \ + images_helpimg.zip \ )) +$(call gb_CustomTarget_get_workdir,helpcontent2/source/auxiliary)/images_helpimg.zip : \ + $(call gb_CustomTarget_get_workdir,helpcontent2/source/auxiliary)/helpimg.ilst \ + $(call gb_CustomTarget_get_workdir,helpcontent2/source/auxiliary)/screenshotimg.ilst \ + $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1) + $(call gb_Helper_abbreviate_dirs, \ + ILSTFILE=$(call var2file,$(shell $(gb_MKTEMP)),100,$(filter %.ilst,$^)) && \ + $(PERL) $(SRCDIR)/solenv/bin/packimages.pl \ + -g $(helpmedia_DIR) -m $(helpmedia_DIR) -c $(helpmedia_DIR) \ + -l $${ILSTFILE} \ + -s $< -o $@ \ + $(if $(findstring s,$(MAKEFLAGS)),> /dev/null) && \ + rm -rf $${ILSTFILE}) + + $(call gb_CustomTarget_get_workdir,helpcontent2/source/auxiliary)/helpimg.ilst : \ $(SRCDIR)/helpcontent2/helpers/create_ilst.pl $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1) $(call gb_Helper_abbreviate_dirs,\ - $(PERL) $< -dir=$(SRCDIR)/icon-themes/galaxy/res/helpimg > $@.out && \ + $(PERL) $< -dir=$(helpmedia_DIR)/media/helpimg -pre=media/helpimg > $@.out && \ mv $@.out $@ \ ) @@ -26,7 +43,7 @@ $(call gb_CustomTarget_get_workdir,helpcontent2/source/auxiliary)/screenshotimg. $(SRCDIR)/helpcontent2/helpers/create_ilst.pl $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1) $(call gb_Helper_abbreviate_dirs,\ - $(PERL) $< -dir=$(SRCDIR)/helpcontent2/source/media/screenshots -pre=media/screenshots > $@.out && \ + $(PERL) $< -dir=$(helpmedia_DIR)/media/screenshots -pre=media/screenshots > $@.out && \ mv $@.out $@ \ ) diff --git a/Module_helpcontent2.mk b/Module_helpcontent2.mk index 3e453f3579..b723b396c4 100644 --- a/Module_helpcontent2.mk +++ b/Module_helpcontent2.mk @@ -11,6 +11,7 @@ $(eval $(call gb_Module_Module,helpcontent2)) $(eval $(call gb_Module_add_targets,helpcontent2,\ CustomTarget_imagelist \ + Package_images \ )) $(eval $(call gb_Module_add_l10n_targets,helpcontent2,\ diff --git a/Package_images.mk b/Package_images.mk new file mode 100644 index 0000000000..eb1b24d17d --- /dev/null +++ b/Package_images.mk @@ -0,0 +1,16 @@ +# -*- 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_Package_Package,postprocess_helpimages,$(call gb_CustomTarget_get_workdir,helpcontent2/source/auxiliary))) + +$(eval $(call gb_Package_add_files,postprocess_helpimages,$(LIBO_SHARE_FOLDER)/config,\ + images_helpimg.zip \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/helpers/create_ilst.pl b/helpers/create_ilst.pl index c6b9789007..b1cd682835 100644 --- a/helpers/create_ilst.pl +++ b/helpers/create_ilst.pl @@ -35,7 +35,8 @@ if ( -d $startdir ) { find(sub{push @files, $File::Find::name if (($File::Find::name=~/\.png$/));},$startdir); foreach ( @files ) { s#.*$startdir_regexp[\\/]##; }; for (sort(@files)) { - ($pre eq "helpimg") ? ($prefix = "%GLOBALRES%/") : ($prefix = "%HELPCONTENT%/"); + # it's now all in one place so no need to distinguish GLOBALRES vs. HELPCONTENT + $prefix = "%MODULE%/"; print "$prefix" . "$pre/$_\n"; } } else { |