SVN version display switch

Content and general development discussion, including maps, quests, and server code from the development team.
Post Reply
User avatar
bigglesworth
Novice
Novice
Posts: 211
Joined: 11 Nov 2007, 04:23
Location: Land of Ooo

SVN version display switch

Post by bigglesworth » 12 Jul 2008, 09:15

I know i can execute....

Code: Select all

tmw -v
and

Code: Select all

tmw --version
to display which client version I'm running.

But, other than at the time of compilation, is there a way to view which SVN version I'm running?
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Re: SVN version display switch

Post by Jaxad0127 » 12 Jul 2008, 17:03

I'm not sure how those are different. Do you want to have the SVN revision number in the executable?

Also, the client displays it's version number in one of the corners (I can't remember which one at the moment, but I think it's the upper left).
Image
User avatar
bigglesworth
Novice
Novice
Posts: 211
Joined: 11 Nov 2007, 04:23
Location: Land of Ooo

Re: SVN version display switch

Post by bigglesworth » 12 Jul 2008, 18:26

jaxad0127,

You are correct. The output is the same from both commands.

I apologize. I did not specify that I would like to see the SVN revision number in the 0.0.x (and future) clients.

It would be helpful to see the number in the login screen or through a command switch, rather than only the base number '0.0.24.1' in the top-left corner of the login screen.

I'd like to request this as a feature.

Should I create a Mantis ticket or request that this thread be moved to the 'Suggestions' topic?
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 17:08
Location: Germany

Re: SVN version display switch

Post by Crush » 12 Jul 2008, 19:09

I am not sure if it is possible to do this automatically.

Subversion can enter the revision a file was last changed automatically, but only when the specific file itself was changed. But the only file which is updated every single commit is the changelog.

Maybe Bjørn Lindeijer, our SVN guru, knows a solution to get the revision number into the client binary.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
fate
Novice
Novice
Posts: 402
Joined: 20 Mar 2008, 15:34

Re: SVN version display switch

Post by fate » 12 Jul 2008, 19:56

Hi,

As part of the configure script, run "svn info | grep '^Last Changed Rev' | cut -d' ' --field=4". The result might be empty or erroneous, but in that case you leave it as "". AC_DEFINE an appropriate constant, and you should be good to go. Recall that this is only a debug feature, so there's no need to be universal or subtle about it.

Hope that helps.

-- fate
User avatar
Superkoop
Novice
Novice
Posts: 265
Joined: 11 Feb 2008, 01:09
Location: South Dakota in the US of A
Contact:

Re: SVN version display switch

Post by Superkoop » 12 Jul 2008, 19:59

Maybe the changelog could include the revision number, and then when you config/compile it could automatically extract the revision number from there, and insert it into the data/help/header.txt.

Code: Select all

               T  H  E      M  A  N  A      W  O  R  L  D
               ==========================================
 
           Version:0.0.24.1              Date:7 April 2008
           SVN Revision:4405
                    Website: http://themanaworld.org
 
In game I am Xaru
On forums I am Superkoop
IRL I am John
-View World map-
User avatar
Rotonen
TMW Adviser
TMW Adviser
Posts: 3154
Joined: 08 Sep 2004, 20:48
Location: Espoo, Finland

Re: SVN version display switch

Post by Rotonen » 13 Jul 2008, 18:39

An automated solution which would provide it to the login screen would be preferred and nice on the long run. A conditional script to fetch the release number if available/applicable (SVN release tag should be parseable somehow?) and if not, fetch the SVN revision.

Anyone up to it?
This message used to be meaningful.
User avatar
ElvenProgrammer
TMW Adviser
TMW Adviser
Posts: 2526
Joined: 13 Apr 2004, 20:11
Location: Italy
Contact:

Re: SVN version display switch

Post by ElvenProgrammer » 14 Jul 2008, 08:01

Actually I was thinking about adding the revision number to the Win32 client, since I already have the info when I create the installer. I'll see if I can find sometime to do it.
Post Reply