Why use JCL UNITVERSIONING?

一笑奈何 提交于 2019-12-04 12:02:43

问题


The JCL library have an conditional define UNITVERSIONING. I don't know why this option exists and don't know how to use this. I know that there are a unit called JclUnitVersioning.pas, but can't find a use.

Where to use this in a real word project?


回答1:


It supports the JclUnitVersioning unit, which exposes the constants like these in a more coherent way:

{$IFDEF UNITVERSIONING}
const
  UnitVersioning: TUnitVersionInfo = (
    RCSfile: '$URL: https://jcl.svn.sourceforge.net/svnroot/jcl/tags/JCL-1.101-    Build2725/jcl/source/common/Jcl8087.pas $';
    Revision: '$Revision: 1$';
    Date: '$Date: 12/05/2008 10:29:10$';
    LogPath: 'JCL\source\common'
    );
{$ENDIF UNITVERSIONING}

An old version of the JclUnitVersioning unit is here]1 and gives you a rough idea how it works: the unit has a global function GetUnitVersioning: TUnitVersioning; which gives you back the version information for all units that support UNITVERSIONING.

From there you can enumerate them, and ask for details.

This is very handy for instance when you want to know which exact version of a unit gets linked into your .EXE.

--jeroen



来源:https://stackoverflow.com/questions/5251165/why-use-jcl-unitversioning

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!