mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 02:19:16 +02:00
lazbuild: quick check if lazarusdire is valid
git-svn-id: trunk@36740 -
This commit is contained in:
parent
b8aaf5770a
commit
2d5e028aa0
@ -332,8 +332,8 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
|
||||
Init;
|
||||
|
||||
if not Init then exit;
|
||||
|
||||
APackage:=LoadPackage(AFilename);
|
||||
if APackage=nil then
|
||||
Error(ErrorLoadPackageFailed, 'unable to load package "'+AFilename+'"');
|
||||
@ -413,7 +413,7 @@ var
|
||||
ProfileChanged: boolean;
|
||||
begin
|
||||
Result:=false;
|
||||
Init;
|
||||
if not Init then exit;
|
||||
|
||||
LoadMiscellaneousOptions;
|
||||
BuildLazProfiles:=MiscellaneousOptions.BuildLazProfiles;
|
||||
@ -659,7 +659,7 @@ begin
|
||||
Result:=false;
|
||||
CloseProject(Project1);
|
||||
|
||||
Init;
|
||||
if not Init then exit;
|
||||
|
||||
Project1:=LoadProject(AFilename);
|
||||
|
||||
@ -864,6 +864,7 @@ begin
|
||||
MainBuildBoss.HasGUI:=false;
|
||||
SetupMacros;
|
||||
LoadEnvironmentOptions;
|
||||
if Terminated then exit(false);
|
||||
LoadMiscellaneousOptions;
|
||||
SetupLazarusDirectory;
|
||||
SetupCodetools;
|
||||
@ -880,9 +881,12 @@ begin
|
||||
MainBuildBoss.SetBuildTarget(OSOverride,CPUOverride,WidgetSetOverride,bmsfsSkip,true);
|
||||
|
||||
fInitResult:=true;
|
||||
Result:=fInitResult;
|
||||
end;
|
||||
|
||||
procedure TLazBuildApplication.LoadEnvironmentOptions;
|
||||
var
|
||||
Note: string;
|
||||
begin
|
||||
with EnvironmentOptions do begin
|
||||
CreateConfig;
|
||||
@ -891,7 +895,7 @@ begin
|
||||
fLazarusDirInCfg:=LazarusDirectory;
|
||||
|
||||
if Application.HasOption('language') then begin
|
||||
debugln('TLazBuildApplication.Init overriding language with command line: ',
|
||||
debugln('Note: overriding language with command line: ',
|
||||
Application.GetOptionValue('language'));
|
||||
EnvironmentOptions.LanguageID:=Application.GetOptionValue('language');
|
||||
end;
|
||||
@ -905,6 +909,13 @@ begin
|
||||
if LazarusDirOverride<>'' then
|
||||
LazarusDirectory:=CleanAndExpandDirectory(LazarusDirOverride);
|
||||
end;
|
||||
if not FileExistsUTF8(EnvironmentOptions.GetParsedLazarusDirectory
|
||||
+SetDirSeparators('packager/registration/fcl.lpk'))
|
||||
then begin
|
||||
CheckLazarusDirectoryQuality(EnvironmentOptions.GetParsedLazarusDirectory,Note);
|
||||
debugln(['Error: invalid Lazarus directory "'+EnvironmentOptions.LazarusDirectory+'": '+Note]);
|
||||
Terminate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TLazBuildApplication.LoadMiscellaneousOptions;
|
||||
|
Loading…
Reference in New Issue
Block a user