Werner Pamler wrote:
Since there's still quite a lot of people out there using rather old versions of Lazarus and fpc I began to extend fpspreadsheet such that it can be used with versions down to Laz 1.0 / fpc 2.6.0. As I saw it's only a few procedures that are missing. I added a unit "fpsFixes" to the package into which I want to copy the missing code from newer versions. Of course, to avoid duplicate code, I want to check the currently used versions and want to make heavy use of "$IF"s. I know that the unit "LCLVersion" provides information on the LCL version (lcl_fullversion). My problem, however, is that LCLVersion introduces a dependence on LCLBase. The package laz_fpspreadsheet so far has been quite slim (dependence on FCL and LazUtils), I am not sure if it is a good idea to bloat the basic package.

Is there another way to tell that the package is currently compiled with an older Laz/fpc version?

I've got a couple of things that I try to keep compatible with as many versions of FPC and Lazarus as possible, in case I want to make them available to an "outsider" who will probably have minimal patience with problems relating to widget set and development tool version.

In practice, I make no attempt to go earlier than FPC 2.2.4 (there are reasons for avoiding earlier compilers that do not need discussion) together with Lazarus 0.9.24 (fixes_0_9_24 from svn), which is about the earliest that has LCLVersion. I'd suggest not trying anything earlier since by a happy coincidence that combination is one of the last that's compatible with gtk1 and also performs reasonably well with older Windows versions.

On unix, with a bit of work it's possible to get svn revision numbers from the compiler etc.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to