mirror of
https://github.com/glest/glest-source.git
synced 2025-08-30 19:29:47 +02:00
Added a few new version methods for compilter and platform
This commit is contained in:
@@ -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__);
|
||||
}
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user