summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscp2/inc/macros.inc9
-rw-r--r--scp2/macros/macro.pl2
-rw-r--r--scp2/source/base/file_base.scp5
-rw-r--r--scp2/source/calc/file_calc.scp5
-rw-r--r--scp2/source/draw/file_draw.scp5
-rw-r--r--scp2/source/impress/file_impress.scp5
-rw-r--r--scp2/source/math/file_math.scp5
-rw-r--r--scp2/source/ooo/file_ooo.scp14
-rw-r--r--scp2/source/writer/file_writer.scp5
-rw-r--r--solenv/gbuild/AllLangHelp.mk17
-rw-r--r--solenv/gbuild/HelpTarget.mk33
-rw-r--r--solenv/gbuild/TargetLocations.mk1
12 files changed, 46 insertions, 60 deletions
diff --git a/scp2/inc/macros.inc b/scp2/inc/macros.inc
index 7ae0b4ece5b5..6ff795962975 100755
--- a/scp2/inc/macros.inc
+++ b/scp2/inc/macros.inc
@@ -56,6 +56,7 @@
#define READMETXTFILENAME(name,lang,ext) STRING(CONCAT4(name,lang,.,ext))
#define READMEFILENAME(name,lang) STRING(CONCAT2(name,lang))
#define EXTRAFILENAME(name,lang) STRING(CONCAT3(name,lang,.zip))
+#define EXTRAFILELISTNAME(prefix,name,lang) STRING(CONCAT4(prefix,name,lang,.filelist))
#define CONFIGLANGFILENAME(name,lang,ext) STRING(CONCAT4(name,lang,.,ext))
#define SCP2_OOO_BIN_DIR gid_Brand_Dir_Program
@@ -81,13 +82,13 @@
Styles = (ARCHIVE)
#ifdef WITH_HELPPACK_INTEGRATION
-#define ARCHIVE_TXT_FILE_BODY_HELPPACK \
+#define FILELIST_TXT_FILE_BODY_HELPPACK \
TXT_FILE_BODY; \
- Styles = (ARCHIVE,FORCEHELPPACK,LANGUAGEMODULE)
+ Styles = (FILELIST,FORCEHELPPACK,LANGUAGEMODULE)
#else
-#define ARCHIVE_TXT_FILE_BODY_HELPPACK \
+#define FILELIST_TXT_FILE_BODY_HELPPACK \
TXT_FILE_BODY; \
- Styles = (ARCHIVE,HELPPACK,LANGUAGEMODULE)
+ Styles = (FILELIST,HELPPACK,LANGUAGEMODULE)
#endif
#define PACKED_LIB_FILE_BODY \
diff --git a/scp2/macros/macro.pl b/scp2/macros/macro.pl
index dc5d2a978a31..2ad3fad65a88 100644
--- a/scp2/macros/macro.pl
+++ b/scp2/macros/macro.pl
@@ -169,7 +169,7 @@ sub write_EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG
next if ( $poorhelplocalizations{$lang} );
print OUTFILE ";" unless $first;
$first = 0;
- print OUTFILE "\\\n\tName ($lang) = EXTRAFILENAME(name,_$lang)";
+ print OUTFILE "\\\n\tName ($lang) = EXTRAFILELISTNAME(HelpTarget/,name,/$lang)";
}
print OUTFILE "\n\n";
}
diff --git a/scp2/source/base/file_base.scp b/scp2/source/base/file_base.scp
index f684e1d5319c..fb1a23098107 100644
--- a/scp2/source/base/file_base.scp
+++ b/scp2/source/base/file_base.scp
@@ -66,10 +66,9 @@ STD_LIB_FILE( gid_File_Lib_Rptxml, rptxml )
#if defined WITH_HELP
File gid_File_Help_Sdatabase_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(sdatabase);
- Patchfiles = ();
End
#endif
diff --git a/scp2/source/calc/file_calc.scp b/scp2/source/calc/file_calc.scp
index f5985567846f..8f5dfbb2de04 100644
--- a/scp2/source/calc/file_calc.scp
+++ b/scp2/source/calc/file_calc.scp
@@ -71,10 +71,9 @@ STD_RES_FILE( gid_File_Res_Sc, sc )
#if defined WITH_HELP
File gid_File_Help_Scalc_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(scalc);
- Patchfiles = ();
End
#endif
diff --git a/scp2/source/draw/file_draw.scp b/scp2/source/draw/file_draw.scp
index 676112f33285..4b7c4db1ca84 100644
--- a/scp2/source/draw/file_draw.scp
+++ b/scp2/source/draw/file_draw.scp
@@ -36,10 +36,9 @@ End
#if defined WITH_HELP
File gid_File_Help_Sdraw_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(sdraw);
- Patchfiles = ();
End
#endif
diff --git a/scp2/source/impress/file_impress.scp b/scp2/source/impress/file_impress.scp
index 88cbf694d05e..f2eebf041ba6 100644
--- a/scp2/source/impress/file_impress.scp
+++ b/scp2/source/impress/file_impress.scp
@@ -57,10 +57,9 @@ End
#if defined WITH_HELP
File gid_File_Help_Simpress_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(simpress);
- Patchfiles = ();
End
#endif
diff --git a/scp2/source/math/file_math.scp b/scp2/source/math/file_math.scp
index acbb3c9362a7..aa0fcb33b9c5 100644
--- a/scp2/source/math/file_math.scp
+++ b/scp2/source/math/file_math.scp
@@ -52,10 +52,9 @@ End
#if defined WITH_HELP
File gid_File_Help_Smath_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(smath);
- Patchfiles = ();
End
#endif
diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp
index c5b8fc4678e8..8a308d817bf3 100644
--- a/scp2/source/ooo/file_ooo.scp
+++ b/scp2/source/ooo/file_ooo.scp
@@ -396,22 +396,20 @@ End
#if defined WITH_HELP
File gid_File_Help_Common_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(shared);
- Patchfiles = ();
End
File gid_File_Help_Sbasic_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(sbasic);
- Patchfiles = ();
End
File gid_File_Help_Schart_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(schart);
End
#endif
diff --git a/scp2/source/writer/file_writer.scp b/scp2/source/writer/file_writer.scp
index d02047f72354..a7cd9edd7066 100644
--- a/scp2/source/writer/file_writer.scp
+++ b/scp2/source/writer/file_writer.scp
@@ -49,10 +49,9 @@ End
#if defined WITH_HELP
File gid_File_Help_Swriter_Zip
- Dir = gid_Dir_Help_Isolanguage;
- ARCHIVE_TXT_FILE_BODY_HELPPACK;
+ Dir = FILELIST_DIR;
+ FILELIST_TXT_FILE_BODY_HELPPACK;
EXTRA_ALL_GOOD_HELP_LOCALIZATIONS_LANG(swriter);
- Patchfiles = ();
End
#endif
diff --git a/solenv/gbuild/AllLangHelp.mk b/solenv/gbuild/AllLangHelp.mk
index d154de24ba44..16fcc67d9e9b 100644
--- a/solenv/gbuild/AllLangHelp.mk
+++ b/solenv/gbuild/AllLangHelp.mk
@@ -30,7 +30,6 @@ $(or \
endef
gb_AllLangHelp__get_helpname = $(1)/$(2)
-gb_AllLangHelp__get_zipname = $(1)_$(2)
$(dir $(call gb_AllLangHelp_get_target,%)).dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
@@ -45,22 +44,18 @@ $(call gb_AllLangHelp_get_target,%) :
$(call gb_AllLangHelp_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),ALH,5)
$(call gb_Helper_abbreviate_dirs,\
- rm -f $(call gb_AllLangHelp_get_target,$*) $(HELP_DELIVERABLES) \
+ rm -f $(call gb_AllLangHelp_get_target,$*) \
)
-# gb_AllLangHelp_AllLangHelp__one_lang module lang helpname zipname
+# gb_AllLangHelp_AllLangHelp__one_lang module lang helpname
define gb_AllLangHelp_AllLangHelp__one_lang
$(call gb_HelpTarget_HelpTarget,$(3),$(1),$(2))
$(call gb_HelpTarget_set_helpdir,$(3),$(gb_AllLangHelp_HELPDIR))
-$(call gb_HelpTarget_get_outdir_target,$(4)) : $(call gb_HelpTarget_get_target,$(3))
-$(call gb_HelpTarget_get_outdir_target,$(4)) :| $(dir $(call gb_HelpTarget_get_outdir_target,$(4))).dir
-$(call gb_AllLangHelp_get_target,$(1)) : $(call gb_HelpTarget_get_outdir_target,$(4))
$(call gb_AllLangHelp_get_target,$(1)) : $(call gb_HelpTarget_get_target,$(3))
+$(call gb_AllLangHelp_get_target,$(1)) : $(call gb_Package_get_target,$(call gb_HelpTarget_get_packagename,$(3)))
$(call gb_AllLangHelp_get_clean_target,$(1)) : $(call gb_HelpTarget_get_clean_target,$(3))
-$(call gb_AllLangHelp_get_clean_target,$(1)) : HELP_DELIVERABLES += $(call gb_HelpTarget_get_outdir_target,$(4))
-
-$(call gb_Deliver_add_deliverable,$(call gb_HelpTarget_get_outdir_target,$(4)),$(call gb_HelpTarget_get_target,$(3)),$(1))
+$(call gb_AllLangHelp_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(call gb_HelpTarget_get_packagename,$(3)))
endef
@@ -68,11 +63,9 @@ endef
#
# gb_AllLangHelp_AllLangHelp module
define gb_AllLangHelp_AllLangHelp
-$(call gb_AllLangHelp_get_clean_target,$(1)) : HELP_DELIVERABLES :=
-
$(foreach lang,$(gb_AllLangHelp_LANGS),\
$(if $(call gb_AllLangHelp__translation_exists,$(lang)),\
- $(call gb_AllLangHelp_AllLangHelp__one_lang,$(1),$(lang),$(call gb_AllLangHelp__get_helpname,$(1),$(lang)),$(call gb_AllLangHelp__get_zipname,$(1),$(lang)))))
+ $(call gb_AllLangHelp_AllLangHelp__one_lang,$(1),$(lang),$(call gb_AllLangHelp__get_helpname,$(1),$(lang)))))
$(call gb_AllLangHelp_get_target,$(1)) :| $(dir $(call gb_AllLangHelp_get_target,$(1))).dir
diff --git a/solenv/gbuild/HelpTarget.mk b/solenv/gbuild/HelpTarget.mk
index 70ff4ca124a9..5606fc048d3d 100644
--- a/solenv/gbuild/HelpTarget.mk
+++ b/solenv/gbuild/HelpTarget.mk
@@ -477,11 +477,13 @@ endef
# class HelpTarget
# Creates one language version of a help module.
+#
+# Provides a filelist called HelpTarget/<name>, that is not built by
+# default (i.e., the user of HelpTarget has to explicitly depend on the
+# Package).
gb_HelpTarget_DEFAULT_LANG := en-US
-gb_HelpTarget_COMMAND := zip
-
gb_HelpTarget__get_module = $(patsubst %/$(call gb_HelpTarget__get_lang,$(1)),%,$(1))
gb_HelpTarget__get_lang = $(lastword $(subst /, ,$(1)))
gb_HelpTarget__test_default_lang = $(filter $(gb_HelpTarget_DEFAULT_LANG),$(1))
@@ -508,11 +510,9 @@ $(if $(call gb_HelpTarget__is_default_lang,$(1)) \
)
endef
-define gb_HelpTarget__get_command
+define gb_HelpTarget__command
$(call gb_Output_announce,$(2),$(true),HLP,4)
-cd $(call gb_HelpTarget_get_workdir,$(2)) && \
-$(gb_HelpJarTarget_COMMAND) -q -0 -rX --filesync --must-match $(1) \
- $(HELP_PACK_FILES)
+touch $@
endef
$(dir $(call gb_HelpTarget_get_target,%)).dir :
@@ -532,7 +532,7 @@ $(call gb_HelpTarget_get_linked_target,%) :
touch $@
$(call gb_HelpTarget_get_target,%) :
- $(call gb_HelpTarget__get_command,$@,$*)
+ $(call gb_HelpTarget__command,$@,$*)
.PHONY : $(call gb_HelpTarget_get_clean_target,%)
$(call gb_HelpTarget_get_clean_target,%) :
@@ -545,6 +545,8 @@ $(call gb_HelpTarget_get_clean_target,%) :
$(call gb_HelpTarget_get_workdir,$*) \
)
+gb_HelpTarget_get_packagename = HelpTarget/$(1)
+
# Create a help target.
#
# depend on makefile to re-build filelist when files are removed
@@ -552,28 +554,29 @@ $(call gb_HelpTarget_get_clean_target,%) :
# gb_HelpTarget_HelpTarget target module lang
define gb_HelpTarget_HelpTarget
$(call gb_HelpTarget_get_target,$(1)) : HELP_MODULE := $(2)
-$(call gb_HelpTarget_get_target,$(1)) : HELP_INDEXED :=
$(call gb_HelpTarget_get_target,$(1)) : HELP_LANG := $(3)
-$(call gb_HelpTarget_get_target,$(1)) : HELP_PACK_FILES :=
$(call gb_HelpTarget_get_translation_target,$(1)) : HELP_FILES :=
$(call gb_HelpTarget_get_translation_target,$(1)) : $(gb_Module_CURRENTMAKEFILE)
-$(call gb_HelpTarget__HelpTarget_impl,$(1),$(2),$(3),$(call gb_HelpTarget_get_workdir,$(1)))
+$(call gb_HelpTarget__HelpTarget_impl,$(1),$(2),$(3),$(call gb_HelpTarget_get_workdir,$(1)),$(call gb_HelpTarget_get_packagename,$(1)))
endef
-# gb_HelpTarget__HelpTarget_impl target module lang workdir
+# gb_HelpTarget__HelpTarget_impl target module lang workdir package
define gb_HelpTarget__HelpTarget_impl
$(if $(call gb_HelpTarget__test_default_lang,$(3)),,$(call gb_HelpTarget__HelpTarget_impl_lang,$(1),$(2),$(3),$(4)))
$(call gb_HelpLinkTarget_HelpLinkTarget,$(1),$(2),$(3),$(4))
$(call gb_HelpIndexTarget_HelpIndexTarget,$(1),$(2),$(3),$(4))
$(call gb_HelpJarTarget_HelpJarTarget,$(1),$(2),$(4))
+$(call gb_Package_Package_internal,$(5),$(4))
+$(call gb_Package_set_outdir,$(5),$(INSTDIR))
$(call gb_HelpTarget_get_linked_target,$(1)) : $(call gb_HelpTarget_get_translation_target,$(1))
$(call gb_HelpLinkTarget_get_target,$(1)) : $(call gb_HelpTarget_get_linked_target,$(1))
$(call gb_HelpLinkTarget_get_target,$(1)) :| $(call gb_HelpTarget_get_workdir,$(1))/.dir
$(call gb_HelpTarget_get_target,$(1)) : $(call gb_HelpLinkTarget_get_target,$(1))
+$(call gb_Package_get_preparation_target,$(5)) : $(call gb_HelpTarget_get_target,$(1))
$(call gb_HelpTarget_get_linked_target,$(1)) :| $(dir $(call gb_HelpTarget_get_linked_target,$(1))).dir
$(call gb_HelpTarget_get_target,$(1)) :| $(dir $(call gb_HelpTarget_get_target,$(1))).dir
@@ -596,16 +599,16 @@ $(call gb_HelpTarget_get_clean_target,$(1)) : $(call gb_HelpTreeTarget_get_clean
endef
-# Add index files into the zip.
+# Get list of the various index files.
#
# gb_HelpTarget__add_index_files target module
define gb_HelpTarget__get_index_files
-$(foreach suffix,.db .ht .idxl .key,$(addsuffix $(suffix),$(call gb_HelpTarget__get_module,$(1))))
+$(foreach suffix,.db .ht .idxl/_0.cfs .idxl/segments_3 .idxl/segments.gen .key,$(addsuffix $(suffix),$(call gb_HelpTarget__get_module,$(1))))
endef
# gb_HelpTarget__add_file target file
define gb_HelpTarget__add_file
-$(call gb_HelpTarget_get_target,$(1)) : HELP_PACK_FILES += $(2)
+$(call gb_Package_add_file,$(call gb_HelpTarget_get_packagename,$(1)),help/$(call gb_HelpTarget__get_lang,$(1))/$(2),$(2))
endef
@@ -644,8 +647,6 @@ define gb_HelpTarget_set_indexed
$(call gb_HelpLinkTarget_set_indexed,$(1),$(call gb_HelpTarget__get_index_files,$(1)))
$(foreach file,$(call gb_HelpTarget__get_index_files,$(1)),$(call gb_HelpTarget__add_file,$(1),$(file)))
-$(call gb_HelpTarget_get_target,$(1)) : HELP_INDEXED := $(true)
-
$(call gb_HelpIndexTarget_get_target,$(1)) : $(call gb_HelpLinkTarget_get_target,$(1))
$(call gb_HelpTarget_get_target,$(1)) : $(call gb_HelpIndexTarget_get_target,$(1))
$(call gb_HelpTarget_get_clean_target,$(1)) : $(call gb_HelpIndexTarget_get_clean_target,$(1))
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index f56d9b24f4e1..5338fd37a87b 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -36,7 +36,6 @@ gb_Dictionary_get_target = $(OUTDIR)/pck/$(1).oxt
gb_Executable_get_target = $(OUTDIR)/bin/$(1)$(gb_Executable_EXT)
gb_Executable_get_target_for_build = $(OUTDIR_FOR_BUILD)/bin/$(1)$(gb_Executable_EXT_for_build)
gb_Extension_get_target = $(OUTDIR)/bin/$(1).oxt
-gb_HelpTarget_get_outdir_target = $(OUTDIR)/pck/$(1).zip
gb_Pagein_get_outdir_target = $(OUTDIR)/bin/pagein-$(1)
gb_PackagePart_get_destinations = \
$(INSTDIR) \