[Interest] compile SVN-Version into Project with qmake
Scott Aron Bloom
Scott.Bloom at onshorecs.com
Thu Feb 16 21:56:20 CET 2012
I have used the svn info for generation of those complex CMake (and bash scripts)
The XML option is fricken ingenious... Thanks!!
-----Original Message-----
From: interest-bounces+scott.bloom=onshorecs.com at qt-project.org [mailto:interest-bounces+scott.bloom=onshorecs.com at qt-project.org] On Behalf Of Konrad Rosenbaum
Sent: Thursday, February 16, 2012 12:41 PM
To: interest at qt-project.org
Subject: Re: [Interest] compile SVN-Version into Project with qmake
Hi,
On Thursday 16 February 2012, Scott Aron Bloom wrote:
> Unfrotunately, it doesn’t work well for versioning...
>
> Since the file wont change, svn wont update it... The CVS model
> always inserted the version on update...
>
> SVN doesnt
I implemented several versions of putting SVN revision numbers into the application.
Option 1: use a rather complex shell/perl/python/whatever script to generate a header file. The script can become arbitrarily complex if you want reliable information.
Option 2: use the --xml option to SVN to generate files:
svn info --batch --xml >svn-info.xml
svn status --batch --xml >svn-status.xml then include those files in a QRC file and use the Qt-XML classes to parse them - you can get quite detailed information from them.
Konrad
More information about the Interest
mailing list