Good day everyone.
Recently I've recognized some problems with ProductVersion field in the integrated Lazarus support of VersionInfo. Version of Lazarus is 1.6.4.
Attached patch fixes them. It's based on Lazarus codebase from the 1.6.4 release.
And also, you're have an typo on this page: https://www.lazarus-ide.org/index.php?page=contact
For reporting Isues
instead of
For reporting Issues
Hope that all this stuff will be useful.
_____
Dmitry D. Chernov
"And sorry for my bad English"
From 42f5ca4db0d685588c3a5375a57729b30f675876 Mon Sep 17 00:00:00 2001 From: "Dmitry D. Chernov" <[email protected]> Date: Tue, 3 Oct 2017 22:17:51 +1000 Subject: [PATCH] Fix problems with writing VersionInfo/ProductVersion to the project
This fixes next bugs:
1. XML path with typo: ProjectVersion instead of ProductVersion.
2. If ProjectVersion is equal to FileVersion, it would be reset after project reloading.
---
w32versioninfo.pas | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/w32versioninfo.pas b/w32versioninfo.pas
index ae6fccd..b8c2171 100644
--- a/w32versioninfo.pas
+++ b/w32versioninfo.pas
@@ -426,7 +426,6 @@ procedure TProjectVersionInfo.WriteToProjectFile(AConfig: TObject; Path: string)
var
i: integer;
Key: string;
- DefaultValue: String;
attr: TProjectVersionAttribute;
begin
with TXMLConfig(AConfig) do
@@ -451,11 +450,8 @@ begin
for i := 0 to StringTable.Count - 1 do begin
Key:=StringTable.Keys[i];
if Key='FileVersion' then continue; // FileVersion is created automatically
- DefaultValue:='';
- if (Key='ProductVersion') then
- DefaultValue:=BuildFileVersionString;
SetDeleteValue(Path + 'VersionInfo/StringTable/' + StringTable.Keys[i],
- StringTable.ValuesByIndex[i],DefaultValue);
+ StringTable.ValuesByIndex[i], '');
end;
end;
end;
@@ -516,7 +512,7 @@ begin
StringTable['LegalTrademarks'] := GetValue(Path + 'VersionInfo/LegalTrademarks/Value', '');
StringTable['OriginalFilename'] := GetValue(Path + 'VersionInfo/OriginalFilename/Value', '');
StringTable['ProductName'] := GetValue(Path + 'VersionInfo/ProductName/Value', '');
- StringTable['ProductVersion'] := GetValue(Path + 'VersionInfo/ProjectVersion/Value', BuildFileVersionString);
+ StringTable['ProductVersion'] := GetValue(Path + 'VersionInfo/ProductVersion/Value', BuildFileVersionString);
end;
SetFileVersionFromVersion;
--
2.10.0.windows.1
-- _______________________________________________ Lazarus mailing list [email protected] https://lists.lazarus-ide.org/listinfo/lazarus
