mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 10:19:36 +02:00
Packager: Respect a user's choice to abort loading packages when an error happened.
This commit is contained in:
parent
6708a746c8
commit
097a96f950
@ -494,7 +494,7 @@ type
|
||||
property OnDeleteAmbiguousFiles: TPkgDeleteAmbiguousFiles
|
||||
read FOnDeleteAmbiguousFiles write FOnDeleteAmbiguousFiles;
|
||||
property OnTranslatePackage: TPkgTranslate read FOnTranslatePackage
|
||||
write FOnTranslatePackage;
|
||||
write FOnTranslatePackage;
|
||||
property OnUninstallPackage: TPkgUninstall read FOnUninstallPackage
|
||||
write FOnUninstallPackage;
|
||||
property OnBeforeCompilePackages: TOnBeforeCompilePackages read
|
||||
@ -912,7 +912,6 @@ procedure TLazPackageGraph.SetRegistrationPackage(const AValue: TLazPackage);
|
||||
begin
|
||||
if FRegistrationPackage=AValue then exit;
|
||||
FRegistrationPackage:=AValue;
|
||||
AbortRegistration:=false;
|
||||
LazarusPackageIntf.RegisterUnitProc:=@RegisterUnitHandler;
|
||||
RegisterComponentsProc:=@RegisterComponentsGlobalHandler;
|
||||
RegisterNoIconProc:=@RegisterNoIconGlobalHandler;
|
||||
|
@ -1537,32 +1537,25 @@ begin
|
||||
StaticPackages:=LazarusPackageIntf.RegisteredPackages;
|
||||
if StaticPackages=nil then exit;
|
||||
Quiet:=false;
|
||||
|
||||
// register IDE's FCL components
|
||||
|
||||
PackageGraph.AbortRegistration:=false;
|
||||
// register components in Lazarus packages
|
||||
for i:=0 to StaticPackages.Count-1 do begin
|
||||
StaticPackage:=PRegisteredPackage(StaticPackages[i]);
|
||||
//debugln(['TPkgManager.LoadStaticCustomPackages ',StaticPackage^.Name]);
|
||||
|
||||
// check package name
|
||||
if not IsValidPkgName(StaticPackage^.Name)
|
||||
then begin
|
||||
if not IsValidPkgName(StaticPackage^.Name) then begin
|
||||
DebugLn('Warning: (lazarus) [TPkgManager.LoadStaticCustomPackages] Invalid Package Name: "',
|
||||
BinaryStrToText(StaticPackage^.Name),'"');
|
||||
continue;
|
||||
end;
|
||||
|
||||
// check RegisterFCLBaseComponents procedure
|
||||
if (StaticPackage^.RegisterProc=nil) then begin
|
||||
DebugLn('Warning: (lazarus) [TPkgManager.LoadStaticCustomPackages]',
|
||||
' Package "',StaticPackage^.Name,'" has no register procedure.');
|
||||
continue;
|
||||
end;
|
||||
|
||||
// load package
|
||||
APackage:=LoadInstalledPackage(StaticPackage^.Name,KeepInstalledPackages,Quiet);
|
||||
|
||||
PackageGraph.RegisterStaticPackage(APackage,StaticPackage^.RegisterProc);
|
||||
end;
|
||||
PackageGraph.SortAutoInstallDependencies;
|
||||
|
Loading…
Reference in New Issue
Block a user