Menu

#62 Backup Project File Name Version Numbers

Closed
closed-fixed
None
5
2018-01-21
2018-01-13
Erik Berry
No

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]

1 Attachments

Discussion

  • Achim Kalwa

    Achim Kalwa - 2018-01-14

    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.

     
  • Thomas Mueller

    Thomas Mueller - 2018-01-21
    • status: open --> closed-fixed
    • assigned_to: Thomas Mueller
    • Group: New --> Closed
     
  • Thomas Mueller

    Thomas Mueller - 2018-01-21

    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.

     

Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.
Try Free →