Sign in Join

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

Mailing lists / lazarus / 2008-07

importing program into lazarus project

10 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Marc Santhoff

Hi,

I have a program written using fpc only that I'd like to import into a lazarus project. How can this be done the easiest way?

(I did it this time by making a new "custom program"-type project and copying the source of the main source over)

And what is the difference between "custom program" and "program" project types, is it only that lazarus will adjust the uses clause or more? Do I lose some niceties using the first one?

TIA,
Marc

Reply by email

Graeme Geldenhuys
to Marc Santhoff
Marc Santhoff wrote
I have a program written using fpc only that I'd like to import into a lazarus project. How can this be done the easiest way?

Simply load Lazarus with a blank Lazarus project. Then open the main unit (program) of your fpc project using 'File | Open'... Lazarus will detect it's a 'program' and ask if it can manage it. Say yes. Lazarus would now have created a new .lpi file for your fpc program. Save the project and you are ready to go.

And what is the difference between "custom program" and "program" project types,

No idea what's the difference. All I know is that "program" is a Free Pascal program and Lazarus maintains the .lpi (Lazarus Project Information) file for that program.

Regards,
- Graeme -

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

Reply by email

Marc Santhoff
to Graeme Geldenhuys
Graeme Geldenhuys wrote 9 lines
On Mon, Jul 21, 2008 at 12:38 AM, Marc Santhoff wrote: > I have a program written using fpc only that I'd like to import into a > lazarus project. How can this be done the easiest way? Simply load Lazarus with a blank Lazarus project. Then open the main unit (program) of your fpc project using 'File | Open'... Lazarus will detect it's a 'program' and ask if it can manage it. Say yes. Lazarus would now have created a new .lpi file for your fpc program. Save the project and you are ready to go.

That was it. I knew it could be done very simple, but using file-open slipped me while looking at all those project types. :)

Show quoted text 6 lines
> And what is the difference between "custom program" and "program" > project types, No idea what's the difference. All I know is that "program" is a Free Pascal program and Lazarus maintains the .lpi (Lazarus Project Information) file for that program.

The descriptions of the projects tell something about that topic. Command line parsing may be an issue, the uses line is mostly fixed.

Thanks,
Marc

Reply by email

Vincent Snijders
to Marc Santhoff
Marc Santhoff wrote 13 lines
Am Montag, den 21.07.2008, 08:45 +0200 schrieb Graeme Geldenhuys: > On Mon, Jul 21, 2008 at 12:38 AM, Marc Santhoff wrote: >> I have a program written using fpc only that I'd like to import into a >> lazarus project. How can this be done the easiest way? > Simply load Lazarus with a blank Lazarus project. Then open the main > unit (program) of your fpc project using 'File | Open'... Lazarus > will detect it's a 'program' and ask if it can manage it. Say yes. > Lazarus would now have created a new .lpi file for your fpc program. > Save the project and you are ready to go. That was it. I knew it could be done very simple, but using file-open slipped me while looking at all those project types. :)

I'd choose Project -> New project from source.

Vincent

Reply by email

Mattias Gaertner
to Graeme Geldenhuys: Simply load Lazarus with a blank Lazarus project. Then open the main unit (program) of…
Show quoted text 10 lines
On Mon, Jul 21, 2008 at 12:38 AM, Marc Santhoff wrote: > I have a program written using fpc only that I'd like to import > into a lazarus project. How can this be done the easiest way? Simply load Lazarus with a blank Lazarus project. Then open the main unit (program) of your fpc project using 'File | Open'... Lazarus will detect it's a 'program' and ask if it can manage it. Say yes. Lazarus would now have created a new .lpi file for your fpc program. Save the project and you are ready to go.

Or use directly Project / New Project from file.

Show quoted text 6 lines
> And what is the difference between "custom program" and "program" > project types, No idea what's the difference. All I know is that "program" is a Free Pascal program and Lazarus maintains the .lpi (Lazarus Project Information) file for that program.

It's a different start source and some more options (Project Options / Miscellaneous) are off for custom program.
You can change all things at any time.

Mattias

Reply by email

