[Lazarus] Project LPI Files and Platforms

Mattias Gaertner nc-gaertnma at netcologne.de
Sat May 16 06:41:13 CEST 2009


On Fri, 15 May 2009 08:31:27 -0400
Mehmet Erol Sanliturk <sanliturk at ttmail.com> wrote:

> 
> Dear Lazarus Developers ,
> 
> 
> Project LPI files are created at present as project_name.LPR and 
> project_name.LPI , and others .
> 
> This structure for LPI files is making difficult to develop the same 
> project for multiple platforms in the following sense .
> 
> Assume all of the source code is in a USB stick ( or in a comon
> server ) with project definition files .
> The initial project is developed in , for example , in Windows .
> When the same project is tried to be compiled in Linux , its LPI file
> is not compatible for the Linux Lazarus installation structure .

Why? What is not compatible?

1. The lpi file stores the used path delimiter and converts the paths
automatically.
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.

 
> ( I know it is possible to copy with a new name and apply other
> suitable steps . )
> 
> The same effects will be encountered when it is brought to FreeBSD .
> 
> To prevent such mismatches , my suggestion is as follows :
> 
> For each distinct Lazarus installation environment , use a different
> project name format for the LPI files :
> 
> For example : project_name.BSD.LPI
>                project_name.Linux.LPI
>                project_name.XP.LPI
> 
>                and possibly others .
> 
> Such a naming facility will require additional programming efforts ,
> but for multiple platform compilations , it will allow to use common
> servers by developers and compile the projects from any client only
> by using its own client platform related LPI file without affecting
> other platform LPI files  .

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


Mattias




More information about the Lazarus mailing list