SVN version display switch

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
User avatar
bigglesworth
Novice
Novice
Posts: 211
Joined: 11 Nov 2007, 03:23
Location: Land of Ooo

SVN version display switch

Post by bigglesworth »

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
Manasource
Manasource
Posts: 4209
Joined: 01 Nov 2007, 17:35
Location: Internet

Re: SVN version display switch

Post by Jaxad0127 »

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, 03:23
Location: Land of Ooo

Re: SVN version display switch

Post by bigglesworth »

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, 16:08
Location: Germany

Re: SVN version display switch

Post by Crush »

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
Warrior
Warrior
Posts: 402
Joined: 20 Mar 2008, 14:34

Re: SVN version display switch

Post by fate »

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
Warrior
Warrior
Posts: 265
Joined: 11 Feb 2008, 00:09
Location: South Dakota in the US of A
Contact:

Re: SVN version display switch

Post by Superkoop »

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, 19:48
Location: Bern, Switzerland

Re: SVN version display switch

Post by Rotonen »

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
Founder
Founder
Posts: 2526
Joined: 13 Apr 2004, 19:11
Location: Italy
Contact:

Re: SVN version display switch

Post by ElvenProgrammer »

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