[Lazarus] Getting a program's "true name"
Mark Morgan Lloyd
markMLl.lazarus at telemetry.co.uk
Mon Oct 25 11:40:57 CEST 2010
Mattias Gaertner wrote:
>>> Going back to my original question, can I put something like this
>>>
>>> -dprojectname=heavy_wethers
>>>
>>> or even
>>>
>>> -dprojectname=$ProjFile()
>>>
>>> in the project settings, and then use it as
>>>
>>> projectName:= {$I %projectname% } ;
>
> In project1.lpr add
>
> uses FileUtil;
>
> ProjectName := ExtractFilenameOnly({$I %file%});
Very nice- thanks for that.
--
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