[Lazarus] Project LPI Files and Platforms
Mehmet Erol Sanliturk
sanliturk at ttmail.com
Sat May 16 12:33:00 CEST 2009
Mattias Gaertner wrote:
> On Sat, 16 May 2009 03:38:48 -0400
> Mehmet Erol Sanliturk <sanliturk at ttmail.com> wrote:
>
>> Mattias Gaertner wrote:
>>> On Fri, 15 May 2009 08:31:27 -0400
>>> Mehmet Erol Sanliturk <sanliturk at ttmail.com> wrote:
>>>
>>>
>>> Why? What is not compatible?
>> For example :
>>
>> In FreeBSD ( 7.1 ) :
>> /usr/local/share/lazarus/
>> /usr/local/lib/fpc/2.2.2/
>>
>> Windows XP : \lazarus\
>>
>> Linux ( Kubuntu 9.04 ) :
>> /usr/lib/lazarus/
>
> These are the lazarus and fpc installation paths. These are set
> globally and there are macros for them. Although I wonder, why you need
> them in your project.
>
>
>>> 1. The lpi file stores the used path delimiter and converts the
>>> paths automatically.
>> Path delimiter conversion is not sufficient for the Lazarus related
>> directory names . Platform related conversions are needed ( if a
>> single LPI file used , or Platform specific Lazarus directory names
>> are stored with their tags to select during LPI loading with respect
>> to platform . )
>
> I never needed that. Can you give more details what you want to achieve?
>
>
>>> 2. The file names are stored as UTF-8.
>>> 3. The IDE always tries to store relative file names.
>>> 4. The IDE tries to find out the real file upper/lower under
>>> windows.
>>> 5. Machine specific information can be stored in a separate file
>>> (lps). 6. You can use macros for various platform specific path
>>> parts (e.g. TargetOS).
>>>
>>> Just store your project in one directory with sub directories and
>>> you can copy/share it anywhere.
>>>
>>>
>>>> It is necessary to modify the settings and store the
>>>> project_name.LPI with the effect that project_name.LPI developed
>>>> in Windows is lost .
>>> Please give an example.
>>>
>>
>> Assume you have three Intel ( or AMD ) processor based computers .
>>
>> (1) Windows
>> (2) Linux
>>
>>
>> In each of the above computers , develop a similar project by
>> including components from palettes with the similar types .
>>
>> Compile these projects in their computers . All of them will be
>> compiled
>>
>> successfully ( by using their defaults ).
>>
>>
>> Copy project files to a USB stick in Windows machine (1),
>> submit it to the third machine (3) having Linux identical to in
>> machine (2) .
>
> No problem. I do that every day.
>
>
>> You will get an error like : Graphics is not found .
>> depending on unit uses list order although the same program is
>> compiled successfully in the machine (2) .
>
> If it compiles, but the IDE can not find a unit, then you maybe setup
> the search paths only in the fpc.cfg.
> Have you added the LCL to project inspector dependencies?
>
>
>> The same project with the same structure is not compilable in another
>> platform only due to LPI differences .
>>
>>
>> The above example is also an answer to question by Graeme :
>>
>> --
>> -- I use the same project .lpi files under Linux, FreeBSD, DesktopBSD
>> and -- Windows. Lazarus IDE automatically handles directory
>> separators etc in -- the .lpi file. What problems do you experience?
>> --
>
> I still do not understand where the problem is.
>
>
>> [...]
>> My suggestion is to eliminate this incompatibility about directory
>> names structure of installed Lazarus in different platforms for LPI
>> files .
>>
>> Using Version control systems is a different case .
>>
>> Assume a student is using a computer at home and another at the
>> school with different platforms carrying his/her projects with a USB
>> stick or with a transportable hard disk .
>
> Pretty normal situation.
> Of course if something can be made wrong, then there will be a student
> who does.
>
>
> Mattias
>
>
I think initially my message did not specify the setup I have used which
caused different views .
In a Windows machine I have a project with a single form with most of
the components of Lazarus IDE palettes placed on it .
Lazarus is compiling it successfully when it is installed freshly after
previous installation has been removed completely .
I want to transport one of my programs from Windows to Linux .
I have installed a fresh Linux , Kubuntu 9.04 .
I have installed Lazarus .
No any other Pascal related installations or any other modifications to
any other configuration files .
To see which parts should be modified or improved just depending on
platform differences , I copied my All-Forms-Parts.* project files to a
USB stick .
In Linux , I created a directory and copied all the files there .
I have started Lazarus and started its compilation .
It gave the error : Graphics is not found .
In Lazarus , I generated the same project in a different directory
with the similar components . I compiled it . It compiled successfully .
The only difference is LPI file .
I thought reporting this experience would be useful .
Thank you very much .
Mehmet Erol Sanliturk
More information about the Lazarus
mailing list