[Lazarus] Creating dbexport component: no icon

Reinier Olislagers reinierolislagers at gmail.com
Fri Sep 16 16:00:49 CEST 2011


On 16-9-2011 15:27, Vincent Snijders wrote:
> 2011/9/16 Reinier Olislagers <reinierolislagers at gmail.com>:
>>
>> Next question: this button/component will only work from FPC 2.6.x
>> onwards (due to dependency on fpxmlxsdexport.pp).
>> What is the best way to get this into Lazarus?
>> Conditional compilation with FPCVER or upload it as a patch in Mantis
>> with a note and a certain Lazarus target version?
> 
> Use conditional compilation in the sqldb package:
> http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/components/sqldb/registersqldb.pas?view=markup&root=lazarus
> 
> Vincent
Not sure if I get what you mean: I modified SQLDB to something like
....
{$IFDEF VER2_5_1}
{$DEFINE HASMYSQL51CONNECTION}
{$DEFINE HASSQLPARSER}
{$ENDIF}
....
{$IFDEF VER2_6_0}
{$DEFINE HASXMLXSDEXPORT}
{$ENDIF}
...

Then in regdbexport.pp use {$IFDEF HASXMLXSDEXPORT} to only include unit
and register component if that condition is met.

.lpk compiles with Lazarus with 2.5.1 FPC. Haven't tested installation.
Also compiles with Lazarus with 2.7.1 FPC but it seems VER2_6_0 is not
defined, so it doesn't work.

Is this the way you want it done?

Thanks,
Reinier




More information about the Lazarus mailing list