Discussion:
importing program into lazarus project
Marc Santhoff
2008-07-20 22:38:48 UTC
Permalink
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
Graeme Geldenhuys
2008-07-21 06:45:36 UTC
Permalink
Post by Marc Santhoff
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.
Post by Marc Santhoff
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/
Marc Santhoff
2008-07-21 15:10:31 UTC
Permalink
Post by Graeme Geldenhuys
Post by Marc Santhoff
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. :)
Post by Graeme Geldenhuys
Post by Marc Santhoff
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
Vincent Snijders
2008-07-21 15:52:08 UTC
Permalink
Post by Marc Santhoff
Post by Graeme Geldenhuys
Post by Marc Santhoff
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
Marc Santhoff
2008-07-22 03:33:21 UTC
Permalink
Post by Vincent Snijders
Post by Marc Santhoff
Post by Graeme Geldenhuys
Post by Marc Santhoff
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
Graeme Geldenhuys
2008-07-22 07:23:09 UTC
Permalink
Post by Vincent Snijders
I'd choose Project -> New project from source.
:-) I never even saw that one!


Regards,
- Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
Mattias Gaertner
2008-07-21 20:33:30 UTC
Permalink
On Mon, 21 Jul 2008 08:45:36 +0200
On Mon, Jul 21, 2008 at 12:38 AM, Marc Santhoff
Post by Marc Santhoff
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.
Post by Marc Santhoff
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
Marc Santhoff
2008-07-22 03:39:44 UTC
Permalink
Post by Mattias Gaertner
On Mon, 21 Jul 2008 08:45:36 +0200
On Mon, Jul 21, 2008 at 12:38 AM, Marc Santhoff
Post by Marc Santhoff
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.
Post by Marc Santhoff
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
Mattias Gaertner
2008-07-22 09:56:43 UTC
Permalink
On Tue, 22 Jul 2008 05:39:44 +0200
Post by Marc Santhoff
Post by Mattias Gaertner
On Mon, 21 Jul 2008 08:45:36 +0200
On Mon, Jul 21, 2008 at 12:38 AM, Marc Santhoff
Post by Marc Santhoff
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.
Post by Marc Santhoff
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
Marc Santhoff
2008-07-22 11:51:08 UTC
Permalink
Post by Mattias Gaertner
Post by Marc Santhoff
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

Loading...