Стартовый пул
This commit is contained in:
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
@@ -0,0 +1,20 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1, rxnew, lazcontrols;
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
@@ -0,0 +1,293 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
version="1.1"
|
||||
id="svg106"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="tmemorydata_rx.svg"
|
||||
inkscape:export-filename="D:\temp\rx\work\tmemorydata_rx.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<defs
|
||||
id="defs100">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient914"
|
||||
id="linearGradient226"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(4,0,0,4,-36.919643,-3108.2562)"
|
||||
x1="3"
|
||||
y1="1035.3622"
|
||||
x2="12"
|
||||
y2="1035.3622" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient914">
|
||||
<stop
|
||||
style="stop-color:#4276c4;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop910" />
|
||||
<stop
|
||||
id="stop916"
|
||||
offset="0.34375"
|
||||
style="stop-color:#80b3ff;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#0044aa;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop912" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
gradientTransform="matrix(4,0,0,4,-36.919643,-3120.2562)"
|
||||
y2="1035.3622"
|
||||
x2="12"
|
||||
y1="1035.3622"
|
||||
x1="3"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient932"
|
||||
xlink:href="#linearGradient914"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
y2="1035.3622"
|
||||
x2="12"
|
||||
y1="1035.3622"
|
||||
x1="3"
|
||||
gradientTransform="matrix(4,0,0,4,-36.919643,-3132.2557)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient936"
|
||||
xlink:href="#linearGradient914"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient914"
|
||||
id="linearGradient208"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(4,0,0,4,-36.919643,-3108.2562)"
|
||||
x1="3"
|
||||
y1="1035.3622"
|
||||
x2="12"
|
||||
y2="1035.3622" />
|
||||
<filter
|
||||
inkscape:label="Apparition"
|
||||
inkscape:menu="Blurs"
|
||||
inkscape:menu-tooltip="Edges are partly feathered out"
|
||||
style="color-interpolation-filters:sRGB"
|
||||
id="filter1434">
|
||||
<feMorphology
|
||||
radius="4"
|
||||
in="SourceGraphic"
|
||||
result="result0"
|
||||
id="feMorphology1428" />
|
||||
<feGaussianBlur
|
||||
in="result0"
|
||||
stdDeviation="8"
|
||||
result="result91"
|
||||
id="feGaussianBlur1430" />
|
||||
<feComposite
|
||||
operator="in"
|
||||
in="SourceGraphic"
|
||||
in2="result91"
|
||||
id="feComposite1432" />
|
||||
</filter>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="7.9999999"
|
||||
inkscape:cx="10.470445"
|
||||
inkscape:cy="11.096427"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer7"
|
||||
showgrid="true"
|
||||
units="px"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="706"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:snap-global="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid108" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata103">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="base"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-308.29999)">
|
||||
<rect
|
||||
style="fill:none;fill-rule:evenodd;stroke-width:0.43817803"
|
||||
id="rect110"
|
||||
width="24"
|
||||
height="24"
|
||||
x="0"
|
||||
y="308.29999" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="db"
|
||||
transform="translate(0,-24)">
|
||||
<g
|
||||
style="display:inline"
|
||||
id="g899"
|
||||
transform="matrix(0.5,0,0,0.5,18.459821,-478.59625)">
|
||||
<ellipse
|
||||
ry="3"
|
||||
rx="10"
|
||||
cy="1030.1925"
|
||||
cx="-20.919643"
|
||||
id="ellipse880"
|
||||
style="opacity:1;fill:#bdd1ec;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient208);stroke-width:3.99999976;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
|
||||
<ellipse
|
||||
ry="3.9169633"
|
||||
rx="10.988618"
|
||||
cy="1026.2755"
|
||||
cx="-20.919643"
|
||||
id="ellipse878"
|
||||
style="opacity:1;fill:#bdd1ec;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
|
||||
<ellipse
|
||||
style="opacity:1;fill:#bdd1ec;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient932);stroke-width:3.99999976;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
id="ellipse930"
|
||||
cx="-20.919643"
|
||||
cy="1024.1925"
|
||||
rx="10"
|
||||
ry="3" />
|
||||
<ellipse
|
||||
style="opacity:1;fill:#bdd1ec;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
id="ellipse874"
|
||||
cx="-20.919643"
|
||||
cy="1020.2756"
|
||||
rx="10.988618"
|
||||
ry="3.9169633" />
|
||||
<ellipse
|
||||
ry="3"
|
||||
rx="10"
|
||||
cy="1018.1926"
|
||||
cx="-20.919643"
|
||||
id="ellipse934"
|
||||
style="opacity:1;fill:#bdd1ec;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient936);stroke-width:3.99999976;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
|
||||
<ellipse
|
||||
ry="3.9169633"
|
||||
rx="10.988618"
|
||||
cy="1014.2756"
|
||||
cx="-20.919643"
|
||||
id="ellipse858"
|
||||
style="opacity:1;fill:#bdd1ec;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
|
||||
<ellipse
|
||||
style="opacity:1;fill:#80b3ff;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient226);stroke-width:1.99999988;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
id="ellipse868"
|
||||
cx="-20.919643"
|
||||
cy="1012.1926"
|
||||
rx="11"
|
||||
ry="4" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="mem_basic"
|
||||
style="display:inline"
|
||||
transform="translate(0,-24)">
|
||||
<rect
|
||||
style="opacity:1;fill:#0060b0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
id="rect840"
|
||||
width="20"
|
||||
height="9"
|
||||
x="2"
|
||||
y="37.999989"
|
||||
ry="2.5" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer5"
|
||||
inkscape:label="mem_text"
|
||||
style="display:inline"
|
||||
transform="translate(0,-24)">
|
||||
<path
|
||||
id="path840"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.96616817;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 12.032615,44.510329 h 1.449252 m -1.449252,-1.932332 h 1.449252 m 0,-1.932338 h -1.932334 v 3.86467"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path845"
|
||||
d="m 5.5727733,44.51691 4.89e-5,-3.864525 1.932288,2.173732 1.9323361,-2.173877 v 3.86467"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.96616817;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.96616817;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 15.550958,44.516913 4.9e-5,-3.864525 1.932287,2.173732 1.932335,-2.173877 v 3.86467"
|
||||
id="path899"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer4"
|
||||
inkscape:label="arrow"
|
||||
style="display:inline"
|
||||
transform="translate(0,-24)">
|
||||
<g
|
||||
transform="matrix(0.5,0,0,0.5,0,-478.18105)"
|
||||
id="g103"
|
||||
style="fill:#80b3ff;fill-opacity:1;stroke:#0060b0;stroke-opacity:1">
|
||||
<path
|
||||
sodipodi:nodetypes="cccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path905"
|
||||
d="m 32,1010.3622 v 18 l 12,-9 z"
|
||||
style="fill:#80b3ff;fill-opacity:1;fill-rule:evenodd;stroke:#0060b0;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer7"
|
||||
inkscape:label="text"
|
||||
transform="translate(0,-24)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot914-84"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:1.25;font-family:'Arial Unicode MS';-inkscape-font-specification:'Arial Unicode MS';letter-spacing:0px;word-spacing:0px;fill:#c500ab;fill-opacity:1;stroke:#ffffff;stroke-width:2.96764684;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
|
||||
transform="matrix(0.46354284,0,0,0.55114772,-1.2832947,23.859648)"><flowRegion
|
||||
id="flowRegion916-4"
|
||||
style="fill:#c500ab;fill-opacity:1;stroke:#ffffff;stroke-width:2.96764684;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"><rect
|
||||
id="rect918-7"
|
||||
width="38.14209"
|
||||
height="34.674625"
|
||||
x="3.4674628"
|
||||
y="-1.8781176"
|
||||
style="fill:#c500ab;fill-opacity:1;stroke:#ffffff;stroke-width:2.96764684;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill" /></flowRegion><flowPara
|
||||
id="flowPara920-5"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:21.33333397px;font-family:Arial;-inkscape-font-specification:'Arial Bold';stroke:#ffffff;stroke-width:2.96764684;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill">Rx</flowPara></flowRoot> </g>
|
||||
</svg>
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,316 @@
|
||||
{ RxVersInfo is part of RxFPC library
|
||||
|
||||
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
|
||||
original conception from rx library for Delphi (c)
|
||||
|
||||
This library is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version with the following modification:
|
||||
|
||||
As a special exception, the copyright holders of this library give you
|
||||
permission to link this library with independent modules to produce an
|
||||
executable, regardless of the license terms of these independent modules,and
|
||||
to copy and distribute the resulting executable under terms of your choice,
|
||||
provided that you also meet, for each linked independent module, the terms
|
||||
and conditions of the license of that module. An independent module is a
|
||||
module which is not derived from or based on this library. If you modify
|
||||
this library, you may extend this exception to your version of the library,
|
||||
but you are not obligated to do so. If you do not wish to do so, delete this
|
||||
exception statement from your version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
}
|
||||
|
||||
unit RxVersInfo;
|
||||
|
||||
{$mode objfpc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, versionresource, lclversion;
|
||||
|
||||
type
|
||||
TLongVersion = string;
|
||||
TVersionCharSet = string;
|
||||
TVersionLanguage = string;
|
||||
|
||||
{ TRxVersionInfo }
|
||||
|
||||
TRxVersionInfo = class(TComponent)
|
||||
private
|
||||
FValid: Boolean;
|
||||
FValues:TStringList;
|
||||
FFileName: string;
|
||||
function GetComments: string;
|
||||
function GetCompanyName: string;
|
||||
function GetFileDescription: string;
|
||||
function GetFileLongVersion: TLongVersion;
|
||||
function GetFileName: string;
|
||||
function GetFileVersion: string;
|
||||
//function GetFixedFileInfo: PVSFixedFileInfo;
|
||||
function GetInternalName: string;
|
||||
function GetLegalCopyright: string;
|
||||
function GetLegalTrademarks: string;
|
||||
function GetOriginalFilename: string;
|
||||
function GetPrivateBuild: string;
|
||||
function GetProductLongVersion: TLongVersion;
|
||||
function GetProductName: string;
|
||||
function GetProductVersion: string;
|
||||
function GetSpecialBuild: string;
|
||||
function GetTranslation: Pointer;
|
||||
function GetVerFileDate: TDateTime;
|
||||
function GetVersionCharSet: TVersionCharSet;
|
||||
function GetVersionLanguage: TVersionLanguage;
|
||||
function GetVersionNum: Longint;
|
||||
function GetVerValue(const VerName: string): string;
|
||||
function GetWidgetName: string;
|
||||
procedure SetFileName(const AValue: string);
|
||||
procedure DoVersionInfo(V:TVersionResource);
|
||||
protected
|
||||
{ Protected declarations }
|
||||
public
|
||||
constructor Create(AOwner: TComponent);override;
|
||||
destructor Destroy; override;
|
||||
procedure LoadFromFile(const AFileName:string);
|
||||
|
||||
property FileName: string read GetFileName write SetFileName;
|
||||
property Valid: Boolean read FValid;
|
||||
//property FixedFileInfo: PVSFixedFileInfo read GetFixedFileInfo;
|
||||
property FileLongVersion: TLongVersion read GetFileLongVersion;
|
||||
property ProductLongVersion: TLongVersion read GetProductLongVersion;
|
||||
property Translation: Pointer read GetTranslation;
|
||||
property VersionLanguage: TVersionLanguage read GetVersionLanguage;
|
||||
property VersionCharSet: TVersionCharSet read GetVersionCharSet;
|
||||
property VersionNum: Longint read GetVersionNum;
|
||||
property Comments: string read GetComments;
|
||||
property CompanyName: string read GetCompanyName;
|
||||
property FileDescription: string read GetFileDescription;
|
||||
property FileVersion: string read GetFileVersion;
|
||||
property InternalName: string read GetInternalName;
|
||||
property LegalCopyright: string read GetLegalCopyright;
|
||||
property LegalTrademarks: string read GetLegalTrademarks;
|
||||
property OriginalFilename: string read GetOriginalFilename;
|
||||
property ProductVersion: string read GetProductVersion;
|
||||
property ProductName: string read GetProductName;
|
||||
property SpecialBuild: string read GetSpecialBuild;
|
||||
property PrivateBuild: string read GetPrivateBuild;
|
||||
property Values[const VerName: string]: string read GetVerValue;
|
||||
property VerFileDate: TDateTime read GetVerFileDate;
|
||||
published
|
||||
property WidgetName:string read GetWidgetName;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
uses FileUtil, resource, resreader, InterfaceBase, rxconst, LazFileUtils,
|
||||
LazUTF8
|
||||
{$IFDEF WINDOWS}
|
||||
, winpeimagereader
|
||||
{$ENDIF}
|
||||
{$IFDEF LINUX}
|
||||
, elfreader
|
||||
{$ENDIF}
|
||||
{$IF (lcl_major > 0) and (lcl_minor > 6)}, LCLPlatformDef {$ENDIF};
|
||||
|
||||
|
||||
{ TRxVersionInfo }
|
||||
|
||||
function TRxVersionInfo.GetComments: string;
|
||||
begin
|
||||
Result:=FValues.Values['Comments'];
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetCompanyName: string;
|
||||
begin
|
||||
Result:=FValues.Values['CompanyName'];
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetFileDescription: string;
|
||||
begin
|
||||
Result:=FValues.Values['FileDescription'];
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetFileLongVersion: TLongVersion;
|
||||
begin
|
||||
Result:=FValues.Values['FileVersion'];
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetFileName: string;
|
||||
begin
|
||||
Result:=FValues.Values['OriginalFilename'];
|
||||
if Result = '' then
|
||||
Result:=FFileName;
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetFileVersion: string;
|
||||
begin
|
||||
Result:=FValues.Values['FileVersion'];
|
||||
end;
|
||||
|
||||
{function TRxVersionInfo.GetFixedFileInfo: PVSFixedFileInfo;
|
||||
begin
|
||||
Result:='';
|
||||
end;}
|
||||
|
||||
function TRxVersionInfo.GetInternalName: string;
|
||||
begin
|
||||
Result:=FValues.Values['InternalName'];
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetLegalCopyright: string;
|
||||
begin
|
||||
Result:=FValues.Values['LegalCopyright'];
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetLegalTrademarks: string;
|
||||
begin
|
||||
Result:=FValues.Values['LegalTrademarks'];
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetOriginalFilename: string;
|
||||
begin
|
||||
Result:=FValues.Values['LegalTrademarks'];
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetPrivateBuild: string;
|
||||
begin
|
||||
Result:='';
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetProductLongVersion: TLongVersion;
|
||||
begin
|
||||
Result:='';
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetProductName: string;
|
||||
begin
|
||||
Result:=FValues.Values['ProductName'];
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetProductVersion: string;
|
||||
begin
|
||||
Result:=FValues.Values['ProductVersion'];
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetSpecialBuild: string;
|
||||
begin
|
||||
Result:='';
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetTranslation: Pointer;
|
||||
begin
|
||||
Result:=nil;
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetVerFileDate: TDateTime;
|
||||
begin
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetVersionCharSet: TVersionCharSet;
|
||||
begin
|
||||
Result:='';
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetVersionLanguage: TVersionLanguage;
|
||||
begin
|
||||
Result:='';
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetVersionNum: Longint;
|
||||
begin
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
procedure TRxVersionInfo.SetFileName(const AValue: string);
|
||||
begin
|
||||
LoadFromFile(AValue);
|
||||
end;
|
||||
|
||||
procedure TRxVersionInfo.DoVersionInfo(V: TVersionResource);
|
||||
var
|
||||
i,j:integer;
|
||||
begin
|
||||
for i:=0 to V.StringFileInfo.Count-1 do
|
||||
begin
|
||||
for j:=0 to V.StringFileInfo[i].Count-1 do
|
||||
FValues.Values[V.StringFileInfo[i].Keys[j]]:=SysToUTF8(V.StringFileInfo[i].ValuesByIndex[j]);
|
||||
end;
|
||||
end;
|
||||
|
||||
constructor TRxVersionInfo.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FValues:=TStringList.Create;
|
||||
LoadFromFile(ParamStr(0));
|
||||
end;
|
||||
|
||||
destructor TRxVersionInfo.Destroy;
|
||||
begin
|
||||
FreeAndNil(FValues);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TRxVersionInfo.LoadFromFile(const AFileName: string);
|
||||
var
|
||||
Res:TResources;
|
||||
i:integer;
|
||||
Reader:TAbstractResourceReader;
|
||||
V:TVersionResource;
|
||||
begin
|
||||
FFileName:=AFileName;
|
||||
FValues.Clear;
|
||||
FValid:=false;
|
||||
Reader:=nil;
|
||||
{$IFDEF WINDOWS}
|
||||
Reader:=TWinPEImageResourceReader.Create;
|
||||
{$ENDIF}
|
||||
{$IFDEF LINUX}
|
||||
Reader:=TElfResourceReader.Create;
|
||||
{$ENDIF}
|
||||
|
||||
if Reader = nil then
|
||||
exit;
|
||||
|
||||
Res:=TResources.Create;
|
||||
V:=nil;
|
||||
try
|
||||
Res.LoadFromFile(AFileName, Reader);
|
||||
for i:=0 to Res.Count-1 do
|
||||
begin
|
||||
if Res[i] is TVersionResource then
|
||||
V:=Res[i] as TVersionResource;
|
||||
end;
|
||||
FValid:=Assigned(V);
|
||||
if FValid then
|
||||
DoVersionInfo(V);
|
||||
finally
|
||||
Res.Free;
|
||||
Reader.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetVerValue(const VerName: string): string;
|
||||
begin
|
||||
Result:=FValues.Values[VerName];
|
||||
end;
|
||||
|
||||
function TRxVersionInfo.GetWidgetName: string;
|
||||
begin
|
||||
{$IF (lcl_fullversion < 01070000)}
|
||||
Result:=sWidget + LCLPlatformDirNames[WidgetSet.LCLPlatform];
|
||||
{$ELSE}
|
||||
Result:=sWidget + LCLPlatformDisplayNames[WidgetSet.LCLPlatform];
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
end.
|
Reference in New Issue
Block a user