revert the following revisions:

2008-01-27T00:49:02Z!soliton@wesnoth.org
2008-01-26T21:16:47Z!esr@thyrsus.com
2008-01-26T20:48:27Z!esr@thyrsus.com
2008-01-26T19:18:41Z!elias@pschernig.at
2008-01-26T18:57:31Z!esr@thyrsus.com
2008-01-26T18:42:21Z!esr@thyrsus.com
2008-01-26T18:41:21Z!esr@thyrsus.com
2008-01-26T17:52:29Z!esr@thyrsus.com
2008-01-26T17:22:42Z!esr@thyrsus.com
2008-01-26T17:17:44Z!esr@thyrsus.com
2008-01-26T14:01:48Z!esr@thyrsus.com
2008-01-26T13:32:14Z!esr@thyrsus.com

reasons:

1) they break building at least partially / change the way how
building works which is a no go in beta time

2) addition of a new feature (:version), we are in feature freeze, so
this is a no go, too
This commit is contained in:
Nils Kneuper 2008-01-27 11:59:04 +00:00
parent 3c3bb5c638
commit 6ce621e79c
15 changed files with 70 additions and 40 deletions

View file

@ -60,6 +60,11 @@ with gcc 4.
If you want to build wesnoth_editor too add the --enable-editor
configure option.
The --enable-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.
If you see lots of messages like "Type 'svnversion --help' for usage.",
you have a Subversion client installed but it is not implementing the
-n option of svnversion. Time to update it.

View file

@ -1,3 +1,7 @@
if USESVN
SVNREV = $(shell svnversion -n .)
endif
ISUBDIRS = icons
SUBDIRS = po m4 src doc $(ISUBDIRS)
pkgdatadir=$(datadir)/@DATADIR@

View file

@ -288,6 +288,12 @@ AC_ARG_ENABLE([internal-data],
[internaldata=$enableval],
[internaldata=no])
AC_ARG_ENABLE([display-revision],
AS_HELP_STRING([--enable-display-revision], [enable svn revision display]),
[svnrev=$enableval],
[svnrev=no])
if test "x$game" = "xno"
then
python=no
@ -318,6 +324,7 @@ AM_CONDITIONAL([SERVER_MONITOR], [test x$servermonitor = xyes])
AM_CONDITIONAL([CAMPAIGNSERVER], [test x$campaignserver = xyes])
AM_CONDITIONAL([TESTS], [test x$tests = xyes])
AM_CONDITIONAL([EDITOR], [test x$editor = xyes])
AM_CONDITIONAL([USESVN], [test x$svnrev = xyes])
AM_CONDITIONAL([TOOLS], [test x$tools = xyes])
AM_CONDITIONAL([GCC], [test x$GXX = xyes])
AM_CONDITIONAL([INCLUDEDINTL], [test x$nls_cv_use_gnu_gettext = xyes])

View file

@ -1,3 +1,9 @@
if USESVN
SVNREV = $(shell svnversion -n $(topdir) 2>/dev/null)
CFLAGS += "-DSVNREV=\"$(SVNREV)\""
CXXFLAGS += "-DSVNREV=\"$(SVNREV)\""
endif
AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS =
@ -351,8 +357,7 @@ noinst_HEADERS = \
wml_separators.hpp \
sdl_ttf/SDL_ttf.h \
wesconfig.h \
wml_exception.hpp \
revision_stamp.hpp
wml_exception.hpp
BUILT_SOURCES = revision_stamp.hpp
@ -433,11 +438,18 @@ libwesnoth_a_SOURCES = \
sdl_ttf/SDL_ttf.c \
wml_exception.cpp
if USESVN
# Until game_config.cpp is removed, this will be needed to ensure that the
# SVNVER constant gets updated correctly. If and when that definition is
# moved elsewhere, this dependency must follow it.
game_config.o: revision-stamp
# Should be touched each time the SVN revision number goes up
revision_stamp.hpp: FORCE
echo "#define SVNREV \"$(shell svnversion -n $(topdir) 2>/dev/null)\"" >revision_stamp.hpp
revision-stamp: FORCE
if [ x"$(SVNREV)" != x`cat revision-stamp 2>/dev/null` ]; then echo -n $(SVNREV) >revision-stamp; fi
FORCE:
endif
AM_CXXFLAGS = -I $(srcdir)/sdl_ttf -I../intl -I$(top_srcdir)/intl @SDL_CFLAGS@ -DWESNOTH_PATH=\"$(pkgdatadir)\" \
-DLOCALEDIR=\"$(LOCALEDIR)\" -DHAS_RELATIVE_LOCALEDIR=$(HAS_RELATIVE_LOCALEDIR) -DFIFODIR=\"$(fifodir)\"\

