mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 21:20:46 +02:00
codetools: clean up
This commit is contained in:
parent
a3d81c8820
commit
82af78d8bb
@ -1220,7 +1220,9 @@ begin
|
|||||||
// To not parse the FPC sources every time, the options are saved to a file.
|
// To not parse the FPC sources every time, the options are saved to a file.
|
||||||
DebugLn(['TCodeToolManager.SimpleInit Config=',ConfigFilename]);
|
DebugLn(['TCodeToolManager.SimpleInit Config=',ConfigFilename]);
|
||||||
if FileExistsUTF8(ConfigFilename) then
|
if FileExistsUTF8(ConfigFilename) then
|
||||||
Options.LoadFromFile(ConfigFilename);
|
Options.LoadFromFile(ConfigFilename)
|
||||||
|
else
|
||||||
|
debugln('Scanning FPC sources may take a while ...');
|
||||||
// use environment variables
|
// use environment variables
|
||||||
Options.InitWithEnvironmentVariables;
|
Options.InitWithEnvironmentVariables;
|
||||||
// apply defaults
|
// apply defaults
|
||||||
@ -1230,8 +1232,6 @@ begin
|
|||||||
Options.LazarusSrcDir:=ExpandFileNameUTF8('~/pascal/lazarus');
|
Options.LazarusSrcDir:=ExpandFileNameUTF8('~/pascal/lazarus');
|
||||||
DebugLn(['TCodeToolManager.SimpleInit PP=',Options.FPCPath,' FPCDIR=',Options.FPCSrcDir,' LAZARUSDIR=',Options.LazarusSrcDir,' FPCTARGET=',Options.TargetOS]);
|
DebugLn(['TCodeToolManager.SimpleInit PP=',Options.FPCPath,' FPCDIR=',Options.FPCSrcDir,' LAZARUSDIR=',Options.LazarusSrcDir,' FPCTARGET=',Options.TargetOS]);
|
||||||
// init the codetools
|
// init the codetools
|
||||||
if not Options.UnitLinkListValid then
|
|
||||||
debugln('Scanning FPC sources may take a while ...');
|
|
||||||
Init(Options);
|
Init(Options);
|
||||||
|
|
||||||
// save the options and the FPC unit links results.
|
// save the options and the FPC unit links results.
|
||||||
|
@ -98,8 +98,6 @@ type
|
|||||||
FTargetOS: string;
|
FTargetOS: string;
|
||||||
FTargetProcessor: string;
|
FTargetProcessor: string;
|
||||||
FTestPascalFile: string;
|
FTestPascalFile: string;
|
||||||
FUnitLinkList: string;
|
|
||||||
FUnitLinkListValid: boolean;
|
|
||||||
procedure SetFPCOptions(const AValue: string);
|
procedure SetFPCOptions(const AValue: string);
|
||||||
procedure SetFPCPath(const AValue: string);
|
procedure SetFPCPath(const AValue: string);
|
||||||
procedure SetFPCSrcDir(const AValue: string);
|
procedure SetFPCSrcDir(const AValue: string);
|
||||||
@ -113,8 +111,6 @@ type
|
|||||||
procedure SetTargetOS(const AValue: string);
|
procedure SetTargetOS(const AValue: string);
|
||||||
procedure SetTargetProcessor(const AValue: string);
|
procedure SetTargetProcessor(const AValue: string);
|
||||||
procedure SetTestPascalFile(const AValue: string);
|
procedure SetTestPascalFile(const AValue: string);
|
||||||
procedure SetUnitLinkList(const AValue: string);
|
|
||||||
procedure SetUnitLinkListValid(const AValue: boolean);
|
|
||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -139,8 +135,6 @@ type
|
|||||||
property PPUExt: string read FPPUExt write SetPPUExt;
|
property PPUExt: string read FPPUExt write SetPPUExt;
|
||||||
property SourceCaches: TFPCSourceCaches read FSourceCaches;
|
property SourceCaches: TFPCSourceCaches read FSourceCaches;
|
||||||
property ConfigCaches: TPCTargetConfigCaches read FConfigCaches;
|
property ConfigCaches: TPCTargetConfigCaches read FConfigCaches;
|
||||||
property UnitLinkListValid: boolean read FUnitLinkListValid write SetUnitLinkListValid;
|
|
||||||
property UnitLinkList: string read FUnitLinkList write SetUnitLinkList;
|
|
||||||
|
|
||||||
// Project
|
// Project
|
||||||
property ProjectDir: string read FProjectDir write SetProjectDir;
|
property ProjectDir: string read FProjectDir write SetProjectDir;
|
||||||
@ -169,7 +163,6 @@ begin
|
|||||||
NewValue:=TrimAndExpandFilename(AValue);
|
NewValue:=TrimAndExpandFilename(AValue);
|
||||||
if FFPCPath=NewValue then exit;
|
if FFPCPath=NewValue then exit;
|
||||||
FFPCPath:=NewValue;
|
FFPCPath:=NewValue;
|
||||||
FUnitLinkListValid:=false;
|
|
||||||
Modified:=true;
|
Modified:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -180,7 +173,6 @@ begin
|
|||||||
NewValue:=TrimAndExpandFilename(AValue);
|
NewValue:=TrimAndExpandFilename(AValue);
|
||||||
if FFPCSrcDir=NewValue then exit;
|
if FFPCSrcDir=NewValue then exit;
|
||||||
FFPCSrcDir:=NewValue;
|
FFPCSrcDir:=NewValue;
|
||||||
FUnitLinkListValid:=false;
|
|
||||||
Modified:=true;
|
Modified:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -188,7 +180,6 @@ procedure TCodeToolsOptions.SetFPCUnitPath(const AValue: string);
|
|||||||
begin
|
begin
|
||||||
if FFPCUnitPath=AValue then exit;
|
if FFPCUnitPath=AValue then exit;
|
||||||
FFPCUnitPath:=AValue;
|
FFPCUnitPath:=AValue;
|
||||||
FUnitLinkListValid:=false;
|
|
||||||
Modified:=true;
|
Modified:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -240,7 +231,6 @@ procedure TCodeToolsOptions.SetTargetOS(const AValue: string);
|
|||||||
begin
|
begin
|
||||||
if FTargetOS=AValue then exit;
|
if FTargetOS=AValue then exit;
|
||||||
FTargetOS:=AValue;
|
FTargetOS:=AValue;
|
||||||
FUnitLinkListValid:=false;
|
|
||||||
Modified:=true;
|
Modified:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -248,7 +238,6 @@ procedure TCodeToolsOptions.SetTargetProcessor(const AValue: string);
|
|||||||
begin
|
begin
|
||||||
if FTargetProcessor=AValue then exit;
|
if FTargetProcessor=AValue then exit;
|
||||||
FTargetProcessor:=AValue;
|
FTargetProcessor:=AValue;
|
||||||
FUnitLinkListValid:=false;
|
|
||||||
Modified:=true;
|
Modified:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -259,20 +248,6 @@ begin
|
|||||||
Modified:=true;
|
Modified:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCodeToolsOptions.SetUnitLinkList(const AValue: string);
|
|
||||||
begin
|
|
||||||
if FUnitLinkList=AValue then exit;
|
|
||||||
FUnitLinkList:=AValue;
|
|
||||||
Modified:=true;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCodeToolsOptions.SetUnitLinkListValid(const AValue: boolean);
|
|
||||||
begin
|
|
||||||
if FUnitLinkListValid=AValue then exit;
|
|
||||||
FUnitLinkListValid:=AValue;
|
|
||||||
Modified:=true;
|
|
||||||
end;
|
|
||||||
|
|
||||||
constructor TCodeToolsOptions.Create;
|
constructor TCodeToolsOptions.Create;
|
||||||
begin
|
begin
|
||||||
FPPUExt:='.ppu';
|
FPPUExt:='.ppu';
|
||||||
@ -330,8 +305,6 @@ begin
|
|||||||
XMLConfig.SetDeleteValue(Path+'FPC/TargetProcessor/Value',TargetProcessor,'');
|
XMLConfig.SetDeleteValue(Path+'FPC/TargetProcessor/Value',TargetProcessor,'');
|
||||||
XMLConfig.SetDeleteValue(Path+'FPC/PPUExt/Value',PPUExt,'.ppu');
|
XMLConfig.SetDeleteValue(Path+'FPC/PPUExt/Value',PPUExt,'.ppu');
|
||||||
XMLConfig.SetDeleteValue(Path+'FPC/TestPascalFile/Value',TestPascalFile,'');
|
XMLConfig.SetDeleteValue(Path+'FPC/TestPascalFile/Value',TestPascalFile,'');
|
||||||
XMLConfig.SetDeleteValue(Path+'FPC/UnitLinkList/Value',UnitLinkList,'');
|
|
||||||
XMLConfig.SetDeleteValue(Path+'FPC/UnitLinkList/Valid',UnitLinkListValid,false);
|
|
||||||
XMLConfig.SetDeleteValue(Path+'Lazarus/SrcDir/Value',LazarusSrcDir,'');
|
XMLConfig.SetDeleteValue(Path+'Lazarus/SrcDir/Value',LazarusSrcDir,'');
|
||||||
XMLConfig.SetDeleteValue(Path+'Lazarus/SrcDirOptions/Value',LazarusSrcOptions,'');
|
XMLConfig.SetDeleteValue(Path+'Lazarus/SrcDirOptions/Value',LazarusSrcOptions,'');
|
||||||
XMLConfig.SetDeleteValue(Path+'Lazarus/LCLWidgetType/Value',LCLWidgetType,'');
|
XMLConfig.SetDeleteValue(Path+'Lazarus/LCLWidgetType/Value',LCLWidgetType,'');
|
||||||
@ -359,9 +332,6 @@ begin
|
|||||||
TargetProcessor:=XMLConfig.GetValue(Path+'FPC/TargetProcessor/Value','');
|
TargetProcessor:=XMLConfig.GetValue(Path+'FPC/TargetProcessor/Value','');
|
||||||
PPUExt:=XMLConfig.GetValue(Path+'FPC/PPUExt/Value','.ppu');
|
PPUExt:=XMLConfig.GetValue(Path+'FPC/PPUExt/Value','.ppu');
|
||||||
TestPascalFile:=XMLConfig.GetValue(Path+'FPC/TestPascalFile/Value','');
|
TestPascalFile:=XMLConfig.GetValue(Path+'FPC/TestPascalFile/Value','');
|
||||||
UnitLinkList:=XMLConfig.GetValue(Path+'FPC/UnitLinkList/Value','');
|
|
||||||
// UnitLinkListValid must be set as last
|
|
||||||
UnitLinkListValid:=XMLConfig.GetValue(Path+'FPC/UnitLinkList/Valid',false);
|
|
||||||
FConfigCaches.LoadFromXMLConfig(XMLConfig,Path+'FPCConfigCaches/');
|
FConfigCaches.LoadFromXMLConfig(XMLConfig,Path+'FPCConfigCaches/');
|
||||||
FSourceCaches.LoadFromXMLConfig(XMLConfig,Path+'FPCSrcDirCaches/');
|
FSourceCaches.LoadFromXMLConfig(XMLConfig,Path+'FPCSrcDirCaches/');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user