[Interest] compile SVN-Version into Project with qmake

Konrad Rosenbaum konrad at silmor.de
Thu Feb 16 21:41:27 CET 2012


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120216/c1041f70/attachment.sig>


More information about the Interest mailing list