Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-05

New project type in Lazarus

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

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?

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 8 lines
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.

Reply by email