mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 21:20:46 +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;
|
Dir:=EnvironmentOptions.GetParsedLazarusDirectory;
|
||||||
Quality:=CheckLazarusDirectoryQuality(Dir,Note);
|
Quality:=CheckLazarusDirectoryQuality(Dir,Note);
|
||||||
if Quality<>sddqInvalid then exit;
|
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);
|
List:=SearchLazarusDirectoryCandidates(true);
|
||||||
try
|
try
|
||||||
BestDir:=nil;
|
BestDir:=nil;
|
||||||
@ -578,7 +589,18 @@ begin
|
|||||||
CompFile:=EnvironmentOptions.GetParsedCompilerFilename;
|
CompFile:=EnvironmentOptions.GetParsedCompilerFilename;
|
||||||
Quality:=CheckCompilerQuality(CompFile,Note,'');
|
Quality:=CheckCompilerQuality(CompFile,Note,'');
|
||||||
if Quality<>sddqInvalid then exit;
|
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,
|
List:=SearchCompilerCandidates(true,EnvironmentOptions.GetParsedLazarusDirectory,
|
||||||
CodeToolBoss.FPCDefinesCache.TestFilename);
|
CodeToolBoss.FPCDefinesCache.TestFilename);
|
||||||
try
|
try
|
||||||
|
@ -258,7 +258,7 @@ type
|
|||||||
procedure ApplyFileDialogSettings(DestDialog: TFileDialog);
|
procedure ApplyFileDialogSettings(DestDialog: TFileDialog);
|
||||||
procedure StoreFileDialogSettings(SourceDialog: TFileDialog);
|
procedure StoreFileDialogSettings(SourceDialog: TFileDialog);
|
||||||
procedure SetFileDialogSettingsInitialDir(const InitialDir: string);
|
procedure SetFileDialogSettingsInitialDir(const InitialDir: string);
|
||||||
function SelectDirectory(const Title: string;
|
function SelectDirectory(const {%H-}Title: string;
|
||||||
MustExist: boolean = true;
|
MustExist: boolean = true;
|
||||||
const InitialDir: string = '';
|
const InitialDir: string = '';
|
||||||
const Directory: string = ''): string;
|
const Directory: string = ''): string;
|
||||||
|
@ -835,8 +835,6 @@ end;
|
|||||||
|
|
||||||
procedure TLazBuildApplication.LoadEnvironmentOptions;
|
procedure TLazBuildApplication.LoadEnvironmentOptions;
|
||||||
begin
|
begin
|
||||||
if EnvironmentOptions<>nil then exit;
|
|
||||||
EnvironmentOptions:=TEnvironmentOptions.Create;
|
|
||||||
with EnvironmentOptions do begin
|
with EnvironmentOptions do begin
|
||||||
CreateConfig;
|
CreateConfig;
|
||||||
Load(false);
|
Load(false);
|
||||||
@ -882,6 +880,10 @@ begin
|
|||||||
CodeToolBoss.SourceCache.OnEncodeSaving:=@OnCodeBufferEncodeSaving;
|
CodeToolBoss.SourceCache.OnEncodeSaving:=@OnCodeBufferEncodeSaving;
|
||||||
CodeToolBoss.SourceCache.OnDecodeLoaded:=@OnCodeBufferDecodeLoaded;
|
CodeToolBoss.SourceCache.OnDecodeLoaded:=@OnCodeBufferDecodeLoaded;
|
||||||
CodeToolBoss.SourceCache.DefaultEncoding:=EncodingUTF8;
|
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;
|
end;
|
||||||
|
|
||||||
procedure TLazBuildApplication.SetupPackageSystem;
|
procedure TLazBuildApplication.SetupPackageSystem;
|
||||||
|
@ -14860,8 +14860,10 @@ begin
|
|||||||
|
|
||||||
CompilerParseStampIncreased:=@OnCompilerParseStampIncreased;
|
CompilerParseStampIncreased:=@OnCompilerParseStampIncreased;
|
||||||
|
|
||||||
|
{$IFDEF CheckNodeTool}
|
||||||
// codetools consistency check
|
// codetools consistency check
|
||||||
CodeToolBoss.ConsistencyCheck;
|
CodeToolBoss.ConsistencyCheck;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainIDE.ActivateCodeToolAbortableMode;
|
procedure TMainIDE.ActivateCodeToolAbortableMode;
|
||||||
|
@ -95,10 +95,10 @@ type
|
|||||||
constructor Create; override;
|
constructor Create; override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
|
||||||
procedure DoAfterBuild(AResources: TAbstractProjectResources;
|
procedure DoAfterBuild({%H-}AResources: TAbstractProjectResources;
|
||||||
AReason: TCompileReason; SaveToTestDir: boolean); override;
|
AReason: TCompileReason; {%H-}SaveToTestDir: boolean); override;
|
||||||
function UpdateResources(AResources: TAbstractProjectResources;
|
function UpdateResources(AResources: TAbstractProjectResources;
|
||||||
const MainFilename: string): boolean; override;
|
const {%H-}MainFilename: string): boolean; override;
|
||||||
procedure WriteToProjectFile(AConfig: {TXMLConfig}TObject; Path: string); override;
|
procedure WriteToProjectFile(AConfig: {TXMLConfig}TObject; Path: string); override;
|
||||||
procedure ReadFromProjectFile(AConfig: {TXMLConfig}TObject; Path: string); override;
|
procedure ReadFromProjectFile(AConfig: {TXMLConfig}TObject; Path: string); override;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user