[Lazarus] Is there some way packages can be designed to make developing them for different versions of Lazarus easier?

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Jul 17 13:44:12 CEST 2011


On Sat, 16 Jul 2011 16:43:16 +0100
Frank Church <vfclists at gmail.com> wrote:

> In relation to the earlier thread
> http://lists.lazarus.freepascal.org/pipermail/lazarus/2011-July/064884.html,
> are there some guidelines package designers must apply to ensure that they
> can be compiled by different versions and builds of Lazarus at the same
> time?

In general: Do not use new features. For example every version added
some macros.
See the release notes for new features and incompatibilities.

http://wiki.lazarus.freepascal.org/Lazarus_Development_Process#What_we_have_done

 
> I think it is a good idea as upgrading to new versions tend to break code
> over trivial changes that can be fixed with a few ifdefs.
> 
> PS. Are Lazarus .lpi files downward compatible? As they as XML based I think
> it is a matter of older versions neglecting fields and attributes they don't
> recognize.

The IDE can read and convert older lpi, lpk files.
There is no guarantee that an older IDE reads a new lpi/lpk file
correct.
And yes, it is true, that most new features simply gets new
elements/attributes, which are simply ignored by older IDE. So if you
don't use new features chances are high that an old IDE can fully read
the lpi/lpk.
Beware: Opening a new lpi/lpk with an old IDE and saving it will remove
the unknown elements/attributes.


Mattias




More information about the Lazarus mailing list