Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically update VersionInfo in packages AND projects?

Status
Not open for further replies.

GreenKnight

Programmer
Nov 9, 2001
17
0
0
GB
Hi,

I currently have a system with about 7 packages, and 20-ish projects. Each time I release a new version, I'd like to be able to update some of the VersionInfo (eg. product version, Copyright, File version) to be consistant. I am using Delphi 5.

Currently, we have a DOS batch file which does the build, using the command line compiler (BCC32.EXE) to do the actual compilation, but the batch file also does a whole lot of other stuff which is needed (such as compressing zip files, before compiling them in a resource/.RES file).

Does anyone know a way to automatically update the version information?

I have tried several solutions so far:
1) Change all the .DOF files to have the new information. FAILED: The command line compiler ignores the settings in the DOF file, and uses the .RES file directly.

2) Create a "Version.rc" file for each application and package, and have it compiled as part of the compile step. [This seems to be the standard approach suggested by many newgroup discussions.] FAILED: Version information in Packages is automatically compiled in ("include version information"), and cannot be turned off. Using a seperate Version.rc file causes a "duplicate resource" error.

3) Edit the .RES file directly (programmatically). FAILED: I'm not sure what the format for a .RES binary file is! The only thing I could find "out there" that did something similarly was Colin Wilson's resource editor (see but although the resulting .RES file was editable through a resource editor, calling VerQueryValue to get the '\VarFileInfo\Translation' section returned nothing (and hence I cannot access any version strings programmatically).

Any help would be greatly appreciated!

Thanks,
GreenKnight
rjr@techprt.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top