Remove no longer needed DO_DISPLAY_REVISION definition.
Remove some SVNREV ifdef's and replace them with C++ on an empty string.
This commit is contained in:
parent
4a632b797b
commit
42e31ed622
5 changed files with 11 additions and 17 deletions
|
@ -279,10 +279,6 @@ 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],
|
||||
AS_HELP_STRING([--disable-desktop-entry], [disable installation of desktop entry files]),
|
||||
[desktopentry=$enableval],
|
||||
|
|
|
@ -2109,11 +2109,10 @@ int main(int argc, char** argv)
|
|||
#endif
|
||||
|
||||
try {
|
||||
std::cerr << "Battle for Wesnoth v" << VERSION
|
||||
#if defined(SVNREV) && defined(DO_DISPLAY_REVISION)
|
||||
<< " (" << game_config::svnrev << ")"
|
||||
#endif /* defined(SVNREV) && defined(DO_DISPLAY_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";
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@ namespace game_config
|
|||
const std::string version = VERSION;
|
||||
#ifdef SVNREV
|
||||
const std::string svnrev = 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;
|
||||
|
||||
|
|
|
@ -34,9 +34,7 @@ namespace game_config
|
|||
extern int kill_experience;
|
||||
extern unsigned lobby_refresh;
|
||||
extern const std::string version;
|
||||
#ifdef SVNREV
|
||||
extern const std::string svnrev;
|
||||
#endif /* SVNREV */
|
||||
|
||||
extern bool debug, editor, ignore_replay_errors, mp_debug, exit_at_end, no_delay, disable_autosave;
|
||||
|
||||
|
|
|
@ -278,12 +278,11 @@ TITLE_RESULT show_title(game_display& screen, config& tips_of_day, int* ntip)
|
|||
LOG_DP << "faded logo\n";
|
||||
|
||||
// Display Wesnoth version and (if configured with --enable-display-revision) the svn-revision
|
||||
const std::string& version_str = _("Version") + std::string(" ") +
|
||||
game_config::version
|
||||
#if defined(SVNREV) && defined(DO_DISPLAY_REVISION)
|
||||
+ " (" + game_config::svnrev + ")"
|
||||
#endif /* defined(SVNREV) && defined(DO_DISPLAY_REVISION) */
|
||||
;
|
||||
const std::string rev = game_config::svnrev.empty() ? "" :
|
||||
" (" + game_config::svnrev + ")";
|
||||
|
||||
const std::string& version_str = _("Version") +
|
||||
std::string(" ") + game_config::version + rev;
|
||||
|
||||
const SDL_Rect version_area = font::draw_text(NULL, screen_area(),
|
||||
font::SIZE_TINY, font::NORMAL_COLOUR,
|
||||
|
|
Loading…
Add table
Reference in a new issue