From 19cd66fc2db49bf23f95a2f3e43cd9b4e158b934 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 30 Apr 2010 02:20:27 +0000 Subject: [PATCH] Changed compiler stamp in version string --- source/glest_game/facilities/game_util.cpp | 21 ++++++++++++++++++- .../glest_game/network/client_interface.cpp | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/source/glest_game/facilities/game_util.cpp b/source/glest_game/facilities/game_util.cpp index dafbb2d8..b7f27cec 100644 --- a/source/glest_game/facilities/game_util.cpp +++ b/source/glest_game/facilities/game_util.cpp @@ -17,6 +17,7 @@ #include "config.h" #include #include "platform_util.h" +#include "conversion.h" #include "leak_dumper.h" using namespace Shared::Util; @@ -32,7 +33,25 @@ string getCrashDumpFileName(){ } string getNetworkVersionString() { - return glestVersionString + " built: " + string(__DATE__) + " " + string(__TIME__); + string version = glestVersionString + " built: " + string(__DATE__) + " " + string(__TIME__); +#if defined(WIN32) && defined(_MSC_VER) + version += " MSC_VER " + _MSC_VER; +#elif defined(__GNUC__) + + #if defined(__GNUC__) + # if defined(__GNUC_PATCHLEVEL__) + # define __GNUC_VERSION__ (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) + # else + # define __GNUC_VERSION__ (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100) + # endif + #endif + + version += " GNUC_VERSION " + intToStr(__GNUC_VERSION__); +#endif + return version; } string getNetworkPlatformFreeVersionString() { diff --git a/source/glest_game/network/client_interface.cpp b/source/glest_game/network/client_interface.cpp index 7701222e..38848a01 100755 --- a/source/glest_game/network/client_interface.cpp +++ b/source/glest_game/network/client_interface.cpp @@ -156,7 +156,7 @@ void ClientInterface::updateLobby() } else { versionMatched = true; - sErr = "Server and client are using the same version but different platforms.\n\nServer: " + + sErr = "Warning, Server and client are using the same version but different platforms.\n\nServer: " + networkMessageIntro.getVersionString() + "\nClient: " + getNetworkVersionString(); printf("%s\n",sErr.c_str());