View file

@ -485,7 +485,9 @@ void map_editor::change_language() {
// Update the frame title
wm_title_string = _("Battle for Wesnoth Map Editor");
wm_title_string += " - " + game_config::revision;
wm_title_string += " - " + game_config::version
+ (game_config::svnrev.empty() ? "" :
" (" + game_config::svnrev + ")");
SDL_WM_SetCaption(wm_title_string.c_str(), NULL);
font::load_font_config();

View file

@ -47,7 +47,10 @@ namespace {
int main(int argc, char** argv)
{
std::cerr << "Battle for Wesnoth Map Editor v" << game_config::revision << '\n';
const std::string rev = game_config::svnrev.empty() ? "" :
" (" + game_config::svnrev + ")";
std::cerr << "Battle for Wesnoth Map Editor v" << VERSION << rev << '\n';
time_t t = time(NULL);
std::cerr << "Started on " << ctime(&t) << "\n";
@ -83,7 +86,10 @@ int main(int argc, char** argv)
return 0;
} else if(val == "--version" || val == "-v") {
std::cout << "Battle for Wesnoth "
<< game_config::revision
<< game_config::version
#if defined(SVNREV) && defined(DO_DISPLAY_REVISION)
<< " (" << game_config::svnrev << ")"
#endif /* defined(SVNREV) and defined(DO_DISPLAY_REVISION) */
<< "\n";
return 0;
} else if(val == "--path") {
@ -296,7 +302,9 @@ int main(int argc, char** argv)
// Set the caption of the window
wm_title_string = _("Battle for Wesnoth Map Editor");
wm_title_string += " - " + game_config::revision;
wm_title_string += " - " + game_config::version
+ (game_config::svnrev.empty() ? "" :
" (" + game_config::svnrev + ")");
SDL_WM_SetCaption(wm_title_string.c_str(), NULL);
//Read the configuration af

View file

@ -443,7 +443,9 @@ bool game_controller::init_language()
if(!no_gui_) {
std::string wm_title_string = _("The Battle for Wesnoth");
wm_title_string += " - " + game_config::revision;
wm_title_string += " - " + game_config::version
+ (game_config::svnrev.empty() ? "" :
" (" + game_config::svnrev + ")");
SDL_WM_SetCaption(wm_title_string.c_str(), NULL);
}
@ -1584,7 +1586,9 @@ bool game_controller::change_language()
if(!no_gui_) {
std::string wm_title_string = _("The Battle for Wesnoth");
wm_title_string += " - " + game_config::revision;
wm_title_string += " - " + game_config::version
+ (game_config::svnrev.empty() ? "" :
" (" + game_config::svnrev + ")");
SDL_WM_SetCaption(wm_title_string.c_str(), NULL);
}
@ -2007,7 +2011,7 @@ static int play_game(int argc, char** argv)
;
return 0;
} else if(val == "--version" || val == "-v") {
std::cout << _("Battle for Wesnoth") << " " << game_config::revision
std::cout << _("Battle for Wesnoth") << " " << game_config::version
<< "\n";
return 0;
} else if(val == "--path") {
@ -2324,7 +2328,10 @@ int main(int argc, char** argv)
#endif
try {
std::cerr << "Battle for Wesnoth v" << game_config::revision << '\n';
const std::string rev = game_config::svnrev.empty() ? "" :
" (" + game_config::svnrev + ")";
std::cerr << "Battle for Wesnoth v" << VERSION << rev << '\n';
time_t t = time(NULL);
std::cerr << "Started on " << ctime(&t) << "\n";

View file

@ -21,7 +21,6 @@
#include "util.hpp"
#include "serialization/string_utils.hpp"
#include "wesconfig.h"
#include "revision_stamp.hpp"
#include <cstdlib>
#include <sstream>
@ -40,9 +39,12 @@ namespace game_config
unsigned lobby_refresh = 2000;
const int gold_carryover_percentage = 80;
const bool gold_carryover_add = false;
const std::string version = VERSION;
const std::string version = VERSION;
#ifdef SVNREV
const std::string svnrev = SVNREV;
const std::string revision = (svnrev.empty() || svnrev == "exported" ? VERSION : VERSION " (" SVNREV ")");
#else
const std::string svnrev = "";
#endif
bool debug = false, editor = false, ignore_replay_errors = false, mp_debug = false, exit_at_end = false, no_delay = false, disable_autosave = false;
std::string game_icon = "wesnoth-icon.png", game_title, game_logo, title_music;

View file

@ -34,7 +34,7 @@ namespace game_config
extern int kill_experience;
extern unsigned lobby_refresh;
extern const std::string version;
extern const std::string revision;
extern const std::string svnrev;
//! Default percentage gold carried over to the next scenario.
extern const int gold_carryover_percentage;

View file

@ -1221,8 +1221,7 @@ void game_display::add_chat_message(const time_t& time, const std::string& speak
message_colour = speaker_colour;
message_str << " ";
} else {
if (!speaker.empty())
str << "<" << speaker << ">";
str << "<" << speaker << ">";
message_str << msg;
}
} else {
@ -1231,8 +1230,7 @@ void game_display::add_chat_message(const time_t& time, const std::string& speak
message_colour = speaker_colour;
message_str << " ";
} else {
if (!speaker.empty())
str << "*" << speaker << "*";
str << "*" << speaker << "*";
message_str << msg;
}
}

View file

@ -2314,8 +2314,6 @@ private:
} else if(game_config::debug && (cmd == "throw" || cmd == "fire")) {
game_events::fire(data);
gui_->redraw_everything();
} else if(cmd == "version") {
add_chat_message(time(NULL), "", 0, game_config::revision);
}
}

View file

@ -322,9 +322,12 @@ TITLE_RESULT show_title(game_display& screen, config& tips_of_day)
} while (fade_failed);
LOG_DP << "faded logo\n";
// Display Wesnoth version and (if available) the svn-revision.
// Display Wesnoth version and (if configured with --enable-display-revision) the svn-revision
const std::string rev = game_config::svnrev.empty() ? "" :
" (" + game_config::svnrev + ")";
const std::string& version_str = _("Version") +
std::string(" ") + game_config::revision;
std::string(" ") + game_config::version + rev;
const SDL_Rect version_area = font::draw_text(NULL, screen_area(),
font::SIZE_TINY, font::NORMAL_COLOUR,

View file

@ -1 +0,0 @@
#define SVNREV "

View file

@ -1 +0,0 @@
"

View file

@ -1,14 +0,0 @@
@echo off
rem Don't show unrelated output (calls)
cd ..
rem Go to project root
svnversion -n > tempfile.tmp
rem Get the revision data
copy utils\svnhpp_1.bin /B + tempfile.tmp /B + utils\svnhpp_2.bin /B src\revision_stamp.hpp
rem Concatenate the other files with rev. number in binary mode
del src\game_config.o
del src\game_config.obj
rem Add here some more stuff to delete...
rem This is to force rebuild of the file which includes version data
del tempfile.tmp
rem Rid of the temp