added option compiler: keeping fpc summary in messages

git-svn-id: trunk@6704 -
This commit is contained in:
mattias 2005-01-27 19:36:46 +00:00
parent 948a215e46
commit 6d6e590885
5 changed files with 66 additions and 13 deletions

View File

@ -924,6 +924,7 @@ begin
ShowCompProc := XMLConfigFile.GetValue(p+'Verbosity/ShowCompProc/Value', false);
ShowCond := XMLConfigFile.GetValue(p+'Verbosity/ShowCond/Value', false);
ShowNothing := XMLConfigFile.GetValue(p+'Verbosity/ShowNothing/Value', false);
ShowSummary := XMLConfigFile.GetValue(p+'Verbosity/ShowSummary/Value', false);
ShowHintsForUnusedUnitsInMainSrc := XMLConfigFile.GetValue(p+'Verbosity/ShowHintsForUnusedUnitsInMainSrc/Value', false);
WriteFPCLogo := XMLConfigFile.GetValue(p+'WriteFPCLogo/Value', true);
StopAfterErrCount := XMLConfigFile.GetValue(p+'ConfigFile/StopAfterErrCount/Value', 1);
@ -1064,6 +1065,7 @@ begin
XMLConfigFile.SetDeleteValue(p+'Verbosity/ShowCompProc/Value', ShowCompProc,false);
XMLConfigFile.SetDeleteValue(p+'Verbosity/ShowCond/Value', ShowCond,false);
XMLConfigFile.SetDeleteValue(p+'Verbosity/ShowNothing/Value', ShowNothing,false);
XMLConfigFile.SetDeleteValue(p+'Verbosity/ShowSummary/Value', ShowSummary,false);
XMLConfigFile.SetDeleteValue(p+'Verbosity/ShowHintsForUnusedUnitsInMainSrc/Value', ShowHintsForUnusedUnitsInMainSrc,false);
XMLConfigFile.SetDeleteValue(p+'WriteFPCLogo/Value', WriteFPCLogo,true);
XMLConfigFile.SetDeleteValue(p+'ConfigFile/StopAfterErrCount/Value', StopAfterErrCount,1);
@ -1960,6 +1962,7 @@ begin
fShowCompProc := false;
fShowCond := false;
fShowNothing := false;
fShowSummary := false;
fShowHintsForUnusedUnitsInMainSrc := false;
fWriteFPCLogo := true;
fStopAfterErrCount := 1;
@ -2062,6 +2065,7 @@ begin
fShowCompProc := CompOpts.fShowCompProc;
fShowCond := CompOpts.fShowCond;
fShowNothing := CompOpts.fShowNothing;
fShowSummary := CompOpts.FShowSummary;
fShowHintsForUnusedUnitsInMainSrc := CompOpts.fShowHintsForUnusedUnitsInMainSrc;
fWriteFPCLogo := CompOpts.fWriteFPCLogo;
fStopAfterErrCount := CompOpts.fStopAfterErrCount;
@ -2153,6 +2157,7 @@ begin
and (fShowCompProc = CompOpts.fShowCompProc)
and (fShowCond = CompOpts.fShowCond)
and (fShowNothing = CompOpts.fShowNothing)
and (fShowSummary = CompOpts.fShowSummary)
and (fShowHintsForUnusedUnitsInMainSrc = CompOpts.fShowHintsForUnusedUnitsInMainSrc)
and (fWriteFPCLogo = CompOpts.fWriteFPCLogo)

View File

@ -157,6 +157,7 @@ type
chkGeneralInfo: TCheckBox;
chkLineNumbers: TCheckBox;
chkEverything: TCheckBox;
chkShowSummary: TCheckBox;
chkAllProcsOnError: TCheckBox;
chkDebugInfo: TCheckBox;
chkUsedFiles: TCheckBox;
@ -729,6 +730,7 @@ begin
chkCompiledProc.Checked := Options.ShowCompProc;
chkConditionals.Checked := Options.ShowCond;
chkNothing.Checked := Options.ShowNothing;
chkShowSummary.Checked := Options.ShowSummary;
chkHintsForUnusedUnitsInMainSrc.Checked :=
Options.ShowHintsForUnusedUnitsInMainSrc;
@ -982,6 +984,7 @@ begin
Options.ShowCompProc := chkCompiledProc.Checked;
Options.ShowCond := chkConditionals.Checked;
Options.ShowNothing := chkNothing.Checked;
Options.ShowSummary := chkShowSummary.Checked;
Options.ShowHintsForUnusedUnitsInMainSrc :=
chkHintsForUnusedUnitsInMainSrc.Checked;
@ -1807,7 +1810,7 @@ begin
Parent := MsgPage;
Top := 10;
Left := 10;
Height := 212;
Height := 235;
Width := Self.ClientWidth-28;
Caption := dlgVerbosity;
end;
@ -1899,6 +1902,17 @@ begin
Width := chkErrors.Width;
end;
chkShowSummary := TCheckBox.Create(Self);
with chkShowSummary do
begin
Parent := grpVerbosity;
Caption := dlgShowSummary+' (none)';
Top := 174;
Left := chkErrors.Left;
Height := chkErrors.Height;
Width := chkErrors.Width;
end;
chkDebugInfo := TCheckBox.Create(Self);
with chkDebugInfo do
begin
@ -1991,7 +2005,7 @@ begin
begin
Parent := grpVerbosity;
Caption := dlgHintsUnused+' (none)';
Top := 174;
Top := 195;
Left := ChkErrors.Left;
Height := ChkErrors.Height;
Width := chkDebugInfo.Width*2;

