[Lazarus] New project type in Lazarus

Michael Van Canneyt michael at freepascal.org
Fri May 30 16:06:21 CEST 2008



On Fri, 30 May 2008, Graeme Geldenhuys wrote:

> Hi,
> 
> I would like to create a new IDE Package that adds a new project type
> to the 'File | New' dialog.  In the components directory there are a
> few examples of this for FPCUnit and fpWeb.  What I'm not sure about
> is... Can that ide package automatically add a required (external -
> not part of FPC or Lazarus) package (fpgui in my case) to the new
> project being created?  Any clues or example on how to do this?

Yes, of course it can. 

See components/projecttemplates/idetemplateproject.pp:

function TTemplateProjectDescriptor.InitProject(AProject: TLazProject) : TModalResult;

begin
  AProject.AddPackageDependency('FCL');
  AProject.AddPackageDependency('LCL');
  AProject.Title:=FProjectName;
end;

Michael.



More information about the Lazarus mailing list