mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 03:29:28 +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
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
|
|
||||||
Init;
|
if not Init then exit;
|
||||||
|
|
||||||
APackage:=LoadPackage(AFilename);
|
APackage:=LoadPackage(AFilename);
|
||||||
if APackage=nil then
|
if APackage=nil then
|
||||||
Error(ErrorLoadPackageFailed, 'unable to load package "'+AFilename+'"');
|
Error(ErrorLoadPackageFailed, 'unable to load package "'+AFilename+'"');
|
||||||
@ -413,7 +413,7 @@ var
|
|||||||
ProfileChanged: boolean;
|
ProfileChanged: boolean;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
Init;
|
if not Init then exit;
|
||||||
|
|
||||||
LoadMiscellaneousOptions;
|
LoadMiscellaneousOptions;
|
||||||
BuildLazProfiles:=MiscellaneousOptions.BuildLazProfiles;
|
BuildLazProfiles:=MiscellaneousOptions.BuildLazProfiles;
|
||||||
@ -659,7 +659,7 @@ begin
|
|||||||
Result:=false;
|
Result:=false;
|
||||||
CloseProject(Project1);
|
CloseProject(Project1);
|
||||||
|
|
||||||
Init;
|
if not Init then exit;
|
||||||
|
|
||||||
Project1:=LoadProject(AFilename);
|
Project1:=LoadProject(AFilename);
|
||||||
|
|
||||||
@ -864,6 +864,7 @@ begin
|
|||||||
MainBuildBoss.HasGUI:=false;
|
MainBuildBoss.HasGUI:=false;
|
||||||
SetupMacros;
|
SetupMacros;
|
||||||
LoadEnvironmentOptions;
|
LoadEnvironmentOptions;
|
||||||
|
if Terminated then exit(false);
|
||||||
LoadMiscellaneousOptions;
|
LoadMiscellaneousOptions;
|
||||||
SetupLazarusDirectory;
|
SetupLazarusDirectory;
|
||||||
SetupCodetools;
|
SetupCodetools;
|
||||||
@ -880,9 +881,12 @@ begin
|
|||||||
MainBuildBoss.SetBuildTarget(OSOverride,CPUOverride,WidgetSetOverride,bmsfsSkip,true);
|
MainBuildBoss.SetBuildTarget(OSOverride,CPUOverride,WidgetSetOverride,bmsfsSkip,true);
|
||||||
|
|
||||||
fInitResult:=true;
|
fInitResult:=true;
|
||||||
|
Result:=fInitResult;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazBuildApplication.LoadEnvironmentOptions;
|
procedure TLazBuildApplication.LoadEnvironmentOptions;
|
||||||
|
var
|
||||||
|
Note: string;
|
||||||
begin
|
begin
|
||||||
with EnvironmentOptions do begin
|
with EnvironmentOptions do begin
|
||||||
CreateConfig;
|
CreateConfig;
|
||||||
@ -891,7 +895,7 @@ begin
|
|||||||
fLazarusDirInCfg:=LazarusDirectory;
|
fLazarusDirInCfg:=LazarusDirectory;
|
||||||
|
|
||||||
if Application.HasOption('language') then begin
|
if Application.HasOption('language') then begin
|
||||||
debugln('TLazBuildApplication.Init overriding language with command line: ',
|
debugln('Note: overriding language with command line: ',
|
||||||
Application.GetOptionValue('language'));
|
Application.GetOptionValue('language'));
|
||||||
EnvironmentOptions.LanguageID:=Application.GetOptionValue('language');
|
EnvironmentOptions.LanguageID:=Application.GetOptionValue('language');
|
||||||
end;
|
end;
|
||||||
@ -905,6 +909,13 @@ begin
|
|||||||
if LazarusDirOverride<>'' then
|
if LazarusDirOverride<>'' then
|
||||||
LazarusDirectory:=CleanAndExpandDirectory(LazarusDirOverride);
|
LazarusDirectory:=CleanAndExpandDirectory(LazarusDirOverride);
|
||||||
end;
|
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;
|
end;
|
||||||
|
|
||||||
procedure TLazBuildApplication.LoadMiscellaneousOptions;
|
procedure TLazBuildApplication.LoadMiscellaneousOptions;
|
||||||
|
Loading…
Reference in New Issue
Block a user