[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Feature Question

From: <Chris.Stratmann_at_blum.com>
Date: 2006-05-23 13:39:40 CEST

> "Stefan Küng" <tortoisesvn@gmail.com> wrote on 05/23/2006 06:36:44 AM:
> > On 5/23/06, Chris.Stratmann@blum.com <Chris.Stratmann@blum.com> wrote:
> > Ok...Um...I am doing something a little different than what
> > programmers are doing. I am guessing you get questions regarding the
> > resource (rc) file in a C++ project and how to change the strings in
> > file before a final build is done so the resulting executable contains
> > proper strings. I understand this, but my situation is a little just
> > slightly different.
> > I need to change the version number and add in "Other Version
> > Information" on these exe's and dll's (This is located on the Version
> > can be found in the properties of the executable). The reason being
is that
> That's exactly the information contained in the *.rc file of a
> project. Those are the version resources of an executable (exe, dll).
> > I would like to look at the version number to find out what repository
> > version number this executable is without actually running it. This
> > possible with a little manipulation of the following
> > project...http://www.codeproject.com/library/VerInfoLib.asp
> > I figured out a solution to my own problem. In Microsoft
> > Studios there is a post-build option which allows my to run scripts
> > executables after building an exe or dll. Therefore I just hooked my
> > program that changing the version number into the post-build and
> > retrieve the version number out of the .svn\entries file to write my
> > version number on my exe or dll.
> Why do you want to modify the version string of your own executable
> *after* the build? You can do the same before the build, and the build
> will then automatically have the correct version info string.
> TortoiseSVN does the very same thing:
> we have the version information not just in our version.in/version.h
> header file, but the defines in that header file are also used in the
> *.rc2 file (included in the main *.rc file).
> That way, the version info is accurate after a build, without the need
> to modify the executable file after the build.
> Stefan

Yes you are correct that the *.rc file does change the .exe files version
number......But it is the "Other Version Information" that is also very
important. My final goal is to have an executable with not only its
repository version number but also a list of every dll and every dll's SVN
version number contained in the "Other Version Information" on that
executable. I have about 15 executables and about 20-30 dlls running. If
I wanted to do a rollback on an executable I have to also rollback its
dlls. I have no automated way of knowing which dlls relate to an
executable and their (dlls) SVN version number. Sure I could make a chart
and fill it out with which version number of dll relate to executable but
if it can be automated then why not. Now I put all this information on an
executables version tab through a somewhat complicated process.

To answer your response even further as to why "after" and not "before" is
because I am a lazy programmer, and I take the easy road which may not be
best road. There are two possibilities here. I could either have a
program to modify the .rc file using the "Pre-Link" option in Visual
Studios or have a program to modify the exe using the "Post-Build" option
in Visual Studios. Since modifying an exe using the "Post-Build" is
already complete and working then I am going to take that road because it
requires less programming.

Received on Tue May 23 13:39:55 2006

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.