From: <baz...@us...> - 2009-01-04 22:22:38
|
Revision: 8739 http://armagetronad.svn.sourceforge.net/armagetronad/?rev=8739&view=rev Author: bazaarmagetron Date: 2009-01-04 21:33:22 +0000 (Sun, 04 Jan 2009) Log Message: ----------- epsy: New version labelling script, also includes --versioninfo and /help version Modified Paths: -------------- armagetronad/trunk/armagetronad/.bzrignore armagetronad/trunk/armagetronad/Makefile.am armagetronad/trunk/armagetronad/batch/make/version armagetronad/trunk/armagetronad/language/english_base.txt armagetronad/trunk/armagetronad/src/Makefile.am armagetronad/trunk/armagetronad/src/engine/ePlayer.cpp armagetronad/trunk/armagetronad/src/network/nNetwork.cpp armagetronad/trunk/armagetronad/src/tools/tCommandLine.cpp armagetronad/trunk/armagetronad/src/tools/tLocale.cpp armagetronad/trunk/armagetronad/src/tools/tLocale.h Property Changed: ---------------- armagetronad/trunk/armagetronad/ Property changes on: armagetronad/trunk/armagetronad ___________________________________________________________________ Modified: bzr:revision-info - timestamp: 2009-01-03 17:15:50.917999983 -0600 committer: da...@da... properties: branch-nick: armagetronad + timestamp: 2009-01-04 21:20:20.818000078 +0100 committer: epsy <ep...@fr...> properties: branch-nick: trunk rebase-of: ep...@fr...-20090104202020-2fya7jtgdvs26iao Modified: bzr:revision-id:v3-list-QlpoOTFBWSZTWZvbKhsAAAdRgAAQABK6798QIABURMgAAaeoNT1TxT1DQbKaeobXKiyAmlWT7Y5MkdJOtXDtB7w7DOGFBHiOBxaUIu7HQyyQSvxdyRThQkJvbKhs - 613 z-...@us...-20080211141509-cwbrb6hmtz9313jr 626 z-...@us...-20080214170110-rhfpd874zuogr3cm 627 z-...@us...-20080214170244-1gstsfe9yzyvrx9b 657 z-...@us...-20080301093905-0jwh1zg9srukp8fn 678 wrt...@us...-20080320130546-cr72y7d9q5a8nk7a 679 z-...@us...-20080324202056-eybvkm0gjomywbcq 680 z-...@us...-20080326104303-kpkkrwiw1fioi0rd 681 epsy-20080327213346-setzm7umdzzuk2dm 683 wrt...@us...-20080402122117-54nak33inuca02o9 684 wrt...@us...-20080402122804-2xhc8bgyrjsa09cd 685 wrt...@us...-20080418093840-cxtpql4xw2vsbmyn 686 ep...@fr...-20080418200503-q16s8az3yewn4x7a 687 ep...@fr...-20080419004917-bq4vguy9vpbkmlo3 688 wrt...@us...-20080419185850-ksm1feadrrhqigjb 689 wrt...@us...-20080423170738-zb8v72r0asm7cp52 691 ep...@fr...-20080427145818-212ave5ohdhth4ph 692 epsy46-20080428164518-07b9wsj90rf82c3y 693 epsy46-20080429194430-hq3fd6i1mnz1vrnz 694 ep...@fr...-20080518131839-uik8hj18c55boh3m 696 z-...@us...-20080618212520-e6ov1rb9b9edwt30 697 wrt...@us...-20080708142300-tu6f7ag7ak0yhdrf 698 wrt...@us...-20080727173310-pv1vq0wj01yfwgfl 699 da...@da...-20080824021014-8aacq5gfp7ktxlxz 700 da...@da...-20080824055426-l5dwhb216uteu7ca 701 da...@da...-20080824172432-lvagd99j28hq8uc1 702 da...@da...-20080824225545-ply97boo9jkqtysn 704 ep...@fr...-20081027173216-nh6d92edtwe35j2g 705 ep...@fr...-20081027203505-42bpegw0fyywzyou 706 ep...@fr...-20081027204727-jcx89jukht9ay72r 707 ep...@fr...-20081028180734-62o6e90rf020xzv8 708 ep...@fr...-20081028224044-f3myemuy87v52ilp 709 ep...@fr...-20081110193848-iksu9rmzzi7jb0qq 710 ep...@fr...-20081114212232-i1q12n375bdpl0sp 712 z-...@us...-20081211141049-wbjceadupsfss5ib 713 da...@da...-20081216223143-1hso83uxyagaubg8 716 lee...@gm...-20081220084635-zv6bpm9rar9yufy7 717 lee...@gm...-20081220085046-6rwe6cqmdlffs4rl 718 lee...@gm...-20081220085502-gpad43pu99t1e6po 719 lee...@gm...-20081220092821-q7uj4w92j6a3a7eb 720 lee...@gm...-20081220094339-k3zb139qp87r4b2w 721 lee...@gm...-20081220100858-uap7k5s22tbipzkt 722 lee...@gm...-20081220111203-rhp5p15agx73xi1k 723 lee...@gm...-20081220112757-mjp2yffddjy5s74e 724 lee...@gm...-20081220114653-k2dqt4wiizipbwas 725 lee...@gm...-20081221181637-6d0tfx7sx7syxfb6 726 lee...@gm...-20081221182603-9bkelm9x7aclb0bw 734 lee...@gm...-20081230173103-fmzio9fanap2rybf 735 lee...@gm...-20081230174204-cppkz4sumguhysa9 736 lee...@gm...-20081230174738-mecjttlpyp1i859c 737 lee...@gm...-20081230174816-qmtp2a3q8m52jsn3 738 lee...@gm...-20081230194247-q6oyx6cqfz03b2lr 739 lee...@gm...-20081231202038-odzabc3wmlqzvskt 740 lee...@gm...-20081231203835-nn2kezh1el82dn1q 741 lee...@gm...-20090101022727-myjxnrvqe5e4l1wz 743 da...@da...-20090103170253-cdtppjz8nzwhngst 744 da...@da...-20090103183413-r1852m22og3lh2uc 745 lee...@gm...-20090103212852-mvsergjd4ao1la77 746 da...@da...-20090103231550-6zn9qzo6gpj9kwu8 + 613 z-...@us...-20080211141509-cwbrb6hmtz9313jr 626 z-...@us...-20080214170110-rhfpd874zuogr3cm 627 z-...@us...-20080214170244-1gstsfe9yzyvrx9b 657 z-...@us...-20080301093905-0jwh1zg9srukp8fn 678 wrt...@us...-20080320130546-cr72y7d9q5a8nk7a 679 z-...@us...-20080324202056-eybvkm0gjomywbcq 680 z-...@us...-20080326104303-kpkkrwiw1fioi0rd 681 epsy-20080327213346-setzm7umdzzuk2dm 683 wrt...@us...-20080402122117-54nak33inuca02o9 684 wrt...@us...-20080402122804-2xhc8bgyrjsa09cd 685 wrt...@us...-20080418093840-cxtpql4xw2vsbmyn 686 ep...@fr...-20080418200503-q16s8az3yewn4x7a 687 ep...@fr...-20080419004917-bq4vguy9vpbkmlo3 688 wrt...@us...-20080419185850-ksm1feadrrhqigjb 689 wrt...@us...-20080423170738-zb8v72r0asm7cp52 691 ep...@fr...-20080427145818-212ave5ohdhth4ph 692 epsy46-20080428164518-07b9wsj90rf82c3y 693 epsy46-20080429194430-hq3fd6i1mnz1vrnz 694 ep...@fr...-20080518131839-uik8hj18c55boh3m 696 z-...@us...-20080618212520-e6ov1rb9b9edwt30 697 wrt...@us...-20080708142300-tu6f7ag7ak0yhdrf 698 wrt...@us...-20080727173310-pv1vq0wj01yfwgfl 699 da...@da...-20080824021014-8aacq5gfp7ktxlxz 700 da...@da...-20080824055426-l5dwhb216uteu7ca 701 da...@da...-20080824172432-lvagd99j28hq8uc1 702 da...@da...-20080824225545-ply97boo9jkqtysn 704 ep...@fr...-20081027173216-nh6d92edtwe35j2g 705 ep...@fr...-20081027203505-42bpegw0fyywzyou 706 ep...@fr...-20081027204727-jcx89jukht9ay72r 707 ep...@fr...-20081028180734-62o6e90rf020xzv8 708 ep...@fr...-20081028224044-f3myemuy87v52ilp 709 ep...@fr...-20081110193848-iksu9rmzzi7jb0qq 710 ep...@fr...-20081114212232-i1q12n375bdpl0sp 712 z-...@us...-20081211141049-wbjceadupsfss5ib 713 da...@da...-20081216223143-1hso83uxyagaubg8 716 lee...@gm...-20081220084635-zv6bpm9rar9yufy7 717 lee...@gm...-20081220085046-6rwe6cqmdlffs4rl 718 lee...@gm...-20081220085502-gpad43pu99t1e6po 719 lee...@gm...-20081220092821-q7uj4w92j6a3a7eb 720 lee...@gm...-20081220094339-k3zb139qp87r4b2w 721 lee...@gm...-20081220100858-uap7k5s22tbipzkt 722 lee...@gm...-20081220111203-rhp5p15agx73xi1k 723 lee...@gm...-20081220112757-mjp2yffddjy5s74e 724 lee...@gm...-20081220114653-k2dqt4wiizipbwas 725 lee...@gm...-20081221181637-6d0tfx7sx7syxfb6 726 lee...@gm...-20081221182603-9bkelm9x7aclb0bw 734 lee...@gm...-20081230173103-fmzio9fanap2rybf 735 lee...@gm...-20081230174204-cppkz4sumguhysa9 736 lee...@gm...-20081230174738-mecjttlpyp1i859c 737 lee...@gm...-20081230174816-qmtp2a3q8m52jsn3 738 lee...@gm...-20081230194247-q6oyx6cqfz03b2lr 739 lee...@gm...-20081231202038-odzabc3wmlqzvskt 740 lee...@gm...-20081231203835-nn2kezh1el82dn1q 741 lee...@gm...-20090101022727-myjxnrvqe5e4l1wz 743 da...@da...-20090103170253-cdtppjz8nzwhngst 744 da...@da...-20090103183413-r1852m22og3lh2uc 745 lee...@gm...-20090103212852-mvsergjd4ao1la77 746 da...@da...-20090103231550-6zn9qzo6gpj9kwu8 748 ep...@fr...-20090104202020-0lqda0kmftjpeows Modified: armagetronad/trunk/armagetronad/.bzrignore =================================================================== --- armagetronad/trunk/armagetronad/.bzrignore 2009-01-04 21:06:08 UTC (rev 8738) +++ armagetronad/trunk/armagetronad/.bzrignore 2009-01-04 21:33:22 UTC (rev 8739) @@ -47,7 +47,7 @@ resource/automatic/ .deps src/armagetronad_main -src/nTrueVersion.h +src/tTrueVersion.h src/tUniversalVariables.h src/tUniversalVariables.h.in .dummy.dep Modified: armagetronad/trunk/armagetronad/Makefile.am =================================================================== --- armagetronad/trunk/armagetronad/Makefile.am 2009-01-04 21:06:08 UTC (rev 8738) +++ armagetronad/trunk/armagetronad/Makefile.am 2009-01-04 21:33:22 UTC (rev 8739) @@ -152,7 +152,7 @@ test -n "$(uninstall_location)" && test -x "$(uninstall_location)" && "$(uninstall_location)" || true distclean-local: - rm -f uninstall.sh batch/relocate.in universal_variable* extrapaths src/tUniversalVariables.h* src/nTrueVersion.h* .changetag + rm -f uninstall.sh batch/relocate.in universal_variable* extrapaths src/tUniversalVariables.h* src/tTrueVersion.h* .changetag # remove files left over by distcheck distcheck-clean: Modified: armagetronad/trunk/armagetronad/batch/make/version =================================================================== --- armagetronad/trunk/armagetronad/batch/make/version 2009-01-04 21:06:08 UTC (rev 8738) +++ armagetronad/trunk/armagetronad/batch/make/version 2009-01-04 21:33:22 UTC (rev 8739) @@ -4,11 +4,36 @@ #set -x +show_usage() +{ + echo "USAGE: $1 [-v|--verbose] srcdir" +} + +if test $# -ne 1 && test $# -ne 2 +then + echo "ERROR: Invalid argument count" >&2 + show_usage $0 + exit 1 +fi + +verbose= srcdir="$1" +if ( test $1 == "--verbose" || test $1 == "-v" ) && test $# -eq 2 +then + verbose=# + srcdir=$2 +elif ( test $1 == "--verbose" || test $1 == "-v" ) +then + echo "ERROR: Invalid argument count" >&2 + show_usage $0 + exit 1 +fi + # set version parts to defaults for CVS snapshot major_version=`cat ${srcdir}/major_version` DATE=`date +%Y%m%d` +builddate=`date -R` #echo $major_version #echo $minor_version @@ -86,30 +111,72 @@ # Check if bzr is installed, and if the path is versionned bzr >/dev/null 2>&1 # But for now, ignore it -#if test $? -eq 0 -if test 1 -eq 0 +if test $? -eq 0 +#if test 1 -eq 0 then + # Crappily, we can't rely on revision numbers to do anything + # ( ie. when one merges then pushes, the last revno might be lower than originally) + # So we count revisions, including merged ones, also including fools which have empty + # lines with only "revno: 15" in their commit messages + revno=$( bzr revno ${srcdir} 2>/dev/null) + revcount=$(bzr log ${srcdir} 2>/dev/null | grep -P '^ *revno: [0-9\.]+$' | wc -l) + lca=$revno + lcaz=$revcount + versioned=# + branchurl=$(bzr info ${srcdir} 2>/dev/null | grep -P '^ parent branch: .*$' | awk '-F: ' '{ print $2 }' ) + + + # We will check this branch diverged, and/or if tree changed + bzrmissingcout=$( cd ${srcdir}; bzr missing --this 2>/dev/null ) + missing=$? bzr diff ${srcdir} --quiet >/dev/null 2>&1 - # Test for the return code of bzr diff (see bzr diff --help) - if test $? -eq 0 + changed=$? + + + if test ${missing} -eq 1 + # if it diverged: then - # If no change was made, use revision number - # but first check if it's tagged + # Count the revisions we added locally + localrevisions=$( echo "${bzrmissingcout}" | sed -n '2,1p' | awk '{print $3}' ) + # See how many steps it is, with the fool's number + stepsbackwards=$( bzr log ${srcdir} -l ${localrevisions} | grep -P '^ *revno: [0-9\.]+$' | wc -l ) + # And start dancing. + minor_version=_alpha_z$(( ${revcount} - ${stepsbackwards} ))_${DATE} + # Set last common ancestors + lca=$(( ${revno} - ${localrevisions})) + lcaz=$(( ${revcount} - ${stepsbackwards} )) + srcchanged=# + elif test ${missing} -eq 0 && ( test ${changed} -eq 1 || test ${changed} -eq 2 ) + then + # If a change was made and no more revision was added, just use revision fool's number plus build date + minor_version=_alpha_z${revcount}_${DATE} + # And this is versionned too + srcchanged=# + elif test ${missing} -eq 0 + then + # If really no change was made, use the fool's number, with tag if any + # So check if we have tags revno=$(bzr revno ${srcdir}) - tag=$(bzr tags | grep -P "^(.*?) +${revno}$" | awk '{ print $1 }') - if test $tag + tag=$(bzr tags -d ${srcdir} | grep -P "^(.*?) +${revno}$" | awk '{ print $1 }') + if test ${tag} then # If it is tagged, use the tag - DATE=_$tag + minor_version=_alpha_z${revcount}_${tag} else - # If not, use revision number - DATE=_r$(bzr revno ${srcdir}) + # If not, use fool's number only + minor_version=_alpha_z${revcount} fi - elif test $? -lt 3 + # That's versioned as well + else + # Otherwise, this is just not versionned + versioned= + fi + + if test $versioned then - # If a change was made, use revision number plus build date - DATE=_r$(bzr revno ${srcdir})_$DATE - # It returns 3 if it's not versionned, so forget it + major_version=$( cd ${srcdir}; bzr nick ) + branchnick=$major_version + revid=$( bzr log --show-ids -l1 ${srcdir} | grep -P "^revision-id: (.*)$" | head -n 1 | awk '{print $2}' ) fi fi @@ -118,4 +185,27 @@ test -z "$DATE" || minor_version=`cat ${srcdir}/minor_version | sed -e "s,DATE,$DATE," -e "s,YYYYMMDD,$DATE,"` fi -echo $major_version$minor_version +if test $verbose +then + echo VERSION \"$major_version$minor_version\" + echo REVID \"$revid\" + echo REVNO $revno + echo BRANCHNICK \"$branchnick\" + echo ZNR $revcount + echo REVTAG \"$tag\" + + if test $srcchanged + then + echo CHANGED true + else + echo CHANGED false + fi + + echo BUILDDATE \"$builddate\" + echo BRANCHLCA $lca + echo BRANCHLCAZ $lcaz + echo BRANCHURL \"$branchurl\" +else + echo $major_version$minor_version +fi + Modified: armagetronad/trunk/armagetronad/language/english_base.txt =================================================================== --- armagetronad/trunk/armagetronad/language/english_base.txt 2009-01-04 21:06:08 UTC (rev 8738) +++ armagetronad/trunk/armagetronad/language/english_base.txt 2009-01-04 21:33:22 UTC (rev 8739) @@ -19,6 +19,8 @@ sinclude_help Includes the following file silently, without error message if it is not found rinclude_help Includes a file using the resource system. Use the direct link syntax to your profit here. new_team_allowed_help Is it currently allowed to create a new team? +yes Yes +no No #******************************************** #******************************************** @@ -2418,6 +2420,9 @@ help_commands_tourney_shortdesc Tourney related commands help_commands_tourney_text 0x88ff88/lock0xffff88: Locks your current team. Nobody can join it any more on their own. To let someone in, you need to invoke\n0x88ff88/invite <player>0xffff88: From that moment on, the player is allowed to join you. Another effect of /invite, even if your team is not locked, is that the invited player can read all of your team's /team messages. Invitations are permanent until revoked. That means a player who is invited into your team can join and leave it freely without further need to /invite him again. Players who were on the team when you /locked it are not automatically invited when they leave on their own account.\n0x88ff88/uninvite <player>0xffff88: reverses /invite. The invitation is revoked, the player can no longer join you, and if he currently is on your team, he will be thrown out.\n0x88ff88/unlock0xffff88: makes your team available for everyone to join again. +help_version_shortdesc This server's version +help_version_text 0xffff7fThis is running:\n0x7fff7f \g \v\n0xffff7fIt was built on 0x7fff7f\d0xffff7f, from revision 0x7fff7fr\o0xffff7f(0x7fff7fz\z0xffff7f), which has revision 0x7fff7fr\l0xffff7f(0x7fff7fz\m0xffff7f) for last common ancestor with branch 0x7fff7f\p0xffff7f, which can be found at:\n0x7fff7f \b\n0xffff7fThis revision's ID is:\n0x7fff7f \i\n0xffff7fIt was tagged(empty if not tagged):\n0x7fff7f \t\n0xffff7fSource changed:\n0x7fff7f \c + invite_no_team Can't use \1 if you're not on a team.\n invite_team_locked \1 locked, you'll need an invitation from a team leader via the /invite command to join from now on.\n invite_team_unlocked \1 unlocked, you can join it freely again.\n Modified: armagetronad/trunk/armagetronad/src/Makefile.am =================================================================== --- armagetronad/trunk/armagetronad/src/Makefile.am 2009-01-04 21:06:08 UTC (rev 8738) +++ armagetronad/trunk/armagetronad/src/Makefile.am 2009-01-04 21:33:22 UTC (rev 8739) @@ -28,15 +28,16 @@ done # keep track of true version -nTrueVersion.h: $(wildcard $(top_srcdir)/*_version) $(wildcard $(top_srcdir)/.svn) $(wildcard $(top_srcdir)/CVS) $(wildcard $(top_srcdir)/batch/make/version) Makefile +tTrueVersion.h: $(wildcard $(top_srcdir)/*_version) $(wildcard $(top_srcdir)/.svn) $(wildcard $(top_srcdir)/CVS) $(wildcard $(top_srcdir)/.bzr) $(wildcard $(top_srcdir)/batch/make/version) Makefile # if the version generation files exist, use it to define the version. Else, Fallback to the autopackage version. if test -r $(top_srcdir)/batch/make/version; then \ - echo \#define TRUE_ARMAGETRONAD_VERSION \"`sh $(top_srcdir)/batch/make/version $(top_srcdir)`\" > $@; \ + sh $(top_srcdir)/batch/make/version --verbose $(top_srcdir) | awk '{ print "#define TRUE_ARMAGETRONAD_" $$1 " " substr( $$0, index( $$0, $$2 ) ) }' >$@; \ else \ echo "#define TRUE_ARMAGETRONAD_VERSION VERSION" > $@; \ fi -${srcdir}/network/nNetwork.cpp: nTrueVersion.h +${srcdir}/tools/tLocale.cpp: ${srcdir}/tools/tVersion.h +${srcdir}/tools/tVersion.h: tTrueVersion.h # library file listings Modified: armagetronad/trunk/armagetronad/src/engine/ePlayer.cpp =================================================================== --- armagetronad/trunk/armagetronad/src/engine/ePlayer.cpp 2009-01-04 21:06:08 UTC (rev 8738) +++ armagetronad/trunk/armagetronad/src/engine/ePlayer.cpp 2009-01-04 21:33:22 UTC (rev 8739) @@ -3354,7 +3354,7 @@ } void write(tColoredString &s) const { - s << tColoredString::ColorString(.5,.5,1.) << tOutput(m_shortdesc) << ":\n" << tOutput(m_text) << '\n'; + s << tColoredString::ColorString(.5,.5,1.) << tOutput((const char *)m_shortdesc) << ":\n" << tOutput((const char *)m_text) << '\n'; } static void addHelpTopic(std::istream &s) { @@ -3404,7 +3404,7 @@ printed_start = true; s << tOutput("$help_topics_list_start"); } - s << tColoredString::ColorString(.5,.5,1.) << begin->first << tColoredString::ColorString(1.,1.,.5) << ": " << tOutput(begin->second.m_shortdesc) << "\n"; + s << tColoredString::ColorString(.5,.5,1.) << begin->first << tColoredString::ColorString(1.,1.,.5) << ": " << tOutput((const char *)begin->second.m_shortdesc) << "\n"; } } @@ -3449,6 +3449,8 @@ se_makeDefaultHelpTopic(helpTopics, "commands_misc"); se_makeDefaultHelpTopic(helpTopics, "commands_pp"); + se_makeDefaultHelpTopic(helpTopics, "version"); + return helpTopics; } Modified: armagetronad/trunk/armagetronad/src/network/nNetwork.cpp =================================================================== --- armagetronad/trunk/armagetronad/src/network/nNetwork.cpp 2009-01-04 21:06:08 UTC (rev 8738) +++ armagetronad/trunk/armagetronad/src/network/nNetwork.cpp 2009-01-04 21:33:22 UTC (rev 8739) @@ -100,11 +100,6 @@ tString sn_bigBrotherString; // tString sn_greeting[5]; //made 4 = 5 (lol i broke the laws of maths. subby), k's bug fix - -#ifdef TOP_SOURCE_DIR -#include "nTrueVersion.h" -#endif - #ifndef TRUE_ARMAGETRONAD_VERSION #define TRUE_ARMAGETRONAD_VERSION VERSION #endif Modified: armagetronad/trunk/armagetronad/src/tools/tCommandLine.cpp =================================================================== --- armagetronad/trunk/armagetronad/src/tools/tCommandLine.cpp 2009-01-04 21:06:08 UTC (rev 8738) +++ armagetronad/trunk/armagetronad/src/tools/tCommandLine.cpp 2009-01-04 21:33:22 UTC (rev 8739) @@ -140,7 +140,8 @@ #ifdef HELPAVAIL s << "--doc : print documentation for all console commands\n"; #endif - s << "-v, --version : print version number\n\n"; + s << "-v, --version : print version number\n"; + s << "--versioninfo : print build source information\n\n"; // ask third party analyzers tCommandLineAnalyzer * commandLineAnalyzer = s_commandLineAnalyzerAnchor; @@ -170,6 +171,23 @@ { QUIT( "This is " << name_ << " version " << *programVersion_ << ".\n" ); } + else if ( parser.GetSwitch( "--versioninfo") ) + { + std::ostringstream s; + s << "Program Name : " << st_programName << "\n"; + s << "Version : " << st_programVersion << "\n"; + s << "Parent branch : " << st_programBranchNick << "\n"; + s << "Parent branch's URL : " << st_programBranchUrl << "\n"; + s << "Tag : " << st_programRevTag << "\n"; + s << "Revision number : r" << st_programRevNo << "(z" << st_programRevZNr << ")\n"; + s << "Revision ID : " << st_programRevId << "\n"; + s << "Ancestor : r" << st_programBranchLca << "(z" << st_programBranchLcaZ << ")\n"; + s << "Source changed : " << (st_programChanged? "Yes" : "No") << "\n"; + s << "Build date : " << st_programBuildDate << "\n"; + + quitWithMessagePrepare( s.str().c_str() ); + return false; + } else { // let the registered command line anelyzers have a go Modified: armagetronad/trunk/armagetronad/src/tools/tLocale.cpp =================================================================== --- armagetronad/trunk/armagetronad/src/tools/tLocale.cpp 2009-01-04 21:06:08 UTC (rev 8738) +++ armagetronad/trunk/armagetronad/src/tools/tLocale.cpp 2009-01-04 21:33:22 UTC (rev 8739) @@ -39,8 +39,6 @@ static tArray<tString> st_TemplateParameters; -static tString s_gameName("Armagetron"); // the official name of this game - class tLocaleItem: public tReferencable< tLocaleItem > // idendifies a string in all languages { friend class tLocaleSubItem; @@ -254,10 +252,47 @@ else if (i < temp.Len() - 1) { c = temp(i+1); - if (c == 'g') - replaced << s_gameName; - else + switch ( c ) { + case 'b': + replaced << st_programBranchUrl; + break; + case 'c': + replaced << tOutput( + ( st_programChanged )? "$yes" : "$no" + ); + break; + case 'd': + replaced << st_programBuildDate; + break; + case 'g': + replaced << st_programName; + break; + case 'i': + replaced << st_programRevId; + break; + case 'l': + replaced << st_programBranchLca; + break; + case 'm': + replaced << st_programBranchLcaZ; + break; + case 'o': + replaced << st_programRevNo; + break; + case 'p': + replaced << st_programBranchNick; + break; + case 't': + replaced << st_programRevTag; + break; + case 'v': + replaced << st_programVersion; + break; + case 'z': + replaced << st_programRevZNr; + break; + default: int index = c-'0'; if (index > 0 && index < 10) replaced << st_TemplateParameters[index]; @@ -783,8 +818,8 @@ tLocaleItem::Load(filename, false); // determine the name of the game - s_gameName.Clear(); - s_gameName << tOutput("$game_name"); + st_programName.Clear(); + st_programName << tOutput("$game_name"); } void tLocale::Clear() Modified: armagetronad/trunk/armagetronad/src/tools/tLocale.h =================================================================== --- armagetronad/trunk/armagetronad/src/tools/tLocale.h 2009-01-04 21:06:08 UTC (rev 8738) +++ armagetronad/trunk/armagetronad/src/tools/tLocale.h 2009-01-04 21:33:22 UTC (rev 8739) @@ -31,6 +31,7 @@ #include "tString.h" #include "tLinkedList.h" #include "tError.h" +#include "tVersion.h" class tLocaleItem; class tOutputItemBase; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |