mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 05:19:37 +02:00
parent
bfe57b0263
commit
e9026c1c8a
@ -1,20 +1,22 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<CONFIG>
|
<CONFIG>
|
||||||
<ProjectOptions>
|
<ProjectOptions>
|
||||||
|
<Version Value="9"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<Version Value="7"/>
|
|
||||||
<General>
|
<General>
|
||||||
<Flags>
|
<Flags>
|
||||||
<LRSInOutputDirectory Value="False"/>
|
<LRSInOutputDirectory Value="False"/>
|
||||||
</Flags>
|
</Flags>
|
||||||
<SessionStorage Value="InProjectDir"/>
|
<SessionStorage Value="InProjectDir"/>
|
||||||
<MainUnit Value="0"/>
|
<MainUnit Value="0"/>
|
||||||
<TargetFileExt Value=".exe"/>
|
|
||||||
<Title Value="build_lcl_docs"/>
|
<Title Value="build_lcl_docs"/>
|
||||||
</General>
|
</General>
|
||||||
<VersionInfo>
|
<VersionInfo>
|
||||||
<ProjectVersion Value=""/>
|
<StringTable ProductVersion=""/>
|
||||||
</VersionInfo>
|
</VersionInfo>
|
||||||
|
<BuildModes Count="1">
|
||||||
|
<Item1 Name="default" Default="True"/>
|
||||||
|
</BuildModes>
|
||||||
<PublishOptions>
|
<PublishOptions>
|
||||||
<Version Value="2"/>
|
<Version Value="2"/>
|
||||||
<IgnoreBinaries Value="False"/>
|
<IgnoreBinaries Value="False"/>
|
||||||
@ -36,8 +38,19 @@
|
|||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="8"/>
|
<Version Value="10"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
|
<Parsing>
|
||||||
|
<SyntaxOptions>
|
||||||
|
<UseAnsiStrings Value="False"/>
|
||||||
|
</SyntaxOptions>
|
||||||
|
</Parsing>
|
||||||
|
<Linking>
|
||||||
|
<Debugging>
|
||||||
|
<GenerateDebugInfo Value="True"/>
|
||||||
|
<DebugInfoType Value="dsAuto"/>
|
||||||
|
</Debugging>
|
||||||
|
</Linking>
|
||||||
<Other>
|
<Other>
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
</Other>
|
</Other>
|
||||||
|
@ -18,6 +18,7 @@ var
|
|||||||
ShowCmd: Boolean;
|
ShowCmd: Boolean;
|
||||||
RTLPrefix: String;
|
RTLPrefix: String;
|
||||||
FCLPrefix: String;
|
FCLPrefix: String;
|
||||||
|
WarningsCount: Integer;
|
||||||
|
|
||||||
const
|
const
|
||||||
PackageName = 'lcl';
|
PackageName = 'lcl';
|
||||||
@ -49,6 +50,7 @@ begin
|
|||||||
WriteLn(' many times as needed.');
|
WriteLn(' many times as needed.');
|
||||||
WriteLn(' --outfmt html|chm Use value as the format fpdoc will use. Default is "html"');
|
WriteLn(' --outfmt html|chm Use value as the format fpdoc will use. Default is "html"');
|
||||||
WriteLn(' --showcmd Print the command that would be run instead if running it.');
|
WriteLn(' --showcmd Print the command that would be run instead if running it.');
|
||||||
|
WriteLn(' --warnings Show warnings while working.');
|
||||||
WriteLn;
|
WriteLn;
|
||||||
WriteLn('The following are Environment variables that will override the above params if set:');
|
WriteLn('The following are Environment variables that will override the above params if set:');
|
||||||
WriteLn(' FPDOCFORMAT, FPDOCPARAMS, FPDOC, FPDOCFOOTER, FPCDOCS, RTLLINKPREFIX, FCLLINKPREFIX');
|
WriteLn(' FPDOCFORMAT, FPDOCPARAMS, FPDOC, FPDOCFOOTER, FPCDOCS, RTLLINKPREFIX, FCLLINKPREFIX');
|
||||||
@ -63,7 +65,7 @@ var
|
|||||||
OptIndex: Longint;
|
OptIndex: Longint;
|
||||||
begin
|
begin
|
||||||
ShowCmd := False;
|
ShowCmd := False;
|
||||||
|
WarningsCount:=-1;
|
||||||
SetLength(Options, 10);
|
SetLength(Options, 10);
|
||||||
|
|
||||||
Options[0].Name:='help';
|
Options[0].Name:='help';
|
||||||
@ -78,8 +80,9 @@ begin
|
|||||||
Options[5].Has_arg:=1;
|
Options[5].Has_arg:=1;
|
||||||
Options[6].Name:='footer';
|
Options[6].Name:='footer';
|
||||||
Options[6].Has_arg:=1;
|
Options[6].Has_arg:=1;
|
||||||
|
Options[7].Name:='warnings';
|
||||||
repeat
|
repeat
|
||||||
c := GetLongOpts('help:arg:fpdoc:outfmt:showcmd:fpcdocs:footer', @Options[0], OptIndex);
|
c := GetLongOpts('help:arg:fpdoc:outfmt:showcmd:fpcdocs:footer:warnings', @Options[0], OptIndex);
|
||||||
case c of
|
case c of
|
||||||
#0:
|
#0:
|
||||||
begin
|
begin
|
||||||
@ -92,6 +95,7 @@ begin
|
|||||||
4: ShowCmd := True;
|
4: ShowCmd := True;
|
||||||
5: FPCDocsPath := OptArg;
|
5: FPCDocsPath := OptArg;
|
||||||
6: fpdocfooter := OptArg;
|
6: fpdocfooter := OptArg;
|
||||||
|
7: WarningsCount:=0;
|
||||||
else
|
else
|
||||||
WriteLn('Unknown Value: ', OptIndex);
|
WriteLn('Unknown Value: ', OptIndex);
|
||||||
end;
|
end;
|
||||||
@ -99,7 +103,7 @@ begin
|
|||||||
'?': PrintHelp;
|
'?': PrintHelp;
|
||||||
EndOfOptions: Break;
|
EndOfOptions: Break;
|
||||||
else
|
else
|
||||||
WriteLn('UNknown option ', c, ' ', ord(c), ' ',OptArg);
|
WriteLn('Unknown option ', c, ' ', ord(c), ' ',OptArg);
|
||||||
end;
|
end;
|
||||||
until c = EndOfOptions;
|
until c = EndOfOptions;
|
||||||
end;
|
end;
|
||||||
@ -166,12 +170,14 @@ begin
|
|||||||
//WriteLn('Checking file ' +FRec.Name);
|
//WriteLn('Checking file ' +FRec.Name);
|
||||||
if ((FRec.Attr and faDirectory) <> 0) and (FRec.Name[1] <> '.')then
|
if ((FRec.Attr and faDirectory) <> 0) and (FRec.Name[1] <> '.')then
|
||||||
begin
|
begin
|
||||||
AddFilesToList(IncludeTrailingPathDelimiter(Dir)+FRec.Name, Ext, List);
|
AddFilesToList(IncludeTrailingPathDelimiter(Dir+FRec.Name), Ext, List);
|
||||||
//WriteLn('Checking Subfolder ',Dir+ FRec.Name);
|
//WriteLn('Checking Subfolder ',Dir+ FRec.Name);
|
||||||
end
|
end
|
||||||
else if Lowercase(ExtractFileExt(FRec.Name)) = Ext then
|
else if Lowercase(ExtractFileExt(FRec.Name)) = Ext then
|
||||||
begin
|
begin
|
||||||
SubDirs := IncludeTrailingPathDelimiter(Copy(Dir, Length(PasSrcDir)+1, Length(Dir)));
|
SubDirs := IncludeTrailingPathDelimiter(Copy(Dir, Length(PasSrcDir)+1, Length(Dir)));
|
||||||
|
if Length(SubDirs) = 1 then
|
||||||
|
SubDirs:='';
|
||||||
List.Add(SubDirs+FRec.Name);
|
List.Add(SubDirs+FRec.Name);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
@ -226,7 +232,12 @@ begin
|
|||||||
ArgParams:=ArgParams+' --descr='+XMLSrcDir+ChangeFileExt(FileList[I],'.xml');
|
ArgParams:=ArgParams+' --descr='+XMLSrcDir+ChangeFileExt(FileList[I],'.xml');
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
WriteLn('Warning! No corresponding xml file for unit ' + FileList[I]);
|
begin
|
||||||
|
if WarningsCount >= 0 then
|
||||||
|
WriteLn('Warning! No corresponding xml file for unit ' + FileList[I])
|
||||||
|
else
|
||||||
|
Dec(WarningsCount);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
FileList.Free;
|
FileList.Free;
|
||||||
InputList.SaveToFile(PackageName+PathDelim+InputFileList);
|
InputList.SaveToFile(PackageName+PathDelim+InputFileList);
|
||||||
@ -256,6 +267,8 @@ begin
|
|||||||
Process.CurrentDirectory := GetCurrentDir+PathDelim+PackageName;
|
Process.CurrentDirectory := GetCurrentDir+PathDelim+PackageName;
|
||||||
Process.CommandLine := CmdLine;
|
Process.CommandLine := CmdLine;
|
||||||
Process.Execute;
|
Process.Execute;
|
||||||
|
if WarningsCount < -1 then
|
||||||
|
WriteLn(abs(WarningsCount+1), ' Warnings hidden. Use --warnings to see them all.') ;
|
||||||
Process.Free;
|
Process.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user