View Issue Details

IDProjectCategoryView StatusLast Update
0038340PatchesPatchpublic2021-01-21 22:30
ReporterAndrey Sobol Assigned To 
Status newResolutionopen 
Product Version2.0.10 
Summary0038340: Fixed a footer for chm`s and html pages of the documentation
Description1. Fixed --footer parameter on generation footer for html pages .
    with "@" as prefix the footer included as file.
    without "@" symbol the footer attached as text.
2. In css file for html pages disabled italic style for menu (as was before).
3. Increased footer indent from the main text.

 A result of the fix you can see on attached pictures and generated chm`s

patch attached
TagsNo tags attached.
Fixed in Revision
Attached Files


Andrey Sobol

2021-01-10 14:36


build_lcl_docs_01.patch (4,184 bytes)   
Index: build_lcl_docs.lpr
--- build_lcl_docs.lpr	(revision 64334)
+++ build_lcl_docs.lpr	(working copy)
@@ -22,7 +22,7 @@
   DefaultXCTDir: String;
   DefaultFPDocParams: string = '';
   DefaultOutFormat: string = 'html';
-  DefaultFooterFilename: string = 'locallclfooter.xml'; // ToDo
+  DefaultFooterFilename: string = '@locallclfooter.xml'; // included as file
   TFPDocRunStep = (
@@ -52,6 +52,7 @@
     FFPDocExe: String;
     FIncludePath: string;
     FInputFile: string;
+    FFooterIsFile: Boolean;
     FOptions: TFPDocRunOptions;
     FOutDir: string;
     FOutFormat: String;
@@ -85,6 +86,7 @@
     property Options: TFPDocRunOptions read FOptions write FOptions default DefaultFPDocRunOptions;
     property CSSFile: String read FCSSFile write SetCSSFile;
     property FooterFilename: String read FFooterFilename write SetFooterFilename;
+    property FooterIsFile: Boolean read FFooterIsFile;
     property FPDocExe: String read FFPDocExe write FFPDocExe;
     property IncludePath: string read FIncludePath write SetIncludePath;// semicolon separated search path
     property InputFile: string read FInputFile write SetInputFile; // relative to OutDir, automatically created
@@ -123,8 +125,8 @@
   WriteLn('    --fpdoc <value>    The full path to fpdoc to use. Default is "',DefaultFPDocExe,'"');
   WriteLn('    --fpcdocs <value>  The directory that contains the required .xct files.');
   WriteLn('                       Use this to make help that contains links to rtl and fcl');
-  WriteLn('    --footer <value>   Filename of a file to use a footer used in the generated pages.');
-  WriteLn('                       Default is "'+DefaultFooterFilename+'"');
+  WriteLn('    --footer <value>   Text or filename of a file to use a footer used in the generated pages.');
+  WriteLn('                       Default is "'+DefaultFooterFilename+'". The file name have to be with the "@" as prefix');
   WriteLn('    --help             Show this message');
   WriteLn('    --arg <value>      Passes value to fpdoc as an arg. Use this option as');
   WriteLn('                       many times as needed.');
@@ -239,7 +241,13 @@
 procedure TFPDocRun.SetFooterFilename(AValue: String);
-  AValue:=TrimAndExpandFilename(AValue);
+  if (AValue = '') or (AValue[1] <> '@') then
+    FFooterIsFile:=False
+  else if (AValue[1] = '@') then
+  begin
+    AValue:=TrimAndExpandFilename(Copy(AValue, 2, Length(AValue)));
+    FFooterIsFile:=True;
+  end;
   if FFooterFilename=AValue then Exit;
@@ -347,8 +355,13 @@
       Params.Add('--css-file='+ExtractFileName(CSSFile)); // the css file is copied to the OutDir
-  if (FooterFilename<>'') and FileExistsUTF8(FooterFilename) then
-    Params.Add('--footer='+FooterFilename);
+  if (FooterFilename<>'') then
+  begin
+    if FooterIsFile and FileExistsUTF8(FooterFilename) then
+      Params.Add('--footer=@'+FooterFilename) // included file
+    else
+      Params.Add('--footer='+FooterFilename); // included text
+  end;
   if EnvParams<>'' then
@@ -484,7 +497,7 @@
   if ShowCmd then
-    WriteLn('Exe:',FPDocExe);
+    WriteLn('Exe filename:',FPDocExe);
Index: fpdoc.css
--- fpdoc.css	(revision 64334)
+++ fpdoc.css	(working copy)
@@ -129,7 +129,7 @@
 span.bartitle {
   font-weight: bold;
-  font-style: italic;
+  /*font-style: italic;*/
   color: darkblue
Index: locallclfooter.xml
--- locallclfooter.xml	(revision 64334)
+++ locallclfooter.xml	(working copy)
@@ -1,3 +1,4 @@
 <table cellspacing="0" cellpadding="0" class="bar" width="100%">
 <td valign="top" align="center"><span class="footer">The latest version of this document can be found at </span><a href=""></a><span class="footer">.</span></td>
build_lcl_docs_01.patch (4,184 bytes)   

Don Siders

2021-01-10 17:37

reporter   ~0128249

What happened to backward compatibility as a goal?

IMO, the original issue needs to be addressed... not just masked by arbitrary code changes.

Not in favor of this patch. Period.

Andrey Sobol

2021-01-10 17:43

reporter   ~0128250

Last edited: 2021-01-10 17:47

View 3 revisions

In the code stood TODO, I have done. All last builds by Marco have this bug. discussion,52437.0.html
I don`t see compatibility problems.

Marco van de Voort

2021-01-14 20:56

manager   ~0128323

I don't really pay attention to the footers (as they don't matter for CHM, only for online help).

IMHO this should be omitted for CHM builds.

Andrey Sobol

2021-01-14 21:02

reporter   ~0128324

Last edited: 2021-01-14 21:15

View 2 revisions

I don`t know, that looks well. The Bottom light blue line is need by my opinion.

Don Siders

2021-01-14 22:37

reporter   ~0128328


Just to be clear...

I'm not objecting to "fixing" footer generation in the CHM files. My objection is that it was done by altering the syntax for the fpdoc command line arguments. It wasn't broken in previous fpdoc versions.

The was no need for the change. Fix the code - yes. Change the syntax - No.

I would not discard the footer either. DIscard the Source Forge advertisement, and replace it with "LCL Version n.n.n generated DD-MMM-YYYY".

Andrey Sobol

2021-01-14 22:50

reporter   ~0128329

Last edited: 2021-01-14 22:52

View 2 revisions

Was changed not the fpdoc syntax. Was changed default behavior of the build_lcl_docs. Now it prepares the footer command for the fpdoc correctly. I don`t know who and how had run the final release build before. I see that Marco does builds with that error always. Release version was with ad.
You yourself then do as you want, I don't care

Andrey Sobol

2021-01-14 23:12

reporter   ~0128331

Last edited: 2021-01-17 10:25

View 2 revisions

Who should make the final decision on footer of chm's ?
I have executed the make for check it : make build, result is Ok for any variants.

Juha Manninen

2021-01-19 15:26

developer   ~0128420

Last edited: 2021-01-19 15:27

View 2 revisions

> I'm not objecting to "fixing" footer generation in the CHM files. My objection is that it was done by altering
> the syntax for the fpdoc command line arguments. It wasn't broken in previous fpdoc versions.

Don Siders, what do you mean? The only code change in the patch is for build_lcl_docs in lazarus/docs/html.

> The was no need for the change. Fix the code - yes. Change the syntax - No.

How to fix it properly?

Don Siders

2021-01-21 21:44

reporter   ~0128473


This refers to requiring the '@' symbol in the footer file argument for fpdoc.exe. It did not work that way in 2.8, 3.0, or 3.2.

ffpdoc --footer=@filename.ext was NOT the syntax that worked for those versions.

My point was this changed for no apparent (to me) reason.

Does this really matter? Probably not. I'm not using the trunk compiler. So I can't even test it properly. Given that it'll appear in some distant FPC release, I'll probably be rotting in a grave by then. So. no problem.

As for footers: Even with the changed syntax, they were not generated correctly in the last beta release posted on the forums. If I knew how to fix that, I would post a patch and be done with it.

The content in the footers should not be that hard. Even the RTL and FCL files use generation date. Having a link to your online HTML version isn't bad (assuming it gets updated with new releases), but it doesn't have to be a Source Forge ad either. I would think "View HTML" or "View Online" should be enough.

At this point, I think I've made all of the positive comments I can on the matter.

Andrey Sobol

2021-01-21 22:30

reporter   ~0128474

I think need to exclude the --footer command completely from the build_lcl_docs.exe and default value also. We can use the fpdoc.exe commands through
 the build_lcl_docs.exe the --arg option command if need footer.

Issue History

Date Modified Username Field Change
2021-01-10 14:36 Andrey Sobol New Issue
2021-01-10 14:36 Andrey Sobol File Added: build_lcl_docs_01.patch
2021-01-10 14:36 Andrey Sobol File Added: 2021-01-10 16_29_22-Program Manager.jpg
2021-01-10 17:37 Don Siders Note Added: 0128249
2021-01-10 17:43 Andrey Sobol Note Added: 0128250
2021-01-10 17:46 Andrey Sobol Note Edited: 0128250 View Revisions
2021-01-10 17:47 Andrey Sobol Note Edited: 0128250 View Revisions
2021-01-14 20:56 Marco van de Voort Note Added: 0128323
2021-01-14 21:02 Andrey Sobol Note Added: 0128324
2021-01-14 21:15 Andrey Sobol Note Edited: 0128324 View Revisions
2021-01-14 22:37 Don Siders Note Added: 0128328
2021-01-14 22:50 Andrey Sobol Note Added: 0128329
2021-01-14 22:52 Andrey Sobol Note Edited: 0128329 View Revisions
2021-01-14 23:12 Andrey Sobol Note Added: 0128331
2021-01-17 10:25 Andrey Sobol Note Edited: 0128331 View Revisions
2021-01-19 15:26 Juha Manninen Note Added: 0128420
2021-01-19 15:27 Juha Manninen Note Edited: 0128420 View Revisions
2021-01-21 21:44 Don Siders Note Added: 0128473
2021-01-21 22:30 Andrey Sobol Note Added: 0128474