Say I have some C++ project which builds an exe or dll file. The project is checked into a SVN repository. I want to automatically synchronize the revision from SVN with the version resource embedded in my exe/dll file, i.e. the version should be something like $major.$minor.$svn_revision.
Any ideas on how to achieve this? Are there any out-of-the-box solutions available?
Say I have some C++ project which builds an exe or dll file. The
Share
If you have TortoiseSVN installed, then there is a program installed with it,
SubWCRev.If, in your file, you have this value:
Then it’ll be replaced with the highest committed revision number if you execute something like this:
This will copy from
yourfile.txt.template, do the substitutions, and write toyourfile.txt.Note that there’s a lot of other macros you can use as well, if you execute
SubWCRevwithout any arguments, it’ll list them all on the console.