[Lazarus] Getting a program's "true name"

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Sun Oct 24 17:44:47 CEST 2010


Marco van de Voort wrote:
> On Sun, Oct 24, 2010 at 01:38:42PM +0000, Mark Morgan Lloyd wrote:
>> Is it possible to get the original name of a project by doing something like
>>
>> scratch:= {$I %PROJFILE% };
> 
> Free Pascal doesn't know about projects, but can inline custom environment
> variables that way, if Lazarus would set them before running the compiler.

I use (*$IFDEF LCLGTK2 *) etc. in an "about" box, together with e.g. 
(*$I %FPCVERSION% *) and (*$I %DATE% *).

Noting that somebody was asking about getting the LCL version a few days 
ago, where I've had to do this I tend to rely on having a fairly tight 
fit between FPC and LCL versions.

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

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




More information about the Lazarus mailing list