do not create index for shared help module
Change-Id: I83f9b99abcc952dfea924662a0db8d98efc56307
This commit is contained in:
parent
b12d5e12a6
commit
cfe0fbb039
@ -59,6 +59,7 @@ public:
|
|||||||
HelpLinker()
|
HelpLinker()
|
||||||
: m_pIndexerPreProcessor(NULL)
|
: m_pIndexerPreProcessor(NULL)
|
||||||
, m_bUseLangRoot(true)
|
, m_bUseLangRoot(true)
|
||||||
|
, m_bCreateIndex(true)
|
||||||
{}
|
{}
|
||||||
~HelpLinker()
|
~HelpLinker()
|
||||||
{ delete m_pIndexerPreProcessor; }
|
{ delete m_pIndexerPreProcessor; }
|
||||||
@ -84,6 +85,7 @@ private:
|
|||||||
fs::path indexDirParentName;
|
fs::path indexDirParentName;
|
||||||
IndexerPreProcessor* m_pIndexerPreProcessor;
|
IndexerPreProcessor* m_pIndexerPreProcessor;
|
||||||
bool m_bUseLangRoot;
|
bool m_bUseLangRoot;
|
||||||
|
bool m_bCreateIndex;
|
||||||
void initIndexerPreProcessor();
|
void initIndexerPreProcessor();
|
||||||
void link() throw( HelpProcessingException );
|
void link() throw( HelpProcessingException );
|
||||||
void addBookmark( FILE* pFile_DBHelp, std::string thishid,
|
void addBookmark( FILE* pFile_DBHelp, std::string thishid,
|
||||||
|
@ -398,6 +398,9 @@ void HelpLinker::link() throw( HelpProcessingException )
|
|||||||
throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
|
throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!m_bCreateIndex)
|
||||||
|
continue;
|
||||||
|
|
||||||
std::string documentPath = streamTable.document_path;
|
std::string documentPath = streamTable.document_path;
|
||||||
if (documentPath.find("/") == 0)
|
if (documentPath.find("/") == 0)
|
||||||
documentPath = documentPath.substr(1);
|
documentPath = documentPath.substr(1);
|
||||||
@ -736,6 +739,8 @@ void HelpLinker::main( std::vector<std::string> &args,
|
|||||||
}
|
}
|
||||||
else if (args[i].compare("-nolangroot") == 0)
|
else if (args[i].compare("-nolangroot") == 0)
|
||||||
m_bUseLangRoot = false;
|
m_bUseLangRoot = false;
|
||||||
|
else if (args[i].compare("-noindex") == 0)
|
||||||
|
m_bCreateIndex = false;
|
||||||
else
|
else
|
||||||
helpFiles.push_back(args[i]);
|
helpFiles.push_back(args[i]);
|
||||||
++i;
|
++i;
|
||||||
|
@ -155,6 +155,7 @@ endef
|
|||||||
# gb_AllLangHelp__use_linked_module module other-module lang
|
# gb_AllLangHelp__use_linked_module module other-module lang
|
||||||
define gb_AllLangHelp__use_linked_module
|
define gb_AllLangHelp__use_linked_module
|
||||||
$(call gb_HelpTarget_use_linked_module,$(call gb_AllLangHelp__get_helpname,$(1),$(3)),$(call gb_AllLangHelp__get_helpname,$(2),$(3)))
|
$(call gb_HelpTarget_use_linked_module,$(call gb_AllLangHelp__get_helpname,$(1),$(3)),$(call gb_AllLangHelp__get_helpname,$(2),$(3)))
|
||||||
|
$(call gb_HelpTarget_set_indexed,$(call gb_AllLangHelp__get_helpname,$(1),$(3)))
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -262,6 +262,7 @@ $(call gb_Output_announce,$(2),$(true),HLK,3)
|
|||||||
RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),100,\
|
RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),100,\
|
||||||
-lang $(HELP_LANG) \
|
-lang $(HELP_LANG) \
|
||||||
-mod $(HELP_MODULE) \
|
-mod $(HELP_MODULE) \
|
||||||
|
$(if $(HELP_INDEXED),,-noindex) \
|
||||||
-nolangroot \
|
-nolangroot \
|
||||||
-o $(WORKDIR)/dummy.zip \
|
-o $(WORKDIR)/dummy.zip \
|
||||||
-src $(HELP_SRCDIR) \
|
-src $(HELP_SRCDIR) \
|
||||||
@ -314,6 +315,7 @@ $(call gb_HelpLinkTarget_get_target,$(1)) : HELP_ADD_FILES :=
|
|||||||
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_CONFIGDIR :=
|
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_CONFIGDIR :=
|
||||||
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_EXTRA_ADD_FILES :=
|
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_EXTRA_ADD_FILES :=
|
||||||
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_FILES :=
|
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_FILES :=
|
||||||
|
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_INDEXED :=
|
||||||
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_MODULE := $(2)
|
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_MODULE := $(2)
|
||||||
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_LANG := $(3)
|
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_LANG := $(3)
|
||||||
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_LINKED_MODULES :=
|
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_LINKED_MODULES :=
|
||||||
@ -346,6 +348,12 @@ $(call gb_HelpLinkTarget_get_target,$(1)) : $(2)
|
|||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
# gb_HelpLinkTarget_set_indexed target
|
||||||
|
define gb_HelpLinkTarget_set_indexed
|
||||||
|
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_INDEXED := $(true)
|
||||||
|
|
||||||
|
endef
|
||||||
|
|
||||||
# gb_HelpLinkTarget_add_helpfile target helpfile
|
# gb_HelpLinkTarget_add_helpfile target helpfile
|
||||||
define gb_HelpLinkTarget_add_helpfile
|
define gb_HelpLinkTarget_add_helpfile
|
||||||
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_FILES += $(2)
|
$(call gb_HelpLinkTarget_get_target,$(1)) : HELP_FILES += $(2)
|
||||||
@ -568,12 +576,9 @@ $(call gb_HelpIndexTarget_HelpIndexTarget,$(1),$(2),$(3),$(4))
|
|||||||
$(call gb_HelpJarTarget_HelpJarTarget,$(1),$(2),$(4))
|
$(call gb_HelpJarTarget_HelpJarTarget,$(1),$(2),$(4))
|
||||||
$(call gb_Zip_Zip_internal_nodeliver,$(call gb_HelpTarget_get_zipname,$(1)),$(4))
|
$(call gb_Zip_Zip_internal_nodeliver,$(call gb_HelpTarget_get_zipname,$(1)),$(4))
|
||||||
|
|
||||||
$(call gb_HelpTarget__add_initial_files,$(1),$(2),$(4))
|
|
||||||
|
|
||||||
$(call gb_HelpLinkTarget_get_preparation_target,$(1)) : $(call gb_HelpTarget_get_translation_target,$(1))
|
$(call gb_HelpLinkTarget_get_preparation_target,$(1)) : $(call gb_HelpTarget_get_translation_target,$(1))
|
||||||
$(call gb_HelpLinkTarget_get_target,$(1)) :| $(call gb_HelpTarget_get_workdir,$(1))/.dir
|
$(call gb_HelpLinkTarget_get_target,$(1)) :| $(call gb_HelpTarget_get_workdir,$(1))/.dir
|
||||||
$(call gb_HelpIndexTarget_get_target,$(1)) : $(call gb_HelpLinkTarget_get_target,$(1))
|
$(call gb_HelpTarget_get_packing_target,$(1)) : $(call gb_HelpLinkTarget_get_target,$(1))
|
||||||
$(call gb_HelpTarget_get_packing_target,$(1)) : $(call gb_HelpIndexTarget_get_target,$(1))
|
|
||||||
$(call gb_Zip_get_target,$(call gb_HelpTarget_get_zipname,$(1))) : $(call gb_HelpTarget_get_packing_target,$(1))
|
$(call gb_Zip_get_target,$(call gb_HelpTarget_get_zipname,$(1))) : $(call gb_HelpTarget_get_packing_target,$(1))
|
||||||
$(call gb_HelpTarget_get_target,$(1)) : $(call gb_Zip_get_target,$(call gb_HelpTarget_get_zipname,$(1)))
|
$(call gb_HelpTarget_get_target,$(1)) : $(call gb_Zip_get_target,$(call gb_HelpTarget_get_zipname,$(1)))
|
||||||
|
|
||||||
@ -582,7 +587,6 @@ $(call gb_HelpTarget_get_target,$(1)) :| $(dir $(call gb_HelpTarget_get_target,$
|
|||||||
$(call gb_HelpTarget_get_translation_target,$(1)) :| $(dir $(call gb_HelpTarget_get_translation_target,$(1))).dir
|
$(call gb_HelpTarget_get_translation_target,$(1)) :| $(dir $(call gb_HelpTarget_get_translation_target,$(1))).dir
|
||||||
|
|
||||||
$(call gb_HelpTarget_get_clean_target,$(1)) : $(call gb_HelpLinkTarget_get_clean_target,$(1))
|
$(call gb_HelpTarget_get_clean_target,$(1)) : $(call gb_HelpLinkTarget_get_clean_target,$(1))
|
||||||
$(call gb_HelpTarget_get_clean_target,$(1)) : $(call gb_HelpIndexTarget_get_clean_target,$(1))
|
|
||||||
$(call gb_HelpTarget_get_clean_target,$(1)) : $(call gb_Zip_get_clean_target,$(call gb_HelpTarget_get_zipname,$(1)))
|
$(call gb_HelpTarget_get_clean_target,$(1)) : $(call gb_Zip_get_clean_target,$(call gb_HelpTarget_get_zipname,$(1)))
|
||||||
|
|
||||||
endef
|
endef
|
||||||
@ -600,10 +604,10 @@ $(call gb_HelpTarget_get_clean_target,$(1)) : $(call gb_HelpTreeTarget_get_clean
|
|||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Add always-present files into the zip.
|
# Add index files into the zip.
|
||||||
#
|
#
|
||||||
# gb_HelpTarget__add_initial_files target module workdir
|
# gb_HelpTarget__add_index_files target module
|
||||||
define gb_HelpTarget__add_initial_files
|
define gb_HelpTarget__add_index_files
|
||||||
$(call gb_HelpTarget__add_file,$(1),$(2).db)
|
$(call gb_HelpTarget__add_file,$(1),$(2).db)
|
||||||
$(call gb_HelpTarget__add_file,$(1),$(2).ht)
|
$(call gb_HelpTarget__add_file,$(1),$(2).ht)
|
||||||
$(call gb_HelpTarget__add_file,$(1),$(2).idxl/segments.gen)
|
$(call gb_HelpTarget__add_file,$(1),$(2).idxl/segments.gen)
|
||||||
@ -643,6 +647,19 @@ $(call gb_HelpTarget__add_file,$(1),$(call gb_HelpTarget__get_module,$(1)).tree)
|
|||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
# Produce full text search index, bookmark list, etc.
|
||||||
|
#
|
||||||
|
# gb_HelpTarget_set_indexed target
|
||||||
|
define gb_HelpTarget_set_indexed
|
||||||
|
$(call gb_HelpLinkTarget_set_indexed,$(1))
|
||||||
|
$(call gb_HelpTarget__add_index_files,$(1),$(call gb_HelpTarget__get_module,$(1)))
|
||||||
|
|
||||||
|
$(call gb_HelpIndexTarget_get_target,$(1)) : $(call gb_HelpLinkTarget_get_target,$(1))
|
||||||
|
$(call gb_HelpTarget_get_packing_target,$(1)) : $(call gb_HelpIndexTarget_get_target,$(1))
|
||||||
|
$(call gb_HelpTarget_get_clean_target,$(1)) : $(call gb_HelpIndexTarget_get_clean_target,$(1))
|
||||||
|
|
||||||
|
endef
|
||||||
|
|
||||||
# gb_HelpTarget__add_jar target
|
# gb_HelpTarget__add_jar target
|
||||||
define gb_HelpTarget__add_jar
|
define gb_HelpTarget__add_jar
|
||||||
$(call gb_HelpTarget__add_file,$(1),$(call gb_HelpTarget__get_module,$(1)).jar)
|
$(call gb_HelpTarget__add_file,$(1),$(call gb_HelpTarget__get_module,$(1)).jar)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user