[Lazarus] Determining Laz/fpc version without using LCLVersion

Werner Pamler werner.pamler at freenet.de
Tue Jan 13 17:12:28 CET 2015


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?




More information about the Lazarus mailing list