Author: esr
Date: Wed Apr 25 17:39:59 2007
New Revision: 17088

URL: http://svn.gna.org/viewcvs/wesnoth?rev=17088&view=rev
Log:
Add option to enable SVN revision display, defaulting to off.

Modified:
    trunk/INSTALL
    trunk/configure.ac
    trunk/src/editor/editor_main.cpp
    trunk/src/titlescreen.cpp

Modified: trunk/INSTALL
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/INSTALL?rev=17088&r1=17087&r2=17088&view=diff
==============================================================================
--- trunk/INSTALL (original)
+++ trunk/INSTALL Wed Apr 25 17:39:59 2007
@@ -55,6 +55,11 @@
 If you want to build wesnoth_editor too add the --enable-editor
 configure option.
 
+The --display-revision option enables code that shows the SVN revision
+number on the main screen -- useful for detecting old builds you might
+happen to have in your path, but probably not what you want in a 
+production release.
+
 In case you want wesnothd to be built you should add:
 --enable-server --localstatedir=/var --with-server-uid=user
 --with-server-gid=group

Modified: trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/configure.ac?rev=17088&r1=17087&r2=17088&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Wed Apr 25 17:39:59 2007
@@ -237,6 +237,11 @@
                [internaldata=$enableval],
                [internaldata=no])
 
+AC_ARG_ENABLE([display-revision],
+              AS_HELP_STRING([--display-revisiion], [enable svn revision 
display]),
+             [svnrev=$enableval],
+             [svnrev=no])
+
 AM_CONDITIONAL([STATIC], [test x$static = xyes])
 AM_CONDITIONAL([GAME], [test x$game = xyes])
 AM_CONDITIONAL([SERVER], [test x$server = xyes])
@@ -254,6 +259,10 @@
 
 if test x$internaldata = xyes; then
   AC_DEFINE([USE_INTERNAL_DATA],[],[Define if translations should be placed 
inside app, for Mac OS X])
+fi
+
+if test x$svnrev = xyes; then
+  AC_DEFINE([DO_DISPLAY_REVISION],[],[Define if SVN revision should be 
displayed when querying the version])
 fi
 
 AC_ARG_ENABLE([desktop-entry],

Modified: trunk/src/editor/editor_main.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor/editor_main.cpp?rev=17088&r1=17087&r2=17088&view=diff
==============================================================================
--- trunk/src/editor/editor_main.cpp (original)
+++ trunk/src/editor/editor_main.cpp Wed Apr 25 17:39:59 2007
@@ -67,9 +67,9 @@
                } else if(val == "--version" || val == "-v") {
                        std::cout << "Battle for Wesnoth " 
                                  << game_config::version
-#ifdef SVNREV
+#if defined(SVNREV) and defined(DO_DISPLAY_REVISION)
                                  << " (" << game_config::svnrev << ")"
-#endif /* SVNREV */
+#endif /* defined(SVNREV) and defined(DO_DISPLAY_REVISION) */
                                  << "\n";
                        return 0;
                } else if(val == "--path") {

Modified: trunk/src/titlescreen.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/titlescreen.cpp?rev=17088&r1=17087&r2=17088&view=diff
==============================================================================
--- trunk/src/titlescreen.cpp (original)
+++ trunk/src/titlescreen.cpp Wed Apr 25 17:39:59 2007
@@ -232,9 +232,9 @@
 
        const std::string& version_str = _("Version") + std::string(" ") +
                game_config::version
-#ifdef SVNREV
+#if defined(SVNREV) and defined(DO_DISPLAY_REVISION)
                        + " (" + game_config::svnrev + ")"
-#endif /* SVNREV */
+#endif /* defined(SVNREV) and defined(DO_DISPLAY_REVISION) */
                ;
 
        const SDL_Rect version_area = font::draw_text(NULL,screen_area(),


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to