Docs: improved build_lcl_docs robustness when working with TProcess, patch from Reinier Olislagers, bug #22000

git-svn-id: trunk@37267 -
This commit is contained in:
maxim 2012-05-13 14:34:17 +00:00
parent 91ec03f100
commit 9dfbd1029e
2 changed files with 19 additions and 15 deletions

View File

@ -38,19 +38,13 @@
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="10"/>
<Version Value="11"/>
<PathDelim Value="\"/>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<Linking>
<Debugging>
<GenerateDebugInfo Value="True"/>
<DebugInfoType Value="dsAuto"/>
</Debugging>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>

View File

@ -236,7 +236,7 @@ begin
if WarningsCount >= 0 then
WriteLn('Warning! No corresponding xml file for unit ' + FileList[I])
else
Dec(WarningsCount);
Dec(WarningsCount);
end;
end;
FileList.Free;
@ -263,13 +263,23 @@ begin
Halt(1);
end;
Process := TProcess.Create(nil);
Process.Options := Process.Options + [poWaitOnExit];
Process.CurrentDirectory := GetCurrentDir+PathDelim+PackageName;
Process.CommandLine := CmdLine;
Process.Execute;
if WarningsCount < -1 then
WriteLn(abs(WarningsCount+1), ' Warnings hidden. Use --warnings to see them all.') ;
Process.Free;
try
Process.Options := Process.Options + [poWaitOnExit];
Process.CurrentDirectory := GetCurrentDir+PathDelim+PackageName;
Process.CommandLine := CmdLine;
try
Process.Execute;
except
if WarningsCount >= 0 then
WriteLn('Error running fpdoc, command line: '+CmdLine)
else
Dec(WarningsCount);
end;
if WarningsCount < -1 then
WriteLn(abs(WarningsCount+1), ' Warnings hidden. Use --warnings to see them all.');
finally
Process.Free;
end;
end;
begin