diff -r 8cddb57489a7 -r b9e101b76eb3 src/main.cpp --- a/src/main.cpp Sun May 19 14:34:15 2013 +0300 +++ b/src/main.cpp Sun May 19 15:36:01 2013 +0300 @@ -88,4 +88,30 @@ va_start (va, fmtstr); vprintf (fmtstr, va); va_end (va); +} + +str versionString () { +#if VERSION_PATCH == 0 + return fmt ("%d.%d", VERSION_MAJOR, VERSION_MINOR); +#else + return fmt ("%d.%d.%d", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH); +#endif // VERSION_PATCH +} + +const char* versionMoniker () { +#if BUILD_ID == BUILD_INTERNAL + return " Internal"; +#elif BUILD_ID == BUILD_ALPHA + return " Alpha"; +#elif BUILD_ID == BUILD_BETA + return " Beta"; +#elif BUILD_ID == BUILD_RC + return " RC"; +#else + return ""; +#endif // BUILD_ID +} + +str fullVersionString () { + return fmt ("v%s%s", versionString ().chars (), versionMoniker ()); } \ No newline at end of file