[Lazarus] Project LPI Files and Platforms

Mehmet Erol Sanliturk sanliturk at ttmail.com
Sat May 16 09:38:48 CEST 2009


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/


> 
> 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 . )


> 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) .

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) .


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?
--

>  
> 
> Most projects use the same settings under all platforms - that's the big
> advantage of Lazarus/FPC versus many other native compilers.
> 
> 
> Mattias
> 
> 


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 .


Thanks to all of the respondents very much .


Mehmet Erol Sanliturk















More information about the Lazarus mailing list