View File

@ -947,17 +947,18 @@ resourcestring
dlgShowWarnings = 'Show Warnings';
dlgShowNotes = 'Show Notes';
dlgShowHint = 'Show Hints';
dlgShowGeneralInfo = 'Show General Info';
dlgShowGeneralInfo = 'Show general info';
dlgShowProcsError = 'Show all procs on error';
dlgShowEverything ='Show Everything';
dlgShowDebugInfo = 'Show Debug Info';
dlgShowUsedFiles = 'Show Used Files';
dlgShowTriedFiles = 'Show Tried Files';
dlgShowDefinedMacros = 'Show Defined Macros';
dlgShowCompiledProcedures = 'Show Compiled Procedures';
dlgShowConditionals = 'Show Conditionals';
dlgShowNothing = 'Show Nothing (only errors)';
dlgWriteFPCLogo = 'Write an FPC Logo';
dlgShowEverything ='Show everything';
dlgShowSummary ='Show summary';
dlgShowDebugInfo = 'Show debug info';
dlgShowUsedFiles = 'Show used files';
dlgShowTriedFiles = 'Show tried files';
dlgShowDefinedMacros = 'Show defined macros';
dlgShowCompiledProcedures = 'Show compiled procedures';
dlgShowConditionals = 'Show conditionals';
dlgShowNothing = 'Show nothing (only errors)';
dlgWriteFPCLogo = 'Write an FPC logo';
dlgHintsUnused = 'Show Hints for unused units in main source';
dlgConfigFiles = 'Config Files:';
dlgUseFpcCfg = 'Use standard Compiler Config File (fpc.cfg)';

View File

@ -368,6 +368,14 @@ var i, j, FilenameEndPos: integer;
if Result then inc(p);
end;
function CheckForString(const Str: string; var p: integer;
const Find: string): boolean;
begin
Result:=(p+length(Find)-1<=length(Str))
and (CompareText(Find,copy(s,p,length(Find)))=0);
if Result then inc(p,length(Find));
end;
function CheckForLineProgress: boolean;
var
p: Integer;
@ -381,8 +389,26 @@ var i, j, FilenameEndPos: integer;
if not CheckForNumber(s,p) then exit;
if not CheckForChar(s,p,' ') then exit;
Result:=true;
// I don't think it should be kept: DoAddFilteredLine(s);
end;
function CheckForLinesCompiled: boolean;
var
p: Integer;
begin
Result:=false;
p:=1;
if not CheckForNumber(s,p) then exit;
if not CheckForString(s,p,' Lines compiled, ') then exit;
if not CheckForNumber(s,p) then exit;
if not CheckForChar(s,p,'.') then exit;
if not CheckForNumber(s,p) then exit;
if not CheckForChar(s,p,' ') then exit;
Result:=true;
if CompilerOptions.ShowAll or CompilerOptions.ShowSummary then;
DoAddFilteredLine(s);
end;
begin
Result:=false;
if s='' then exit;
@ -398,9 +424,12 @@ begin
// check for 'Note: '
Result:=CheckForNoteMessages;
if Result then exit;
// check for '<line> <kb>/<kb> Kb Free'
// check for '<line> <kb>/<kb>'...
Result:=CheckForLineProgress;
if Result then exit;
// check for '<int> Lines compiled, <int>.<int> sec'
Result:=CheckForLinesCompiled;
if Result then exit;
// search for round bracket open
i:=1;

View File

@ -45,6 +45,8 @@ type
cgcSmallerCode
);
{ TLazCompilerOptions }
TLazCompilerOptions = class(TPersistent)
private
FOnModified: TNotifyEvent;
@ -125,6 +127,7 @@ type
fShowCompProc: Boolean;
fShowCond: Boolean;
fShowNothing: Boolean;
fShowSummary: Boolean;
fShowHintsForUnusedUnitsInMainSrc: Boolean;
fWriteFPCLogo: Boolean;
fStopAfterErrCount: integer;
@ -232,6 +235,7 @@ type
property ShowCompProc: Boolean read fShowCompProc write fShowCompProc;
property ShowCond: Boolean read fShowCond write fShowCond;
property ShowNothing: Boolean read fShowNothing write fShowNothing;
property ShowSummary: Boolean read FShowSummary write FShowSummary;
property ShowHintsForUnusedUnitsInMainSrc: Boolean
read fShowHintsForUnusedUnitsInMainSrc write fShowHintsForUnusedUnitsInMainSrc;
property WriteFPCLogo: Boolean read fWriteFPCLogo write fWriteFPCLogo;