mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-20 12:19:31 +02:00
IDE: clean up
git-svn-id: trunk@29742 -
This commit is contained in:
parent
bee4293381
commit
20860be566
@ -920,12 +920,12 @@ function SplitFPCVersion(const FPCVersionString: string;
|
||||
out FPCVersion, FPCRelease, FPCPatch: integer): boolean;
|
||||
function ParseFPCVerbose(List: TStrings; // fpc -va output
|
||||
out ConfigFiles: TStrings; // prefix '-' for file not found, '+' for found and read
|
||||
out CompilerFilename: string; // what compiler is used by fpc
|
||||
out RealCompilerFilename: string; // what compiler is used by fpc
|
||||
out UnitPaths: TStrings; // unit search paths
|
||||
out Defines, Undefines: TStringToStringTree): boolean;
|
||||
function RunFPCVerbose(const CompilerFilename, TestFilename: string;
|
||||
out ConfigFiles: TStrings;
|
||||
out TargetCompilerFilename: string;
|
||||
out RealCompilerFilename: string;
|
||||
out UnitPaths: TStrings;
|
||||
out Defines, Undefines: TStringToStringTree;
|
||||
const Options: string = ''): boolean;
|
||||
@ -1340,7 +1340,7 @@ begin
|
||||
end;
|
||||
|
||||
function ParseFPCVerbose(List: TStrings; out ConfigFiles: TSTrings;
|
||||
out CompilerFilename: string; out UnitPaths: TStrings;
|
||||
out RealCompilerFilename: string; out UnitPaths: TStrings;
|
||||
out Defines, Undefines: TStringToStringTree): boolean;
|
||||
|
||||
procedure UndefineSymbol(const MacroName: string);
|
||||
@ -1435,7 +1435,7 @@ function ParseFPCVerbose(List: TStrings; out ConfigFiles: TSTrings;
|
||||
end else if StrLComp(@UpLine[CurPos], 'COMPILER: ', 10) = 0 then begin
|
||||
// skip keywords
|
||||
Inc(CurPos, 10);
|
||||
CompilerFilename:=copy(Line,CurPos,length(Line));
|
||||
RealCompilerFilename:=copy(Line,CurPos,length(Line));
|
||||
end;
|
||||
'R':
|
||||
if StrLComp(@UpLine[CurPos], 'READING OPTIONS FROM FILE ', 26) = 0 then
|
||||
@ -1456,7 +1456,7 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
ConfigFiles:=TStringList.Create;
|
||||
CompilerFilename:='';
|
||||
RealCompilerFilename:='';
|
||||
UnitPaths:=TStringList.Create;
|
||||
Defines:=TStringToStringTree.Create(false);
|
||||
Undefines:=TStringToStringTree.Create(false);
|
||||
@ -1475,7 +1475,7 @@ begin
|
||||
end;
|
||||
|
||||
function RunFPCVerbose(const CompilerFilename, TestFilename: string;
|
||||
out ConfigFiles: TStrings; out TargetCompilerFilename: string;
|
||||
out ConfigFiles: TStrings; out RealCompilerFilename: string;
|
||||
out UnitPaths: TStrings; out Defines, Undefines: TStringToStringTree;
|
||||
const Options: string): boolean;
|
||||
var
|
||||
@ -1487,7 +1487,7 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
ConfigFiles:=nil;
|
||||
TargetCompilerFilename:='';
|
||||
RealCompilerFilename:='';
|
||||
UnitPaths:=nil;
|
||||
Defines:=nil;
|
||||
Undefines:=nil;
|
||||
@ -1515,7 +1515,7 @@ begin
|
||||
debugln(['RunFPCVerbose failed: ',CompilerFilename,' ',Params]);
|
||||
exit;
|
||||
end;
|
||||
Result:=ParseFPCVerbose(List,ConfigFiles,TargetCompilerFilename,
|
||||
Result:=ParseFPCVerbose(List,ConfigFiles,RealCompilerFilename,
|
||||
UnitPaths,Defines,Undefines);
|
||||
finally
|
||||
List.Free;
|
||||
|
@ -688,6 +688,7 @@ begin
|
||||
' CompilerFilename=',CompilerFilename,
|
||||
' TargetOS=',TargetOS,
|
||||
' TargetCPU=',TargetCPU,
|
||||
' RealCompiler=',UnitSetCache.GetConfigCache(false).RealCompiler,
|
||||
' EnvFPCSrcDir=',EnvironmentOptions.FPCSourceDirectory,
|
||||
' FPCSrcDir=',FPCSrcDir,
|
||||
'']);
|
||||
@ -697,7 +698,7 @@ begin
|
||||
// create template for FPC settings
|
||||
ADefTempl:=CreateFPCTemplate(UnitSetCache,nil);
|
||||
AddTemplate(ADefTempl,false,
|
||||
'NOTE: Could not create Define Template for Free Pascal Compiler');
|
||||
'NOTE: Could not create Define Template for Free Pascal Compiler');
|
||||
// create template for FPC source directory
|
||||
ADefTempl:=CreateFPCSourceTemplate(UnitSetCache,nil);
|
||||
AddTemplate(ADefTempl,false,lisNOTECouldNotCreateDefineTemplateForFreePascal);
|
||||
|
@ -79,10 +79,10 @@ implementation
|
||||
procedure TFPCSrcScan.Execute;
|
||||
begin
|
||||
try
|
||||
Log('TFPCSrcScan.Execute AAA1');
|
||||
Log('TFPCSrcScan.Execute START '+Directory);
|
||||
// scan fpc source directory, check for terminated
|
||||
Files:=GatherFilesInFPCSources(Directory,nil);
|
||||
Log('TFPCSrcScan.Execute '+dbgs(Files<>nil));
|
||||
Log('TFPCSrcScan.Execute found some files: '+dbgs((Files<>nil) and (Files.Count>0)));
|
||||
except
|
||||
on E: Exception do begin
|
||||
Log('TFPCSrcScan.Execute error: '+E.Message);
|
||||
|
@ -230,7 +230,7 @@ begin
|
||||
sl.add('Global IDE options:');
|
||||
sl.Add('LazarusDirectory='+EnvironmentOptions.LazarusDirectory);
|
||||
sl.Add('CompilerFilename='+EnvironmentOptions.CompilerFilename);
|
||||
sl.Add('Real CompilerFilename='+EnvironmentOptions.GetCompilerFilename);
|
||||
sl.Add('ResolvedCompilerFilename='+EnvironmentOptions.GetCompilerFilename);
|
||||
sl.Add('CompilerMessagesFilename='+EnvironmentOptions.CompilerMessagesFilename);
|
||||
sl.Add('');
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user