Version Info not applying to compiled Delphi program

I'm using FinalBuilder 6 to compile a Delphi 2007 project and for some reason the Version info is not getting set. I am using a before run script to setup some of them:

  Action.MajorVersion = Year(Date)
  Action.MinorVersion = Month(Date)
  Action.ReleaseVersion = Day(Date)

That was copied from another project where it works perfectly. I have tried changing the settings in CodeGear and managed to get slightly different results:

  • With the project in CodeGear set to compile with a specific version (e.g. 2011.7.21.build), FinalBuilder will compile it with that information. However, I want this to automatically update with the date so it's definitely not the solution.
  • With the project in CodeGear set to not use version info at all the version info is always blank after compiled by FinalBuilder.

So bascially it seems like FinalBuilder is still using the project info when compiling even though I have it setup in FinalBuilder to use its own version information.

Note: I'm getting file version by right clicking the file and looking at it's properties.

If you need any other information let me know. I'm pretty new to FinalBuilder so I might be missing something obvious.

Edit: Forgot to read the "Before you post" post.. so here's some more info:

Win 7 64bit (sp1)

Final Builder 6.3.0.1916

CodeGear™ Delphi® 2007 for Win32®

The project uses a few third party tools but I don't see how that would affect anything.

Make sure you have the Regenerate Resource option checked (on the delphi actions Project property page). If that is checked, the next thing to do is have a look in the project folder, there should be a projectname.rc file there that FinalBuilder generates. Open it in notepad and check that the version info is correct. If so then that would suggest that the compiler is not linking the generated .res file. You should have a {$R *.res} line in your projectname.dpr file somewhere.

HTH

Thanks a lot! I had tried checking that box once but that caused an error when building and I didn’t dig deeper. Turns out most of the files were read only (I use a program for sharing projects and it likes to keep things that way) and that only mattered when the Regenerate Resource option was checked. I used a little before and after scripting to toggle readonly on and off right before and after building on the files that were causing issues. Thanks again for the help.