mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-14 03:19:32 +02:00
fixed registration for fpc 1.0.x
git-svn-id: trunk@4025 -
This commit is contained in:
parent
5ba8381011
commit
7a541bcc8f
@ -40,7 +40,9 @@ program Lazarus;
|
||||
{$R *.res}
|
||||
{$ENDIF}
|
||||
|
||||
uses
|
||||
{off $DEFINE IDE_MEM_CHECK}
|
||||
|
||||
uses
|
||||
//cmem,
|
||||
{$IFDEF IDE_MEM_CHECK}
|
||||
MemCheck,
|
||||
@ -88,6 +90,9 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.40 2003/04/08 09:04:07 mattias
|
||||
fixed registration for fpc 1.0.x
|
||||
|
||||
Revision 1.39 2002/10/26 15:15:42 lazarus
|
||||
MG: broke LCL<->interface circles
|
||||
|
||||
|
@ -271,7 +271,7 @@ const
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterComponentsProc('Dialogs',[TOpenDialog,TSaveDialog,
|
||||
RegisterComponents('Dialogs',[TOpenDialog,TSaveDialog,
|
||||
TColorDialog,TFontDialog]);
|
||||
end;
|
||||
|
||||
@ -340,6 +340,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.29 2003/04/08 09:04:07 mattias
|
||||
fixed registration for fpc 1.0.x
|
||||
|
||||
Revision 1.28 2003/04/04 16:35:24 mattias
|
||||
started package registration
|
||||
|
||||
|
@ -37,7 +37,14 @@ unit PackageSystem;
|
||||
|
||||
interface
|
||||
|
||||
{off $DEFINE IDE_MEM_CHECK}
|
||||
|
||||
{$DEFINE StopOnRegError}
|
||||
|
||||
uses
|
||||
{$IFDEF IDE_MEM_CHECK}
|
||||
MemCheck,
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, AVL_Tree, FileCtrl, Forms, Controls, Dialogs,
|
||||
LazarusIDEStrConsts, IDEProcs, PackageLinks, PackageDefs, LazarusPackageIntf,
|
||||
ComponentReg, RegisterLCL, RegisterFCL;
|
||||
@ -78,7 +85,6 @@ type
|
||||
FItems: TList; // unsorted list of TLazPackage
|
||||
function GetPackages(Index: integer): TLazPackage;
|
||||
procedure SetAbortRegistration(const AValue: boolean);
|
||||
procedure SetErrorMsg(const AValue: string);
|
||||
procedure SetRegistrationPackage(const AValue: TLazPackage);
|
||||
function CreateFCLPackage: TLazPackage;
|
||||
function CreateLCLPackage: TLazPackage;
|
||||
@ -123,7 +129,7 @@ type
|
||||
write SetRegistrationPackage;
|
||||
property RegistrationUnitName: string read FRegistrationUnitName;
|
||||
property RegistrationFile: TPkgFile read FRegistrationFile;
|
||||
property ErrorMsg: string read FErrorMsg write SetErrorMsg;
|
||||
property ErrorMsg: string read FErrorMsg write FErrorMsg;
|
||||
property AbortRegistration: boolean read FAbortRegistration
|
||||
write SetAbortRegistration;
|
||||
property FCLPackage: TLazPackage read FFCLPackage;
|
||||
@ -160,12 +166,6 @@ begin
|
||||
FAbortRegistration:=AValue;
|
||||
end;
|
||||
|
||||
procedure TLazPackageGraph.SetErrorMsg(const AValue: string);
|
||||
begin
|
||||
if FErrorMsg=AValue then exit;
|
||||
FErrorMsg:=AValue;
|
||||
end;
|
||||
|
||||
procedure TLazPackageGraph.SetRegistrationPackage(const AValue: TLazPackage);
|
||||
begin
|
||||
if FRegistrationPackage=AValue then exit;
|
||||
@ -401,12 +401,12 @@ begin
|
||||
RegistrationError('Register procedure is nil');
|
||||
exit;
|
||||
end;
|
||||
{$IFNDEF StopOnError}
|
||||
{$IFNDEF StopOnRegError}
|
||||
try
|
||||
{$ENDIF}
|
||||
// call the registration procedure
|
||||
RegisterProc();
|
||||
{$IFNDEF StopOnError}
|
||||
{$IFNDEF StopOnRegError}
|
||||
except
|
||||
on E: Exception do begin
|
||||
RegistrationError(E.Message);
|
||||
@ -428,6 +428,9 @@ var
|
||||
NewPkgComponent: TPkgComponent;
|
||||
CurClassname: string;
|
||||
begin
|
||||
{$IFDEF IDE_MEM_CHECK}
|
||||
CheckHeap('TLazPackageGraph.RegisterComponentsHandler Page='+Page);
|
||||
{$ENDIF}
|
||||
if AbortRegistration or (Low(ComponentClasses)>High(ComponentClasses)) then
|
||||
exit;
|
||||
|
||||
@ -447,7 +450,7 @@ begin
|
||||
for i:=Low(ComponentClasses) to High(ComponentClasses) do begin
|
||||
CurComponent:=ComponentClasses[i];
|
||||
if (CurComponent=nil) then continue;
|
||||
{$IFNDEF StopOnError}
|
||||
{$IFNDEF StopOnRegError}
|
||||
try
|
||||
{$ENDIF}
|
||||
CurClassname:=CurComponent.Classname;
|
||||
@ -455,7 +458,7 @@ begin
|
||||
RegistrationError('Invalid component class');
|
||||
continue;
|
||||
end;
|
||||
{$IFNDEF StopOnError}
|
||||
{$IFNDEF StopOnRegError}
|
||||
except
|
||||
on E: Exception do begin
|
||||
RegistrationError(E.Message);
|
||||
|
Loading…
Reference in New Issue
Block a user