Marc Santhoff
to Vincent Snijders: I'd choose Project -> New project from source. Vincent
Vincent Snijders wrote 16 lines
Marc Santhoff schreef: > Am Montag, den 21.07.2008, 08:45 +0200 schrieb Graeme Geldenhuys: >> On Mon, Jul 21, 2008 at 12:38 AM, Marc Santhoff wrote: >>> I have a program written using fpc only that I'd like to import into a >>> lazarus project. How can this be done the easiest way? >> Simply load Lazarus with a blank Lazarus project. Then open the main >> unit (program) of your fpc project using 'File | Open'... Lazarus >> will detect it's a 'program' and ask if it can manage it. Say yes. >> Lazarus would now have created a new .lpi file for your fpc program. >> Save the project and you are ready to go. > > That was it. I knew it could be done very simple, but using file-open > slipped me while looking at all those project types. :) > I'd choose Project -> New project from source.

Antoher new menu entry. Those thingies seem to hide from me when I need them. ;)

Thank you,
Marc

Reply by email

Marc Santhoff
to Mattias Gaertner: On Mon, 21 Jul 2008 08:45:36 +0200 Or use directly Project / New Project from file. It's…
Mattias Gaertner wrote 27 lines
On Mon, 21 Jul 2008 08:45:36 +0200 "Graeme Geldenhuys" wrote: > On Mon, Jul 21, 2008 at 12:38 AM, Marc Santhoff > wrote: > > I have a program written using fpc only that I'd like to import > > into a lazarus project. How can this be done the easiest way? > > Simply load Lazarus with a blank Lazarus project. Then open the main > unit (program) of your fpc project using 'File | Open'... Lazarus > will detect it's a 'program' and ask if it can manage it. Say yes. > Lazarus would now have created a new .lpi file for your fpc program. > Save the project and you are ready to go. Or use directly Project / New Project from file. > > And what is the difference between "custom program" and "program" > > project types, > > No idea what's the difference. All I know is that "program" is a Free > Pascal program and Lazarus maintains the .lpi (Lazarus Project > Information) file for that program. It's a different start source and some more options (Project Options / Miscellaneous) are off for custom program. You can change all things at any time.

I found those options already. Very nice, although I still have to try them out to see what happens if switched in an existing project.

Since I left the Delphi world with version 2: are these options genuine Lazarus options or are they carried over from Delphi? Maybe some old books or docs can help me getting used to all possibilities hiding in Lazarus ...

Thanks,
Marc

Reply by email

Mattias Gaertner
to Marc Santhoff: I found those options already. Very nice, although I still have to try them out to see…
Show quoted text 36 lines
Am Montag, den 21.07.2008, 22:33 +0200 schrieb Mattias Gaertner: > On Mon, 21 Jul 2008 08:45:36 +0200 > "Graeme Geldenhuys" wrote: > > > On Mon, Jul 21, 2008 at 12:38 AM, Marc Santhoff > > wrote: > > > I have a program written using fpc only that I'd like to import > > > into a lazarus project. How can this be done the easiest way? > > > > Simply load Lazarus with a blank Lazarus project. Then open the > > main unit (program) of your fpc project using 'File | Open'... > > Lazarus will detect it's a 'program' and ask if it can manage it. > > Say yes. Lazarus would now have created a new .lpi file for your > > fpc program. Save the project and you are ready to go. > > Or use directly Project / New Project from file. > > > > > And what is the difference between "custom program" and > > > "program" project types, > > > > No idea what's the difference. All I know is that "program" is a > > Free Pascal program and Lazarus maintains the .lpi (Lazarus > > Project Information) file for that program. > > It's a different start source and some more options (Project > Options / Miscellaneous) are off for custom program. > You can change all things at any time. I found those options already. Very nice, although I still have to try them out to see what happens if switched in an existing project. Since I left the Delphi world with version 2: are these options genuine Lazarus options or are they carried over from Delphi? Maybe some old books or docs can help me getting used to all possibilities hiding in Lazarus ...

If you are online, simply press F1 in any IDE dialog. This will open a browser to
http://wiki.lazarus.freepascal.org/index.php/IDE_Window:_Project_Options

Mattias

Reply by email

Marc Santhoff
to Mattias Gaertner
Mattias Gaertner wrote 11 lines
> I found those options already. Very nice, although I still have to try > them out to see what happens if switched in an existing project. > > Since I left the Delphi world with version 2: are these options > genuine Lazarus options or are they carried over from Delphi? Maybe > some old books or docs can help me getting used to all possibilities > hiding in Lazarus ... If you are online, simply press F1 in any IDE dialog. This will open a browser to http://wiki.lazarus.freepascal.org/index.php/IDE_Window:_Project_Options

Very nifty feature!

Thanks,
Marc

Reply by email