Changed compiler stamp in version string

This commit is contained in:
Mark Vejvoda 2010-04-30 02:20:27 +00:00
parent e8aa5083cb
commit 19cd66fc2d
2 changed files with 21 additions and 2 deletions

View File

@ -17,6 +17,7 @@
#include "config.h"
#include <stdlib.h>
#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() {

View File

@ -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());