mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-21 10:19:35 +01:00
* Fixed build_lcl_docs to include files in the lcl subfolders recursively
* Added --make-searchable to default fpdoc options when the format is chm git-svn-id: trunk@21630 -
This commit is contained in:
parent
c023781b29
commit
ad18ccca04
@ -20,7 +20,7 @@ htmldocs: build_lcl_docs
|
|||||||
./$< --outfmt html
|
./$< --outfmt html
|
||||||
|
|
||||||
chmdocs: build_lcl_docs
|
chmdocs: build_lcl_docs
|
||||||
./$< --outfmt chm --arg --make-searchable
|
./$< --outfmt chm
|
||||||
|
|
||||||
build_lcl_docs: build_lcl_docs.lpi build_lcl_docs.lpr
|
build_lcl_docs: build_lcl_docs.lpi build_lcl_docs.lpr
|
||||||
ifeq (${LAZBUILD},)
|
ifeq (${LAZBUILD},)
|
||||||
|
|||||||
@ -7,5 +7,5 @@ REM 1 - Please fix the path in this file for your installation
|
|||||||
REM 2 - Before running this file, first compile the project build_lcl_docs.lpi
|
REM 2 - Before running this file, first compile the project build_lcl_docs.lpi
|
||||||
REM
|
REM
|
||||||
PATH=D:\programming\fpc\bin\i386-win32\
|
PATH=D:\programming\fpc\bin\i386-win32\
|
||||||
build_lcl_docs.exe --outfmt chm --arg --make-searchable
|
build_lcl_docs.exe --outfmt chm
|
||||||
pause
|
pause
|
||||||
|
|||||||
@ -2,17 +2,18 @@
|
|||||||
<CONFIG>
|
<CONFIG>
|
||||||
<ProjectOptions>
|
<ProjectOptions>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<Version Value="6"/>
|
<Version Value="7"/>
|
||||||
<General>
|
<General>
|
||||||
|
<Flags>
|
||||||
|
<LRSInOutputDirectory Value="False"/>
|
||||||
|
</Flags>
|
||||||
|
<SessionStorage Value="InProjectDir"/>
|
||||||
<MainUnit Value="0"/>
|
<MainUnit Value="0"/>
|
||||||
<TargetFileExt Value=".exe"/>
|
<TargetFileExt Value=".exe"/>
|
||||||
<Title Value="build_lcl_docs"/>
|
<Title Value="build_lcl_docs"/>
|
||||||
<ActiveEditorIndexAtStart Value="0"/>
|
|
||||||
</General>
|
</General>
|
||||||
<VersionInfo>
|
<VersionInfo>
|
||||||
<ProjectVersion Value=""/>
|
<ProjectVersion Value=""/>
|
||||||
<Language Value=""/>
|
|
||||||
<CharSet Value=""/>
|
|
||||||
</VersionInfo>
|
</VersionInfo>
|
||||||
<PublishOptions>
|
<PublishOptions>
|
||||||
<Version Value="2"/>
|
<Version Value="2"/>
|
||||||
@ -23,7 +24,7 @@
|
|||||||
<RunParams>
|
<RunParams>
|
||||||
<local>
|
<local>
|
||||||
<FormatVersion Value="1"/>
|
<FormatVersion Value="1"/>
|
||||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
|
||||||
</local>
|
</local>
|
||||||
</RunParams>
|
</RunParams>
|
||||||
<Units Count="1">
|
<Units Count="1">
|
||||||
@ -31,46 +32,14 @@
|
|||||||
<Filename Value="build_lcl_docs.lpr"/>
|
<Filename Value="build_lcl_docs.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="build_lcl_docs"/>
|
<UnitName Value="build_lcl_docs"/>
|
||||||
<CursorPos X="19" Y="258"/>
|
|
||||||
<TopLine Value="231"/>
|
|
||||||
<EditorIndex Value="0"/>
|
|
||||||
<UsageCount Value="20"/>
|
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit0>
|
</Unit0>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="3" HistoryIndex="2">
|
|
||||||
<Position1>
|
|
||||||
<Filename Value="build_lcl_docs.lpr"/>
|
|
||||||
<Caret Line="10" Column="1" TopLine="1"/>
|
|
||||||
</Position1>
|
|
||||||
<Position2>
|
|
||||||
<Filename Value="build_lcl_docs.lpr"/>
|
|
||||||
<Caret Line="168" Column="12" TopLine="144"/>
|
|
||||||
</Position2>
|
|
||||||
<Position3>
|
|
||||||
<Filename Value="build_lcl_docs.lpr"/>
|
|
||||||
<Caret Line="11" Column="6" TopLine="1"/>
|
|
||||||
</Position3>
|
|
||||||
</JumpHistory>
|
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="5"/>
|
<Version Value="8"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<CodeGeneration>
|
|
||||||
<Generate Value="Faster"/>
|
|
||||||
</CodeGeneration>
|
|
||||||
<Other>
|
<Other>
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
</Other>
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Debugging>
|
|
||||||
<Exceptions Count="2">
|
|
||||||
<Item1>
|
|
||||||
<Name Value="ECodetoolError"/>
|
|
||||||
</Item1>
|
|
||||||
<Item2>
|
|
||||||
<Name Value="EFOpenError"/>
|
|
||||||
</Item2>
|
|
||||||
</Exceptions>
|
|
||||||
</Debugging>
|
|
||||||
</CONFIG>
|
</CONFIG>
|
||||||
|
|||||||
@ -145,21 +145,33 @@ begin
|
|||||||
if OutFormat='chm' then
|
if OutFormat='chm' then
|
||||||
begin
|
begin
|
||||||
ArgParams:=ArgParams+' --output='+ ChangeFileExt(PackageName, '.chm')
|
ArgParams:=ArgParams+' --output='+ ChangeFileExt(PackageName, '.chm')
|
||||||
+' --auto-toc --auto-index'
|
+' --auto-toc --auto-index --make-searchable'
|
||||||
+' --css-file=..'+PathDelim+'fpdoc.css ';
|
+' --css-file=..'+PathDelim+'fpdoc.css ';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ArgParams:=ArgParams+' --format='+OutFormat+' ';
|
ArgParams:=ArgParams+' --format='+OutFormat+' ';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure AddFilesToList(Ext: String; List: TStrings);
|
procedure AddFilesToList(Dir: String; Ext: String; List: TStrings);
|
||||||
var
|
var
|
||||||
FRec: TSearchRec;
|
FRec: TSearchRec;
|
||||||
Res: Longint;
|
Res: Longint;
|
||||||
|
SubDirs: String; // we dont want the PasSrcDir in this string but the subfolders only
|
||||||
begin
|
begin
|
||||||
Res := FindFirst(PasSrcDir+'*.'+Ext, faAnyFile, FRec);
|
Res := FindFirst(Dir+'*', faAnyFile, FRec);
|
||||||
while Res = 0 do begin
|
while Res = 0 do begin
|
||||||
List.Add(FRec.Name);
|
//WriteLn('Checking file ' +FRec.Name);
|
||||||
|
if ((FRec.Attr and faDirectory) <> 0) and (FRec.Name[1] <> '.')then
|
||||||
|
begin
|
||||||
|
AddFilesToList(IncludeTrailingPathDelimiter(Dir)+FRec.Name, Ext, List);
|
||||||
|
//WriteLn('Checking Subfolder ',Dir+ FRec.Name);
|
||||||
|
end
|
||||||
|
else if Lowercase(ExtractFileExt(FRec.Name)) = Ext then
|
||||||
|
begin
|
||||||
|
SubDirs := IncludeTrailingPathDelimiter(Copy(Dir, Length(PasSrcDir)+1, Length(Dir)));
|
||||||
|
List.Add(SubDirs+FRec.Name);
|
||||||
|
|
||||||
|
end;
|
||||||
Res := FindNext(FRec);
|
Res := FindNext(FRec);
|
||||||
end;
|
end;
|
||||||
FindClose(FRec);
|
FindClose(FRec);
|
||||||
@ -198,16 +210,18 @@ var
|
|||||||
begin
|
begin
|
||||||
FileList := TStringList.Create;
|
FileList := TStringList.Create;
|
||||||
InputList := TStringList.Create;
|
InputList := TStringList.Create;
|
||||||
AddFilesToList('pas', FileList);
|
AddFilesToList(PasSrcDir, '.pas', FileList);
|
||||||
AddFilesToList('pp', FileList);
|
AddFilesToList(PasSrcDir, '.pp', FileList);
|
||||||
|
|
||||||
FileList.Sort;
|
FileList.Sort;
|
||||||
for I := 0 to FileList.Count-1 do
|
for I := 0 to FileList.Count-1 do
|
||||||
begin
|
begin
|
||||||
InputList.Add('..'+PathDelim+PasSrcDir+FileList[I] + ' -Fi..'+PathDelim+PasSrcDir+'include');
|
|
||||||
XMLFile := XMLSrcDir+ChangeFileExt(FileList[I],'.xml');
|
XMLFile := XMLSrcDir+ChangeFileExt(FileList[I],'.xml');
|
||||||
if FileExists(PackageName+PathDelim+XMLFile) then
|
if FileExists(PackageName+PathDelim+XMLFile) then
|
||||||
ArgParams:=ArgParams+' --descr='+XMLSrcDir+ChangeFileExt(FileList[I],'.xml')
|
begin
|
||||||
|
InputList.Add('..'+PathDelim+PasSrcDir+FileList[I] + ' -Fi..'+PathDelim+PasSrcDir+'include');
|
||||||
|
ArgParams:=ArgParams+' --descr='+XMLSrcDir+ChangeFileExt(FileList[I],'.xml');
|
||||||
|
end
|
||||||
else
|
else
|
||||||
WriteLn('Warning! No corresponding xml file for unit ' + FileList[I]);
|
WriteLn('Warning! No corresponding xml file for unit ' + FileList[I]);
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user