IDE: checking base packages and on mismatch building IDE using lazbuild

This commit is contained in:
mattias 2023-03-19 23:43:13 +01:00
parent c56eb62226
commit 08ed783579
3 changed files with 3 additions and 7 deletions

View File

@ -628,7 +628,7 @@ begin
MakeExe);
Tool.FreeData:=true;
Tool.Process.Executable:=LazbuildExe;
Tool.Process.Parameters.Add('--user-ide=');
Tool.Process.Parameters.Add('--build-ide=');
Tool.Process.Parameters.Add('--lazarusdir=.');
Tool.Process.Parameters.Add('--pcp='+GetPrimaryConfigPath);
Tool.AddParsers(SubToolFPC);

View File

@ -7887,14 +7887,13 @@ begin
end;
MainBuildBoss.SetBuildTargetIDE;
{$IFDEF EnableBuildIDEUsingLazbuild}
ErrMsg:=PackageGraph.SrcBasePackagesNeedLazbuild;
if ErrMsg<>'' then
begin
r:=IDEQuestionDialog('Major changes detected',
'The Lazarus sources use a different list of base packages.'+LineEnding
+'It is recommended to compile the IDE clean using lazbuild.',
mtConfirmation,[mrYes,'Clean up + lazbuild',21,'No clean up + lazbuild',mrIgnore,'Compile normally',mrCancel]);
mtConfirmation,[mrYes,'Clean up + lazbuild',21,'lazbuild',mrIgnore,'Compile normally',mrCancel]);
case r of
mrYes:
exit(fBuilder.MakeIDEUsingLazbuild(true));
@ -7905,9 +7904,6 @@ begin
exit;
end;
end;
{$ELSE}
PackageGraph.ParseBasePackages(false);
{$ENDIF}
// clean up
PkgCompileFlags:=[];

View File

@ -5129,7 +5129,7 @@ var
begin
Result:=false;
LazDir:=EnvironmentOptions.GetParsedLazarusDirectory;
if (LazDir='') or not FilenameIsPascalSource(LazDir) then
if (LazDir='') or not FilenameIsAbsolute(LazDir) then
begin
if Verbose then
debugln(['Error: (lazarus) TLazPackageGraph.ParseBasePackages missing LazarusDir "',LazDir,'"']);