LazUtils: Add unit LazVersion. Use it also for LCLVersion. Issue #33418, patch from Zoran Vučenović.

git-svn-id: trunk@57504 -
This commit is contained in:
juha 2018-03-14 08:21:54 +00:00
parent e5b4b7e6bd
commit d6934c9506
5 changed files with 49 additions and 8 deletions

1
.gitattributes vendored
View File

@ -3360,6 +3360,7 @@ components/lazutils/lazutils.lpk svneol=native#text/plain
components/lazutils/lazutils.pas svneol=native#text/pascal
components/lazutils/lazutils_defines.inc svneol=native#text/plain
components/lazutils/lazutilsstrconsts.pas svneol=native#text/pascal
components/lazutils/lazversion.pas svneol=native#text/pascal
components/lazutils/lconvencoding.pas svneol=native#text/pascal
components/lazutils/lcsvutils.pas svneol=native#text/pascal
components/lazutils/lookupstringlist.pas svneol=native#text/pascal

View File

@ -16,7 +16,7 @@
<Description Value="Useful units for Lazarus packages."/>
<License Value="Modified LGPL-2"/>
<Version Major="1"/>
<Files Count="96">
<Files Count="97">
<Item1>
<Filename Value="LazLoggerImpl.inc"/>
<Type Value="Include"/>
@ -401,6 +401,10 @@
<Filename Value="integerlist.pas"/>
<UnitName Value="integerlist"/>
</Item96>
<Item97>
<Filename Value="lazversion.pas"/>
<UnitName Value="lazversion"/>
</Item97>
</Files>
<LazDoc Paths="../../docs/xml/lazutils"/>
<i18n>

View File

@ -21,7 +21,7 @@ uses
StringHashList, TextStrings, Translations, TTCache, TTCalc, TTCMap, TTDebug,
TTError, TTFile, TTGLoad, TTInterp, TTLoad, TTMemory, TTObjs, TTProfile,
TTRASTER, TTTables, TTTypes, UTF8Process, HTML2TextRender, Laz_AVL_Tree,
CompWriterPas, LazPasReadUtil, IntegerList, LazarusPackageIntf;
CompWriterPas, LazPasReadUtil, IntegerList, LazVersion, LazarusPackageIntf;
implementation

View File

@ -0,0 +1,33 @@
{
/***************************************************************************
lazversion.pas
-------------------
Version numbers for Lazarus
***************************************************************************/
*****************************************************************************
This file is part of the LazUtils package
See the file COPYING.modifiedLGPL.txt, included in this distribution,
for details about the license.
*****************************************************************************
}
unit LazVersion;
{$mode objfpc}{$H+}
interface
const
laz_major = 1;
laz_minor = 9;
laz_release = 0;
laz_patch = 0;
laz_fullversion = ((laz_major * 100 + laz_minor) * 100 + laz_release) * 100 + laz_patch;
laz_version = '1.9.0.0';
implementation
end.

View File

@ -31,16 +31,19 @@ unit LCLVersion;
interface
uses
LazVersion;
type
TStringFunc = function: String;
const
lcl_major = 1;
lcl_minor = 9;
lcl_release = 0;
lcl_patch = 0;
lcl_fullversion = ((lcl_major * 100 + lcl_minor) * 100 + lcl_release) * 100 + lcl_patch;
lcl_version = '1.9.0.0';
lcl_major = laz_major;
lcl_minor = laz_minor;
lcl_release = laz_release;
lcl_patch = laz_patch;
lcl_fullversion = laz_fullversion;
lcl_version = laz_version;
var
lcl_revision_func: TStringFunc;