Ken White
Re: Version Control and Update 5 or XE3

Re: Version Control and Update 5 or XE3


I'm about to try your suggested solution in a test program, and have some questions about the
resource script you gave:
  1) What is the meaning of the lines:
         BLOCK "StringFileInfo"
         BLOCK "040904E4"
         BLOCK "VarFileInfo"
         VALUE "Translation", 0x0409 0x04E4
2) Will any of those lines need to be changed because the OS language is Spanish ??? 0409 reminds
me of some Microsoft language code or something.

Thanks for your assistance,
-- JF
<Ken White> escribió en el mensaje news:✉
>> {quote:title=Jim Fleming wrote:}{quote}
>> development team. On that basis I think it is only right for me to expect Embarcadero to return 
>> the
>> old functionality without additional cost to me, the user.
> Only if they charged you specifically for the previous functionality. There's no guarantee 
> anywhere that the product won't change over time, or that each version will remain 100% compatible 
> with the prior version. (If that were the case, the addition of the 32-bit compiler and dropping 
> of the 16-bit one would have been an issue in Delphi 2's release a decade ago, for instance, or 
> the switch to using MSBuild in the IDE and for command-line compilation instead of relying on .cfg 
> and other files.)
>> As an additional question: Has anyone been able to "adjust" the generated version numbers to 
>> convert
>> them to auto-increment numbers in some automatic way, using the after-build facility, or maybe 
>> some
>> external program run just following each build, or by some other non-manual method ?? I would be
>> very interested in hearing how this could be done.
> You can do this pretty easily with your own utility app and a pre-build event for your project.
> Your utility would need to look in the project's folder (which can be passed on the command line 
> using $() macros in the pre-build event) for a version resource script (for instance, 
> 'ProjVersion.rc'). The text file contains a text VERSIONINFO resource - here's a sample:
> {code}
> FILEOS 0x4
> {
> BLOCK "StringFileInfo"
> {
> BLOCK "040904E4"
> {
> VALUE "CompanyName", "Your Company Name Here"
> VALUE "FileDescription", "Your File Description Here"
> VALUE "FileVersion", ""
> VALUE "InternalName", "Your Internal Name"
> VALUE "LegalCopyright", "© Your Copyright Notice"
> VALUE "LegalTrademarks", "Your Trademark Notice"
> VALUE "OriginalFilename", "YourExeName"
> VALUE "ProductName", "Your Product Name"
> VALUE "ProductVersion", ""
> VALUE "Comments", ""
> }
> }
> BLOCK "VarFileInfo"
> {
> VALUE "Translation", 0x0409 0x04E4
> }
> }
> {code}
> The utility simply updates the FILEVERSION value and the value in the "StringFileInfo" block where 
> the "FileVersion" is written and saves the file. (It can read the previous version, do the 
> incrementing, and write the updated version.)
> In your project, first turn off the inclusion of version information in the Project Options 
> dialog. Add to the project source (right below the "program" keyword:
> {code}
> {$R 'ProjVersion.res' 'ProjVersion.rc'}
> {code}
> This line causes the resource compiler to be invoked on the ProjVersion.rc file every time it 
> changes to re-create the ProjVersion.res file.
> Next, create a pre-build event that calls your utility, passing it $(PROJECTDIR)\ProjVersion.rc on 
> the command line. (You can choose from a list of these macros in the `Pre-Build event` dialog, 
> BTW.)
> Hmmm... Maybe I should do something along these lines myself... :-) I haven't, though, because 
> most of the stuff I work with is fine with the change in version numbers, as long as I can tell 
> from the version number which release of the app the user is running (the specific version doesn't 
> matter).
FYI: Phrase searches are enclosed in either single or double quotes
Originally created by
Tamarack Associates
Sat, 04 Dec 2021 09:50:47 UTC
Copyright © 2009-2021
HREF Tools Corp.