Reputation: 7043
Is there any tool which can inject into an .exe or .dll information like File Version, Product name, Copyright, etc?
I did find a tool called StampVer but it can only modify resources that are already in the file itself. I could use it but would need to modify a bunch of Visual Studio projects to include some dummy information, and I would of course prefer to avoid that.
Upvotes: 2
Views: 2401
Reputation: 7043
I ended up adding a dummy resource version and will be using StampVer.
Upvotes: 2
Reputation: 941397
How many projects do you have? I timed it, it takes 3 seconds in Visual Studio. Right-click project, Add, Resource, select "Version", New.
Upvotes: 1
Reputation: 6770
You can make a header file that would define some things like e.g. #define MAJOR_VERSION 2
and #define MINOR_VERSION 1
(same with build numbers and whatever you need there). Then, #include
this header file from your .rc
file.
Now, to the automation of the process. Your build script can output this header file, incrementing various values. After a successful build, the file is commited to VCS, and then can be used on next iteration. There are ways of accomplishing this even with plain .cmd
files, using environment variables, however, if you can, use something more sophisticated like perl/python etc. for this task.
This works fine for producing releasable builds, and it's not the best solution if you need to increment a build number on every build you make on your development machine.
Upvotes: 2
Reputation: 3285
What kind of exe/dll are you creating? There are some easy solutions for .NET assemblies, and some difficult solutions for unmanaged assemblies.
For assemblies: http://www.codeproject.com/KB/dotnet/ManagingAssemblyVersions.aspx
Not exactly after the build, but this is what we do: We create an include file for C++ from a batch file & include it in the build process. The include has a define in it that is included in the resource file.
You can also use Visual studio to modify resources in a PE ( unmanged binary ). By hand you can modify all of the version resource.
Upvotes: 0