summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Repository.mk110
-rw-r--r--postprocess/CustomTarget_images.mk14
-rw-r--r--solenv/bin/packimages.pl29
-rw-r--r--solenv/gbuild/AllLangResTarget.mk5
-rw-r--r--solenv/gbuild/Helper.mk17
5 files changed, 151 insertions, 24 deletions
diff --git a/Repository.mk b/Repository.mk
index 858be897a19d..a6b691214abf 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -908,4 +908,114 @@ $(eval $(call gb_ExternalExecutable_register_executables,\
xsltproc \
))
+# Resources
+$(eval $(call gb_Helper_register_resources,\
+ abp \
+ acc \
+ analysis \
+ avmedia \
+ $(call gb_Helper_optional,SCRIPTING,basctl) \
+ $(call gb_Helper_optional,DBCONNECTIVITY,bib) \
+ chartcontroller \
+ cnr \
+ cui \
+ date \
+ $(call gb_Helper_optional,DBCONNECTIVITY,\
+ dba \
+ dbmm \
+ dbp \
+ dbu \
+ ) \
+ dbw \
+ deployment \
+ deploymentgui \
+ dkt \
+ editeng \
+ eps \
+ eur \
+ for \
+ forui \
+ fps_office \
+ frm \
+ fwe \
+ gal \
+ imp \
+ ofa \
+ $(call gb_Helper_optional,DBCONNECTIVITY,pcr) \
+ pdffilter \
+ pricing \
+ rpt \
+ rptui \
+ $(call gb_Helper_optional,SCRIPTING,sb) \
+ sc \
+ scn \
+ sd \
+ sdbcl \
+ sdberr \
+ $(call gb_Helper_optional,DBCONNECTIVITY,sdbt) \
+ sfx \
+ sm \
+ $(if $(ENABLE_COINMP)$(ENABLE_LPSOLVE),solver) \
+ svl \
+ svt \
+ svx \
+ sw \
+ t602filter \
+ tpl \
+ upd \
+ $(if $(ENABLE_ONLINE_UPDATE),updchk) \
+ uui \
+ vcl \
+ writerperfect \
+ wzi \
+ xmlsec \
+ xsltdlg \
+))
+
+# UI configuration
+$(eval $(call gb_Helper_register_uiconfigs,\
+ cui \
+ $(call gb_Helper_optional,DBCONNECTIVITY,dbaccess) \
+ desktop \
+ filter \
+ formula \
+ fps \
+ $(call gb_Helper_optional,SCRIPTING,modules/BasicIDE) \
+ $(call gb_Helper_optional,DBCONNECTIVITY,\
+ modules/dbapp \
+ modules/dbbrowser \
+ modules/dbquery \
+ modules/dbrelation \
+ ) \
+ modules/dbreport \
+ $(call gb_Helper_optional,DBCONNECTIVITY,\
+ modules/dbtable \
+ modules/dbtdata \
+ ) \
+ modules/sabpilot \
+ $(call gb_Helper_optional,DBCONNECTIVITY,modules/sbibliography) \
+ modules/scalc \
+ modules/scanner \
+ modules/schart \
+ modules/sdraw \
+ modules/sglobal \
+ modules/simpress \
+ modules/smath \
+ $(call gb_Helper_optional,DBCONNECTIVITY,modules/spropctrlr) \
+ modules/StartModule \
+ modules/sweb \
+ modules/swform \
+ modules/swreport \
+ modules/swriter \
+ modules/swxform \
+ sfx \
+ svt \
+ svx \
+ $(if $(ENABLE_TELEPATHY),tubes) \
+ uui \
+ vcl \
+ writerperfect \
+ xmlsec \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/postprocess/CustomTarget_images.mk b/postprocess/CustomTarget_images.mk
index 333e9943ffec..55bc715b10b3 100644
--- a/postprocess/CustomTarget_images.mk
+++ b/postprocess/CustomTarget_images.mk
@@ -29,24 +29,20 @@ $(packimages_DIR)/%.zip : \
$(packimages_DIR)/commandimagelist.ilst \
$(call gb_Helper_optional,HELP,$(helpimages_DIR)/helpimg.ilst) \
$(call gb_Helper_optional,DBCONNECTIVITY,$(if $(ENABLE_JAVA),$(SRCDIR)/connectivity/source/drivers/hsqldb/hsqlui.ilst)) \
- $(call gb_Postprocess_get_target,AllResources) \
- $(call gb_Postprocess_get_target,AllUIConfigs)
+ $(call gb_Helper_get_imagelists)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
$(call gb_Helper_abbreviate_dirs, \
+ ILSTFILE=$(call var2file,$(shell $(gb_MKTEMP)),100,$(filter %.ilst,$^)) && \
$(PERL) $(SRCDIR)/solenv/bin/packimages.pl \
$(if $(DEFAULT_THEME),\
-g $(packimages_DIR) -m $(packimages_DIR) -c $(packimages_DIR),\
-g $(SRCDIR)/icon-themes/$(subst images_,,$*) -m $(SRCDIR)/icon-themes/$(subst images_,,$*) -c $(SRCDIR)/icon-themes/$(subst images_,,$*) \
) \
$(INDUSTRIAL_FALLBACK) \
- $(call gb_Helper_optional,HELP,-l $(helpimages_DIR) ) \
- -l $(packimages_DIR) \
- -l $(dir $(call gb_ResTarget_get_imagelist_target)) \
- -l $(dir $(call gb_UIConfig_get_imagelist_target)) \
- -l $(dir $(call gb_UIConfig_get_imagelist_target,modules/)) \
- $(call gb_Helper_optional,DBCONNECTIVITY,$(if $(ENABLE_JAVA),-l $(SRCDIR)/connectivity/source/drivers/hsqldb)) \
+ -l $${ILSTFILE} \
-s $< -o $@ \
- $(if $(findstring s,$(MAKEFLAGS)),> /dev/null))
+ $(if $(findstring s,$(MAKEFLAGS)),> /dev/null) && \
+ rm -rf $${ILSTFILE})
# commandimagelist.ilst and sorted.lst are phony to rebuild everything each time
.PHONY : $(packimages_DIR)/commandimagelist.ilst $(packimages_DIR)/sorted.lst
diff --git a/solenv/bin/packimages.pl b/solenv/bin/packimages.pl
index dc33ddebd038..e9875b5bdc54 100644
--- a/solenv/bin/packimages.pl
+++ b/solenv/bin/packimages.pl
@@ -43,7 +43,7 @@ my $global_path; # path to global images directory
my $module_path; # path to module images directory
my $sort_file; # path to file containing sorting data
my @custom_path; # path to custom images directory
-my @imagelist_path; # paths to directories containing the image lists
+my $imagelist_file; # file containing list of image list files
my $verbose; # be verbose
my $extra_verbose; # be extra verbose
my $do_rebuild = 0; # is rebuilding zipfile required?
@@ -116,12 +116,12 @@ sub parse_options
'-s=s' => \$sort_file,
'-m=s' => \$module_path,
'-c=s' => \@custom_path_list,
- '-l=s' => \@imagelist_path,
+ '-l=s' => \$imagelist_file,
'-v' => \$verbose,
'-vv' => \$extra_verbose
);
if ( $opt_help || !$success || !$out_file || !$global_path
- || !$module_path || !@custom_path_list || !@imagelist_path )
+ || !$module_path || !@custom_path_list || !$imagelist_file )
{
usage();
exit(1);
@@ -134,7 +134,8 @@ sub parse_options
my $out_dir = dirname($out_file);
# Check paths.
- foreach ($out_dir, $global_path, $module_path, @imagelist_path) {
+ print_error("no such file '$_'", 2) if ! -f $imagelist_file;
+ foreach ($out_dir, $global_path, $module_path) {
print_error("no such directory: '$_'", 2) if ! -d $_;
print_error("can't search directory: '$_'", 2) if ! -x $_;
}
@@ -158,17 +159,15 @@ sub parse_options
sub get_image_lists
{
my @image_lists;
- my $glob_imagelist_path;
- foreach ( @imagelist_path ) {
- $glob_imagelist_path = $_;
- # cygwin perl
- chomp( $glob_imagelist_path = qx{cygpath -u "$glob_imagelist_path"} ) if "$^O" eq "cygwin";
- push @image_lists, glob("$glob_imagelist_path/*.ilst");
- }
- if ( !@image_lists ) {
- print_error("can't find any image lists in '@imagelist_path'", 3);
+ open (my $fh, $imagelist_file) or die "cannot open imagelist file $imagelist_file\n";
+ while (<$fh>) {
+ chomp;
+ next if /^\s*$/;
+ my @ilsts = split ' ';
+ push @image_lists, @ilsts;
}
+ close $fh;
return wantarray ? @image_lists : \@image_lists;
}
@@ -420,7 +419,7 @@ sub replace_file
sub usage
{
- print STDERR "Usage: packimages.pl [-h] -o out_file -g g_path -m m_path -c c_path -l imagelist_path\n";
+ print STDERR "Usage: packimages.pl [-h] -o out_file -g g_path -m m_path -c c_path -l imagelist_file\n";
print STDERR "Creates archive of images\n";
print STDERR "Options:\n";
print STDERR " -h print this help\n";
@@ -429,7 +428,7 @@ sub usage
print STDERR " -m m_path path to module images directory\n";
print STDERR " -c c_path path to custom images directory\n";
print STDERR " -s sort_file path to image sort order file\n";
- print STDERR " -l imagelist_path path to directory containing image lists (may appear mutiple times)\n";
+ print STDERR " -l imagelist_file file containing list of image list files\n";
print STDERR " -v verbose\n";
print STDERR " -vv very verbose\n";
}
diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk
index 433a5cd4f85f..905fee435071 100644
--- a/solenv/gbuild/AllLangResTarget.mk
+++ b/solenv/gbuild/AllLangResTarget.mk
@@ -364,4 +364,9 @@ $(foreach lang,$(gb_AllLangResTarget_LANGS),\
endef
+define gb_AllLangResTarget_get_imagelists
+$(foreach lang,$(gb_AllLangResTarget_LANGS),\
+ $(call gb_ResTarget_get_imagelist_target,$(1)$(lang)))
+endef
+
# vim: set noet sw=4:
diff --git a/solenv/gbuild/Helper.mk b/solenv/gbuild/Helper.mk
index da6a9afe4ec9..4e914d16cc67 100644
--- a/solenv/gbuild/Helper.mk
+++ b/solenv/gbuild/Helper.mk
@@ -239,6 +239,23 @@ gb_Package_MODULE_$(1) += $(2)
endef
+# TODO: this should be extended to handle auto-installation.
+define gb_Helper_register_resources
+gb_AllLangResTarget_REGISTERED += $(1)
+
+endef
+
+# TODO: this should be extended to handle auto-installation.
+define gb_Helper_register_uiconfigs
+gb_UIConfig_REGISTERED += $(1)
+
+endef
+
+define gb_Helper_get_imagelists
+$(foreach res,$(gb_AllLangResTarget_REGISTERED),$(call gb_AllLangResTarget_get_imagelists,$(res))) \
+$(foreach ui,$(gb_UIConfig_REGISTERED),$(call gb_UIConfig_get_imagelist_target,$(ui)))
+endef
+
# call gb_Helper_replace_if_different_and_touch,source,target,optional-touch-reference-file
define gb_Helper_replace_if_different_and_touch
if cmp -s $(1) $(2); then rm $(1); \