[Lazarus] embed git version info

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Thu Mar 28 14:58:18 CET 2013


Mattias Gaertner wrote:
> On Thu, 28 Mar 2013 12:11:19 +0000
> Mark Morgan Lloyd <markMLl.lazarus at telemetry.co.uk> wrote:
> 
>> [...]
>>> The IDE converts \,/ in all paths when for example a project saved under
>>> Windows is opened under Linux.
>>> You can define OS dependent paths via the project macros. See project
>>> options / compiler options / IDE Macros / Conditionals.
>> Yes, but the backslashes in that command aren't paths.
> 
> Under Windows backslashes are typically directory separators, and often
> parameters contain file names.
> There is no simple way to tell what is what. The IDE must use a
> simple and consistent way.
> Maybe if both path delimiters are in a path, do not switch them.

I don't think that there's a 100% reliable heuristic, and there probably 
aren't many cases where this sort of thing has to be embedded in a 
Lazarus command. I'm happy enough with the hack that I've got, although 
I might be rather less so if I were using Windows regularly and it 
turned out that there wasn't a readily-available tr utility.

-- 
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