[Lazarus] Environment variables in IDE's search path
Graeme Geldenhuys
graemeg.lists at gmail.com
Sat May 16 09:55:57 CEST 2009
On Sat, May 16, 2009 at 9:30 AM, dmitry boyarintsev
<skalogryz.lists at gmail.com> wrote:
> Lazarus packages are usefull, but i don't want to use them for some projects.
I can't see why??? I even compile projects that use lazarus packages
from the command line (automated daily test suite for tiOPF project).
>> Now each developer simply needs to open and compile the
>> package (so Lazarus knows where to find it).
>
> this is the step, i'd like to avoid.
But you only need to do that once, for the life of your lazarus
install (lazarus profile directory).
> I know, this needs to be done only once, because if package's
> sources're changed, IDE will detect it and recompile the changed
> package. And other project using package1, 2 .. N will not require to
> compile them again.
And now you are overlooking another BIG advantage of lazarus packages
(which Delphi IDE suffers badly from and what you are trying to
duplicate in Lazarus). If you have many projects relying on various
components and you use unit paths instead of packages, you are going
to have hordes of duplicate compiled units for the same component. The
same .dcu files will littered all over your projects unit output
directory, causing inconsistent versions of .dcu files and eating up
lots of hard drive space.
Using packages, you only have one set of compiled units, no matter how
many projects use those lazarus packages.
> But still, it can be very annoying. For example, with the project
> itself, there might be a lot of small test applications based on the
> same libraries used, for each of them i'll have to specify packages
> dependency (again and again for each test).
No you don't have to! Have you heard of "project templates" or "new
project add-ons". For example. If I want to create a fpGUI
application, I go 'File > New .. > Project > fpGUI Application" and
I'm done. Package dependencies are all setup for me already. I have
the same thing for tiOPF project (and I often have loads of small
tiOPF based applications).
You simply create one Lazarus add-on package that registers a new
project type and you are done. I believe Lazarus IDE includes an
example of such an add-on. If not, I can email you such a package or a
URL where you can find the code for such a add-on. I think the
"project templates" feature in the IDE can also define package
dependencies - Mattias or Michael might be able to confirm this.
> My point view: the less IDE buttons need to be pushed - the better :)
Agreed, developers are lazy by nature. :-) Hence the reason I use
packages. You have to go "file > new" and then copy and past paths for
each project. I simply go "File > New" ;-)
I think I should really write an article or extended documentation on
Lazarus Packages. Clearly many developers don't know what it entails
and how flexible it can be. And it's a vast improvement over Delphi
Packages!!
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
More information about the Lazarus
mailing list