This is a bug that has actually been around for years. At least I think it is a bug.
I have the following configuration set for the Backup filename:
%PROJECTDIR%....\Backups\%PROJECTNAME%V%VERFILEVERSION%%YEAR%%MONTH%%DAY%_%HOUR%%MINUTE%
Although it used to work (many years ago), the %VERFILEVERSION% seems to produce odd results.
Here is my application version:
Here is the zip file that is produced:
FansSelect_V2013.0.0.0_20171121_1729.zip
I have manually changed the 2nd file under it to reflect what it should have been.
FansSelect_V9.1.2.0_20171121_1719.zip
Am I doing something wrong, or is this a bug?
[Delphi Version Unknown]
[Original Screenshots Attached]
This is because
GxOtaGetVersionInfoKeysStrings()was never upgraded when Delphi moved the version informations into the build configuration (maybe in Delphi XE or XE2).The patch attached tries to read the version informations from the active build configuration. But it leaves a memory leak on every call, because the function needs to create a TStringList, which will never get destroyed -- except when closing the IDE. So please take this patch as an idea, not as a solution.
The change was in XE2. Achim's fix works if the user has actually set the version information (that is things like company name etc.). If he has only enabled version info but not set any information, then the VerInfo_Keys value is empty even though it should at last contain the version number.
I have also changed GxOtaGetVersionInfoKeysStrings to expect an initialized TStrings as parameter to prevent the memory leak Achim mentions. This means that the the Project options set expert no longer works vor version information. I will create a new ticket for that but I think I will only implement it for older Delphi versions which did not have multiple build configurations.
Fix is in revision 2151.