hi attached is a patch to add the option --make-searchable to fpdoc for the chm target

It can take some time to index all the documents in the rtl for example.

Regards,

Andrew

Index: dw_htmlchm.inc
===================================================================
--- dw_htmlchm.inc  (revision 11973)
+++ dw_htmlchm.inc  (working copy)
@@ -14,6 +14,7 @@
     FIndexName,
     FDefaultPage: String;
     FCSSFile: String;
+    FMakeSearchable,
     FAutoTOC,
     FAutoIndex: Boolean;
     FOtherFiles: String;
@@ -60,6 +61,8 @@
     FChm.FilesToCompress.LoadFromFile(FOtherFiles);
   end;
 
+  FChm.FullTextSearch := FMakeSearchable;
+
 end;
 
 function TCHMHTMLWriter.RetrieveOtherFiles(const DataName: String; out
@@ -492,6 +495,8 @@
     FAutoIndex := True
   else if Cmd = '--auto-toc' then
     FAutoTOC := True
+  else if Cmd = '--make-searchable' then
+    FMakeSearchable := True
   else
     Result:=inherited InterPretOption(Cmd, Arg);
 end;
Index: dglobals.pp
===================================================================
--- dglobals.pp (revision 11973)
+++ dglobals.pp (working copy)
@@ -116,6 +116,7 @@
   SCHMUsageCSSFile = 'Filename of a .css file to be included in the chm.';
   SCHMUsageAutoTOC = 'Automatically generate a Table of Contents. Ignores --toc-file';
   SCHMUsageAutoIDX = 'Automatically generate an Index. Ignores --index-file';
+  SCHMUsageMakeSearch = 'Automatically generate a Search Index from filenames that match *.htm*';
 
   STitle           = 'FPDoc - Free Pascal Documentation Tool';
   SVersion         = 'Version %s [%s]';
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to