Selaa lähdekoodia

Merged revisions 12085 via svnmerge from
svn+ssh://svn.freepascal.org/FPC/svn/fpc/trunk

........
r12085 | michael | 2008-11-14 11:33:43 +0100 (Fri, 14 Nov 2008) | 1 line

* Patch from andrew haines to make generated CHMs searchable
........

git-svn-id: branches/fixes_2_2@12086 -

michael 17 vuotta sitten
vanhempi
commit
c23f9f0654
2 muutettua tiedostoa jossa 6 lisäystä ja 0 poistoa
  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;