lclversion example: extended to show use of lcl_fullversion.

git-svn-id: trunk@28835 -
This commit is contained in:
vincents 2010-12-30 09:12:10 +00:00
parent d58923f26f
commit 4f67325894
2 changed files with 23 additions and 10 deletions

View File

@ -1,18 +1,22 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<Version Value="9"/>
<PathDelim Value="\"/> <PathDelim Value="\"/>
<Version Value="6"/>
<General> <General>
<Flags>
<LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InIDEConfig"/> <SessionStorage Value="InIDEConfig"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=".exe"/>
<Title Value="lclversionexample"/> <Title Value="lclversionexample"/>
</General> </General>
<VersionInfo> <VersionInfo>
<ProjectVersion Value=""/> <StringTable ProductVersion=""/>
</VersionInfo> </VersionInfo>
<BuildModes Count="1">
<Item1 Name="default" Default="True"/>
</BuildModes>
<PublishOptions> <PublishOptions>
<Version Value="2"/> <Version Value="2"/>
<IgnoreBinaries Value="False"/> <IgnoreBinaries Value="False"/>
@ -38,19 +42,20 @@
</Unit0> </Unit0>
<Unit1> <Unit1>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
<ComponentName Value="VersionForm"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ResourceFilename Value="unit1.lrs"/> <ComponentName Value="VersionForm"/>
<UnitName Value="Unit1"/> <UnitName Value="Unit1"/>
</Unit1> </Unit1>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="9"/>
<PathDelim Value="\"/> <PathDelim Value="\"/>
<CodeGeneration> <Parsing>
<Generate Value="Faster"/> <SyntaxOptions>
</CodeGeneration> <UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<Linking> <Linking>
<Options> <Options>
<Win32> <Win32>

View File

@ -41,6 +41,7 @@ begin
Memo1.Append(format('LCL Major: %d', [lcl_major])); Memo1.Append(format('LCL Major: %d', [lcl_major]));
Memo1.Append(format('LCL Minor: %d', [lcl_minor])); Memo1.Append(format('LCL Minor: %d', [lcl_minor]));
Memo1.Append(format('LCL Release: %d', [lcl_release])); Memo1.Append(format('LCL Release: %d', [lcl_release]));
Memo1.Append(format('LCL Full Version: %d', [lcl_fullversion]));
{$else} {$else}
Memo1.Append('No lcl version information available'); Memo1.Append('No lcl version information available');
{$endif} {$endif}
@ -56,6 +57,13 @@ begin
Memo1.Append('This program is compiled with lcl version 0.9.26 or later.'); Memo1.Append('This program is compiled with lcl version 0.9.26 or later.');
// you can use features available in 0.9.26 // you can use features available in 0.9.26
{$endif} {$endif}
{$if (lcl_fullversion) > 93002}
Memo1.Append('This program is compiled with lcl version after 0.9.30.2.');
// you can use features available in 0.9.30.3 and later (e.g. 0.9.31)
{$else}
Memo1.Append('This program is compiled with lcl version 0.9.30.2 or before.');
// you cannot use features introduced after 0.9.30.2
{$endif}
end; end;
initialization initialization