You've already forked lazarus-ccr
RxFPC:implemented TRxVerxionInfo.LoadFromFile
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4643 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -48,6 +48,7 @@ type
|
|||||||
private
|
private
|
||||||
FValid: Boolean;
|
FValid: Boolean;
|
||||||
FValues:TStringList;
|
FValues:TStringList;
|
||||||
|
FFileName: string;
|
||||||
function GetComments: string;
|
function GetComments: string;
|
||||||
function GetCompanyName: string;
|
function GetCompanyName: string;
|
||||||
function GetFileDescription: string;
|
function GetFileDescription: string;
|
||||||
@@ -144,6 +145,8 @@ end;
|
|||||||
function TRxVersionInfo.GetFileName: string;
|
function TRxVersionInfo.GetFileName: string;
|
||||||
begin
|
begin
|
||||||
Result:=FValues.Values['OriginalFilename'];
|
Result:=FValues.Values['OriginalFilename'];
|
||||||
|
if Result = '' then
|
||||||
|
Result:=FFileName;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRxVersionInfo.GetFileVersion: string;
|
function TRxVersionInfo.GetFileVersion: string;
|
||||||
@@ -228,7 +231,7 @@ end;
|
|||||||
|
|
||||||
procedure TRxVersionInfo.SetFileName(const AValue: string);
|
procedure TRxVersionInfo.SetFileName(const AValue: string);
|
||||||
begin
|
begin
|
||||||
|
LoadFromFile(AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxVersionInfo.DoVersionInfo(V: TVersionResource);
|
procedure TRxVersionInfo.DoVersionInfo(V: TVersionResource);
|
||||||
@@ -262,6 +265,7 @@ var
|
|||||||
Reader:TAbstractResourceReader;
|
Reader:TAbstractResourceReader;
|
||||||
V:TVersionResource;
|
V:TVersionResource;
|
||||||
begin
|
begin
|
||||||
|
FFileName:=AFileName;
|
||||||
FValues.Clear;
|
FValues.Clear;
|
||||||
FValid:=false;
|
FValid:=false;
|
||||||
Reader:=nil;
|
Reader:=nil;
|
||||||
@@ -278,7 +282,7 @@ begin
|
|||||||
Res:=TResources.Create;
|
Res:=TResources.Create;
|
||||||
V:=nil;
|
V:=nil;
|
||||||
try
|
try
|
||||||
Res.LoadFromFile(ParamStr(0), Reader);
|
Res.LoadFromFile(AFileName, Reader);
|
||||||
for i:=0 to Res.Count-1 do
|
for i:=0 to Res.Count-1 do
|
||||||
begin
|
begin
|
||||||
if Res[i] is TVersionResource then
|
if Res[i] is TVersionResource then
|
||||||
|
Reference in New Issue
Block a user