I never worked with Delphi before, so maybe the question looks a simple minded, But I need to change FileVersion in RES resource file parameter from command line...
3 Answers
Here can find the Borland resource compiler:
%ProgramFiles%\Borland\Delphi7\Bin\brcc32.exe
EDIT: As mghie mentioned you could create a RC file like this one:
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1, 0, 0, 100
PRODUCTVERSION 1, 0, 0, 1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x9L
#else
FILEFLAGS 0x8L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "Modified by BZCToOn's"
VALUE "CompanyName", "Syntheretix"
VALUE "FileDescription", "rcversion MFC Application"
VALUE "FileVersion", "1, 0, 0, 100"
VALUE "InternalName", "rcversion"
VALUE "LegalCopyright", "Copyleft (C) Bzc ToOn'S 2002"
VALUE "OriginalFilename", "rcversion.EXE"
VALUE "PrivateBuild", "RCVERSION-20030212_100"
VALUE "ProductName", "rcversion Application"
VALUE "ProductVersion", "1, 0, 0, 1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
(copied from http://www.codeproject.com/KB/applications/cb2rcversion.aspx)
And compile it using BRCC32
. Before you have to disable version information in project settings.
EDIT: Further information ...

- 19,610
- 8
- 73
- 87
-
1Of course you can. Disable the version resource in the project options, add a version resource to an rc file (maybe together with other resource types), compile this to res using the command line resource compiler, and include it in the program using the {$R filename.res} directive. More than one .res file can be linked into the application. Some things like getting the build number from SVN revision, or properly setting the DEBUG resource flag depending on the build type can't be done in the IDE. – mghie Jun 14 '09 at 14:48
-
1@Savash: MSDN has all the information you need: http://msdn.microsoft.com/en-us/library/aa380599(VS.85).aspx. You should make sure that you use the correct values in the "Translation" block, this depends on your language / the language your program is in. In most documentation and samples this will be set to English locale, you may need to change the values to your own. Again, see the MSDN documentation for further details. – mghie Jun 14 '09 at 15:22
Just going to add to ulrichb's answer...
Hint: Create an .RC file and use the {$R} directive to include it to your project.
{$R 'Splash.res' 'Splash.rc'}
Above directive is what I use to include an image for a splash screen. It will automatically compile the .RC file. As an option, you can just include the .RC to your Delphi project, in which case the above line will be added to your project file (*.DPR) and it will also automatically compile. (And you can use Delphi to edit the .RC file.)
Do be careful that you don't give the resource file the same name as your project file. This becomes too confusing for Delphi.

- 25,901
- 20
- 83
- 149
If you use delphi to build your application, you can turn on auto-incrementation of the buildnumber under projectsettings.
Or use StampVer

- 295,876
- 54
- 310
- 348

- 53,475
- 11
- 111
- 124
-
1
-
1@PaulDixon link is broken, is http://www.elphin.com/downloads/stampver/ the new location? – wimh Aug 02 '12 at 13:04
-
That link is fine, the other link is temporarily down. I'll ensure it is brought back up! – Paul Dixon Aug 02 '12 at 13:23
-
-