View Issue Details

IDProjectCategoryView StatusLast Update
0033418LazarusPatchpublic2018-10-09 11:48
ReporterZoran VučenovićAssigned ToJuha Manninen 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product VersionProduct Build 
Target VersionFixed in Version 
Summary0033418: Make version info available without LCLBase dependecy - add LazVersion unit to LazUtils
DescriptionLazarus version info is currently not available to programs which use LazUtils package, but do not need LCLBase dependecy.

I beleive that version info should be avalilable in LazUtils, without need for LCLBase.

I'm attaching LazVersion unit which should be saved in components/lazutils directory and a patch which includes this unit to LazUtils and changes LCLVersion unit to use this new unit.
TagsNo tags attached.
Fixed in Revisionr57504
LazTarget-
Widgetset
Attached Files
  • lazversion.pas (886 bytes)
  • lazversion.diff (2,144 bytes)
    Index: components/lazutils/lazutils.lpk
    ===================================================================
    --- components/lazutils/lazutils.lpk	(revision 57500)
    +++ components/lazutils/lazutils.lpk	(working copy)
    @@ -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>
    Index: components/lazutils/lazutils.pas
    ===================================================================
    --- components/lazutils/lazutils.pas	(revision 57500)
    +++ components/lazutils/lazutils.pas	(working copy)
    @@ -21,7 +21,7 @@
       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
     
    Index: lcl/lclversion.pas
    ===================================================================
    --- lcl/lclversion.pas	(revision 57500)
    +++ lcl/lclversion.pas	(working copy)
    @@ -31,16 +31,19 @@
     
     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;
    
    lazversion.diff (2,144 bytes)

Activities

Zoran Vučenović

2018-03-12 14:28

developer  

lazversion.pas (886 bytes)

Zoran Vučenović

2018-03-12 14:28

developer  

lazversion.diff (2,144 bytes)
Index: components/lazutils/lazutils.lpk
===================================================================
--- components/lazutils/lazutils.lpk	(revision 57500)
+++ components/lazutils/lazutils.lpk	(working copy)
@@ -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>
Index: components/lazutils/lazutils.pas
===================================================================
--- components/lazutils/lazutils.pas	(revision 57500)
+++ components/lazutils/lazutils.pas	(working copy)
@@ -21,7 +21,7 @@
   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
 
Index: lcl/lclversion.pas
===================================================================
--- lcl/lclversion.pas	(revision 57500)
+++ lcl/lclversion.pas	(working copy)
@@ -31,16 +31,19 @@
 
 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;
lazversion.diff (2,144 bytes)

Juha Manninen

2018-03-14 09:22

developer   ~0107102

Applied, thanks.

Issue History

Date Modified Username Field Change
2018-03-12 14:27 Zoran Vučenović New Issue
2018-03-12 14:28 Zoran Vučenović File Added: lazversion.pas
2018-03-12 14:28 Zoran Vučenović File Added: lazversion.diff
2018-03-14 09:20 Juha Manninen Assigned To => Juha Manninen
2018-03-14 09:20 Juha Manninen Status new => assigned
2018-03-14 09:22 Juha Manninen Fixed in Revision => r57504
2018-03-14 09:22 Juha Manninen Note Added: 0107102
2018-03-14 09:22 Juha Manninen Status assigned => resolved
2018-03-14 09:22 Juha Manninen Resolution open => fixed
2018-10-09 11:48 Zoran Vučenović Status resolved => closed