Register (package)

From Lazarus wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

A Lazarus package that is intended to be installed needs a Register procedure which declares

  • all the package components and corresponding files
  • the tab on which the components are to be located.

Related procedures/functions

unit RegisterMyPackage;

interface

  uses 
    LazarusPackageIntf, MyPackage1, MyPackage2, MyOtherPackage;

implementation

procedure Register;
begin
  RegisterUnit( 'MyTab', @MyPackage1.Register );
  RegisterUnit( 'MyTab', @MyPackage2.Register );
  RegisterComponents( 'OtherTab', [TOtherComponent1,TOtherComponent2] );
end;

initialization
  {$I myresourcefile.lrs}

  RegisterPackage( 'MyTab', @Register );
end.