* fpdoc parts of binary support + disable options.

git-svn-id: trunk@13837 -
This commit is contained in:
marco 2009-10-10 18:33:40 +00:00
parent daa4757c92
commit 1b977aa8c9

View File

@ -15,6 +15,8 @@ type
FDefaultPage: String; FDefaultPage: String;
FCSSFile: String; FCSSFile: String;
FMakeSearchable, FMakeSearchable,
FNoBinToc,
FNoBinIndex,
FAutoTOC, FAutoTOC,
FAutoIndex: Boolean; FAutoIndex: Boolean;
FOtherFiles: String; FOtherFiles: String;
@ -238,7 +240,8 @@ begin
end; end;
end; end;
fchm.AppendBinaryTOCFromSiteMap(Toc); if not nobintoc then
fchm.AppendBinaryTOCFromSiteMap(Toc);
TOC.SaveToStream(Stream); TOC.SaveToStream(Stream);
TOC.Free; TOC.Free;
@ -413,6 +416,8 @@ begin
// save // save
Index.SaveToStream(Stream); Index.SaveToStream(Stream);
if not nobinindex then
fchm.AppendBinaryindexFromSitemap(index,false);
Index.Free; Index.Free;
Stream.Position :=0 ; Stream.Position :=0 ;
FChm.AppendIndex(Stream); FChm.AppendIndex(Stream);
@ -450,8 +455,8 @@ begin
FChm.TempRawStream := FTempUncompressed; FChm.TempRawStream := FTempUncompressed;
FChm.OnGetFileData := @RetrieveOtherFiles; FChm.OnGetFileData := @RetrieveOtherFiles;
FChm.OnLastFile := @LastFileAdded; FChm.OnLastFile := @LastFileAdded;
fchm.hasbinarytoc:=true; fchm.hasbinarytoc:=not nobinarytoc;;
fchm.hasbinaryindex:=not nobinaryindex;
ProcessOptions; ProcessOptions;
FileStream := TMemoryStream.Create; FileStream := TMemoryStream.Create;
@ -488,6 +493,8 @@ end;
function TCHMHTMLWriter.InterPretOption(const Cmd, Arg: String): boolean; function TCHMHTMLWriter.InterPretOption(const Cmd, Arg: String): boolean;
begin begin
Result:=True; Result:=True;
FNoBinToc:=False;
FnoBinIndex:=False;
if Cmd = '--toc-file' then if Cmd = '--toc-file' then
FTOCName := arg FTOCName := arg
else if Cmd = '--index-file' then else if Cmd = '--index-file' then
@ -502,6 +509,10 @@ begin
FAutoIndex := True FAutoIndex := True
else if Cmd = '--auto-toc' then else if Cmd = '--auto-toc' then
FAutoTOC := True FAutoTOC := True
else if Cmd = '--no-bintoc' then
FNoBinToc := True
else if Cmd = '--no-binindex' then
FNoBinIndex := True
else if Cmd = '--make-searchable' then else if Cmd = '--make-searchable' then
FMakeSearchable := True FMakeSearchable := True
else else