mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 12:39:29 +02:00
lazbuild: fixed loading env opts
git-svn-id: trunk@36277 -
This commit is contained in:
parent
4e8caf2a7c
commit
9bb4a0555a
@ -351,7 +351,18 @@ begin
|
||||
Dir:=EnvironmentOptions.GetParsedLazarusDirectory;
|
||||
Quality:=CheckLazarusDirectoryQuality(Dir,Note);
|
||||
if Quality<>sddqInvalid then exit;
|
||||
debugln(['SetupLazarusDirectory: The Lazarus directory "',EnvironmentOptions.LazarusDirectory,'" is invalid (Error: ',Note,'). Searching a proper one ...']);
|
||||
// bad lazarus directory
|
||||
dbgout('SetupLazarusDirectory:');
|
||||
if EnvironmentOptions.LazarusDirectory<>'' then
|
||||
begin
|
||||
dbgout(' The Lazarus directory "',EnvironmentOptions.LazarusDirectory,'"');
|
||||
if EnvironmentOptions.LazarusDirectory<>Dir then
|
||||
dbgout(' => "',Dir,'"');
|
||||
dbgout(' is invalid (Error: ',Note,')');
|
||||
debugln(' Searching a proper one ...');
|
||||
end else begin
|
||||
debugln(' Searching ...');
|
||||
end;
|
||||
List:=SearchLazarusDirectoryCandidates(true);
|
||||
try
|
||||
BestDir:=nil;
|
||||
@ -578,7 +589,18 @@ begin
|
||||
CompFile:=EnvironmentOptions.GetParsedCompilerFilename;
|
||||
Quality:=CheckCompilerQuality(CompFile,Note,'');
|
||||
if Quality<>sddqInvalid then exit;
|
||||
debugln(['SetupCompilerFilename: The compiler path "',CompFile,'" is invalid (Error: ',Note,'). Searching a proper one ...']);
|
||||
// bad compiler
|
||||
dbgout('SetupCompilerFilename:');
|
||||
if EnvironmentOptions.CompilerFilename<>'' then
|
||||
begin
|
||||
dbgout(' The compiler path "',EnvironmentOptions.CompilerFilename,'"');
|
||||
if EnvironmentOptions.CompilerFilename<>CompFile then
|
||||
dbgout(' => "',CompFile,'"');
|
||||
dbgout(' is invalid (Error: ',Note,')');
|
||||
debugln(' Searching a proper one ...');
|
||||
end else begin
|
||||
debugln(' Searching compiler ...');
|
||||
end;
|
||||
List:=SearchCompilerCandidates(true,EnvironmentOptions.GetParsedLazarusDirectory,
|
||||
CodeToolBoss.FPCDefinesCache.TestFilename);
|
||||
try
|
||||
|
@ -258,7 +258,7 @@ type
|
||||
procedure ApplyFileDialogSettings(DestDialog: TFileDialog);
|
||||
procedure StoreFileDialogSettings(SourceDialog: TFileDialog);
|
||||
procedure SetFileDialogSettingsInitialDir(const InitialDir: string);
|
||||
function SelectDirectory(const Title: string;
|
||||
function SelectDirectory(const {%H-}Title: string;
|
||||
MustExist: boolean = true;
|
||||
const InitialDir: string = '';
|
||||
const Directory: string = ''): string;
|
||||
|
@ -835,8 +835,6 @@ end;
|
||||
|
||||
procedure TLazBuildApplication.LoadEnvironmentOptions;
|
||||
begin
|
||||
if EnvironmentOptions<>nil then exit;
|
||||
EnvironmentOptions:=TEnvironmentOptions.Create;
|
||||
with EnvironmentOptions do begin
|
||||
CreateConfig;
|
||||
Load(false);
|
||||
@ -882,6 +880,10 @@ begin
|
||||
CodeToolBoss.SourceCache.OnEncodeSaving:=@OnCodeBufferEncodeSaving;
|
||||
CodeToolBoss.SourceCache.OnDecodeLoaded:=@OnCodeBufferDecodeLoaded;
|
||||
CodeToolBoss.SourceCache.DefaultEncoding:=EncodingUTF8;
|
||||
|
||||
MainBuildBoss.LoadFPCDefinesCaches;
|
||||
// create a test unit needed to get from the compiler all macros and search paths
|
||||
CodeToolBoss.FPCDefinesCache.TestFilename:=CreateCompilerTestPascalFilename;
|
||||
end;
|
||||
|
||||
procedure TLazBuildApplication.SetupPackageSystem;
|
||||
|
@ -14860,8 +14860,10 @@ begin
|
||||
|
||||
CompilerParseStampIncreased:=@OnCompilerParseStampIncreased;
|
||||
|
||||
{$IFDEF CheckNodeTool}
|
||||
// codetools consistency check
|
||||
CodeToolBoss.ConsistencyCheck;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
procedure TMainIDE.ActivateCodeToolAbortableMode;
|
||||
|
@ -95,10 +95,10 @@ type
|
||||
constructor Create; override;
|
||||
destructor Destroy; override;
|
||||
|
||||
procedure DoAfterBuild(AResources: TAbstractProjectResources;
|
||||
AReason: TCompileReason; SaveToTestDir: boolean); override;
|
||||
procedure DoAfterBuild({%H-}AResources: TAbstractProjectResources;
|
||||
AReason: TCompileReason; {%H-}SaveToTestDir: boolean); override;
|
||||
function UpdateResources(AResources: TAbstractProjectResources;
|
||||
const MainFilename: string): boolean; override;
|
||||
const {%H-}MainFilename: string): boolean; override;
|
||||
procedure WriteToProjectFile(AConfig: {TXMLConfig}TObject; Path: string); override;
|
||||
procedure ReadFromProjectFile(AConfig: {TXMLConfig}TObject; Path: string); override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user