Added a few new version methods for compilter and platform

This commit is contained in:
Mark Vejvoda 2010-05-12 22:54:42 +00:00
parent 23ebbb15ad
commit 36c7ccfff1
2 changed files with 26 additions and 6 deletions

View File

@ -32,12 +32,23 @@ string getCrashDumpFileName(){
return "glest" + glestVersionString + ".dmp";
}
string getNetworkVersionString() {
string version = glestVersionString + " built: " + string(__DATE__) + " " + string(__TIME__);
#if defined(WIN32) && defined(_MSC_VER)
version += " Compiled using MSC_VER: " + intToStr(_MSC_VER);
string getPlatformNameString() {
string platform = "";
#if defined(WIN32)
platform = "Windows";
#elif defined(__GNUC__)
platform = "GNU";
#else
platform = "???";
#endif
return platform;
}
string getCompilerNameString() {
string version = "";
#if defined(WIN32) && defined(_MSC_VER)
version = "VC++: " + intToStr(_MSC_VER);
#elif defined(__GNUC__)
#if defined(__GNUC__)
# if defined(__GNUC_PATCHLEVEL__)
# define __GNUC_VERSION__ (__GNUC__ * 10000 \
@ -48,12 +59,19 @@ string getNetworkVersionString() {
+ __GNUC_MINOR__ * 100)
# endif
#endif
version += " Compiled using GNUC_VERSION: " + intToStr(__GNUC_VERSION__);
version = "GNUC: " + intToStr(__GNUC_VERSION__);
#else
version = "???";
#endif
return version;
}
string getNetworkVersionString() {
string version = glestVersionString + " built: " + string(__DATE__) + " " + string(__TIME__);
version += " Compiled with " + getCompilerNameString();
return version;
}
string getCompileDateTime() {
return string(__DATE__) + " " + string(__TIME__);
}

View File

@ -27,6 +27,8 @@ extern const string glestVersionString;
extern const string networkVersionString;
string getCrashDumpFileName();
string getPlatformNameString();
string getCompilerNameString();
string getNetworkVersionString();
string getNetworkPlatformFreeVersionString();
string getAboutString1(int i);