cobines wrote:
2012/3/22 Mark Morgan Lloyd <markmll.laza...@telemetry.co.uk>:
At that point if there's an ./ide/revision.inc file containing
// Created by Svn2RevisionInc
const RevisionStr = '35880M';
can it be included into a unit to make it visible at compile time?
You can add "$(LazarusDir)\ide" to the include paths of the project.
Then this works:
{$I revision.inc}
const
revIntroducedNewFeature = '55555';
begin
{$IF (RevisionStr >= revIntroducedNewFeature)}
UseNewFeature;
{$ENDIF}
end;
True, although what I was really wondering was whether it could be
pulled in purely by referencing a unit, rather than having $I all over
the place. And there's still the issue of recovering gracefully if the
include file isn't available or the version is non-numeric, i.e. has an
appended M or reads "exported" because Lazarus wasn't built from SVN.
--
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.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus