[Lazarus] How to tell lazarus the location of a used package?

Bo Berglund bo.berglund at gmail.com
Mon Nov 22 07:40:34 CET 2010


On Mon, 22 Nov 2010 00:11:23 +0100, Mattias Gaertner
<nc-gaertnma at netcologne.de> wrote:

>On Sun, 21 Nov 2010 23:16:09 +0100
>Bo Berglund <bo.berglund at gmail.com> wrote:
>
>> I *have* copied SdpoSerial from the original lazarus components dir
>> into the new lazarus components dir. So what more do I need to do in
>> order to get lazarus find the sdposerial package?
>
>Just open the SdpoSerialLaz.lpk once.
>The "components" directory has no special meaning to the IDE. The
>package can be anywhere on your disk.
>

Thanks, this solved the problem. But I would *never ever* have thought
that the action of opening a file like this would be "sticky" for the
future....
What happens if one opens several different same-name lpk files in
different locations just to see what they contain? Will Lazarus then
use the last opened one? Seems very unsafe for the project to me....

>> I have intentionally NOT *installed* it in any of the Lazarus versions
>> because it does not give me any visual object. But still if I use the
>> original lazarus it manages to find sdposerial, but not with the SVN
>> version.
>
>The IDE saves the locations of the lpk files in its config directory.

What is the scope of this saving? For the currently open project or
for all future and past projects too?

> 
>> In Delphi 7 I used to set serach paths for units in my project options
>> thus ensuring that I have full control over which version of common
>> files were used by my application.
>> But I cannot find a corrsponding property in the lazarus project
>> options....
>> There simply seems to be no place to set project specific paths at
>> all. What good is project options if you cannot set the project search
>> paths????
>
>The project specific search paths are in the compiler options. But the
>directories of SdpoSerialLaz belong to SdpoSerialLaz, not to your
>project. Just tell the IDE where the SdpoSerialLaz.lpk is and let
>Lazarus handle the search paths automatically.

Extremely strange that just opening the file will "tell" Lazarus where
the files are for the forseeable future....


Bo Berglund





More information about the Lazarus mailing list