Browse Source

* Patch from andrew haines to make generated CHMs searchable

git-svn-id: trunk@12085 -
michael 16 years ago
parent
commit
6b24dc9adc
2 changed files with 6 additions and 0 deletions
  1. 1 0
      utils/fpdoc/dglobals.pp
  2. 5 0
      utils/fpdoc/dw_htmlchm.inc

+ 1 - 0
utils/fpdoc/dglobals.pp

@@ -116,6 +116,7 @@ resourcestring
   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]';

+ 5 - 0
utils/fpdoc/dw_htmlchm.inc

@@ -14,6 +14,7 @@ type
     FIndexName,
     FDefaultPage: String;
     FCSSFile: String;
+    FMakeSearchable,
     FAutoTOC,
     FAutoIndex: Boolean;
     FOtherFiles: String;
@@ -60,6 +61,8 @@ begin
     FChm.FilesToCompress.LoadFromFile(FOtherFiles);
   end;
 
+  FChm.FullTextSearch := FMakeSearchable;
+
 end;
 
 function TCHMHTMLWriter.RetrieveOtherFiles(const DataName: String; out
@@ -492,6 +495,8 @@ begin
     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;