Hi,

Am Donnerstag, 5. Juli 2007 15:05 schrieb Michael Riepe:
> Hi!
>
> Ralph Glasstetter wrote:
> >>I know that feature from RCS/CVS. There you can define a set of static C
> >>strings:
> >>
> >>    static const char rcsid[] = "$Id$";
> >
> > That wouldn't help since with subversion every source file get's a
> > different revision number...
>
> In C++, you could define a class with an initializer that calculates the
> maximum at runtime, and instantiate it in every source file ;-)

That would be a nice an very transparent and portable implementation! :-))

> >>>For instance in dvbcut.cpp we could then use SVN_REV in your new
> >>>setCaption call to identify the binary.
> >>
> >>That would require that svnrev is available when you build the binary.
> >
> > Of course,... the small tool svnrev.c should be distributed with
> > subversion, build prior to dvbcut and run before building that to create
> > a svnref.h (by reading the expanded IDs and estimating the largest).
>
> You could also run `svnversion' from the toplevel directory, at least
> with subversion 1.4.
>
> The real problem is, however, that not everybody has subversion
> installed and/or wants to build dvbcut from svn.

Everybody needs a subversion client to compile from repository, but not every 
one uses "svn" (where svnversion comes from) for that purpose. For instance 
under Windows I'm using the "TortoiseSVN"  (which has SubWCrev AFAIK).

However,... for a officially released source code package we don't need that 
mechanism, since you can pack an appropriate svnrev.h (or whatever) which 
contains (or makes use) only of the real (official) version number (i.e. 
0.5.4)... without any revision number.

We don't have official releases such often, do we? 
So a little handwork don't matters... ;-)

> >
> > No,... It's not meant that you should run svnrev as the repository
> > maintainer and check in svnrev.h regularly (maybe only once as template
> > with variables set to 0). It don't has to (or should) be unter version
> > contol...
>
> See above. Not everybody uses svn.
No, but any subversion client... 

And even if someone really copies the source files by hand with a 
web(svn)browser from the repository he would be fine with the dummy svnrev.h 
which defaults to 0.  ;-)

ciao
Ralph

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
DVBCUT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dvbcut-user

Reply via email to