Re: [Lazarus] Widget set definitions

2017-02-13 Thread Kostas Michalopoulos via Lazarus
The LCL package has this in custom definitions for dependent packages:

-dLCL -dLCL$(LCLWidgetType)

So Lazarus simply defines the LCL and LCL at compile time.
 is one of the subdirectories in lcl/interfaces.


On Mon, Feb 13, 2017 at 12:21 PM, Mark Morgan Lloyd via Lazarus <
lazarus@lists.lazarus-ide.org> wrote:

> On 13/02/17 10:00, Mattias Gaertner via Lazarus wrote:
>
>> On Mon, 13 Feb 2017 09:23:35 +Mark Morgan Lloyd via Lazarus <
>> lazarus@lists.lazarus-ide.org> wrote:
>>
>>> I've got a bit of diagnostic code that I add to most programs that >
>>> retrieves things like Subversion revision numbers and link-time build > ID.
>>> It also contains> > (*$IFDEF LCLQT *)>   widV= 'Linked with the Qt
>>> widget set';>(*$DEFINE WIDGETSET *)> (*$ENDIF   *)> (*$IFDEF
>>> LCLFPGUI *)> widV= 'Linked with the FPGUI widget set';>(*$DEFINE
>>> WIDGETSET *)> (*$ENDIF   *)> > and so on.> > Presumably LCLQT and the
>>> rest are defined somewhere in the IDE or LCL, > but where can I find this
>>> so that I can make sure that my code's kept in > step?
>>>
>> uses InterfaceBase, LCLPlatformDef;
>> widV:='Linked with '+LCLPlatformDisplayNames[WidgetSet.LCLPlatform]+'widget
>> set';
>>
>
> OK, Thanks. So I can see how I can derive the names etc. from that, it
> appears to have been supported since the dawn of time, and linking to it is
> still going to be no more intrusive than some of the other stuff that's
> already in my diagnostic unit.
>
> But out of curiosity, I'd still be very interested to know how the
> compile-time definitions like the ones in my example are generated :-)
>
> --
> 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
> Lazarus@lists.lazarus-ide.org
> http://lists.lazarus-ide.org/listinfo/lazarus
>
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Widget set definitions

2017-02-13 Thread Mark Morgan Lloyd via Lazarus

On 13/02/17 10:00, Mattias Gaertner via Lazarus wrote:

On Mon, 13 Feb 2017 09:23:35 +Mark Morgan Lloyd via Lazarus 
 wrote:

I've got a bit of diagnostic code that I add to most programs that > retrieves things like Subversion revision numbers and 
link-time build > ID. It also contains> > (*$IFDEF LCLQT *)>widV= 'Linked with the Qt widget set';>
(*$DEFINE WIDGETSET *)> (*$ENDIF   *)> (*$IFDEF LCLFPGUI *)> widV= 'Linked with the FPGUI widget set';>
(*$DEFINE WIDGETSET *)> (*$ENDIF   *)> > and so on.> > Presumably LCLQT and the rest are defined somewhere in 
the IDE or LCL, > but where can I find this so that I can make sure that my code's kept in > step?

uses InterfaceBase, LCLPlatformDef;
widV:='Linked with '+LCLPlatformDisplayNames[WidgetSet.LCLPlatform]+'widget 
set';


OK, Thanks. So I can see how I can derive the names etc. from that, it 
appears to have been supported since the dawn of time, and linking to it 
is still going to be no more intrusive than some of the other stuff 
that's already in my diagnostic unit.


But out of curiosity, I'd still be very interested to know how the 
compile-time definitions like the ones in my example are generated :-)


--
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
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Widget set definitions

2017-02-13 Thread Mattias Gaertner via Lazarus
On Mon, 13 Feb 2017 09:23:35 +
Mark Morgan Lloyd via Lazarus  wrote:

> I've got a bit of diagnostic code that I add to most programs that 
> retrieves things like Subversion revision numbers and link-time build 
> ID. It also contains
> 
> (*$IFDEF LCLQT *)
> widV= 'Linked with the Qt widget set';
>(*$DEFINE WIDGETSET *)
> (*$ENDIF   *)
> (*$IFDEF LCLFPGUI *)
> widV= 'Linked with the FPGUI widget set';
>(*$DEFINE WIDGETSET *)
> (*$ENDIF   *)
> 
> and so on.
> 
> Presumably LCLQT and the rest are defined somewhere in the IDE or LCL, 
> but where can I find this so that I can make sure that my code's kept in 
> step?

uses InterfaceBase, LCLPlatformDef;

widV:='Linked with '+LCLPlatformDisplayNames[WidgetSet.LCLPlatform]+'
widget set';

Mattias
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Widget set definitions

2017-02-13 Thread Ondrej Pokorny via Lazarus

On 13.02.2017 10:23, Mark Morgan Lloyd via Lazarus wrote:
Presumably LCLQT and the rest are defined somewhere in the IDE or LCL, 
but where can I find this so that I can make sure that my code's kept 
in step?


They are defined in the LCL package. See "package options -> usage -> 
custom" and "Compiler Options -> Custom Options".


Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus