src/main.cpp

changeset 229
b9e101b76eb3
parent 191
9bb6a17305ad
child 232
4e44c92e21dd
equal deleted inserted replaced
228:8cddb57489a7 229:b9e101b76eb3
87 87
88 va_start (va, fmtstr); 88 va_start (va, fmtstr);
89 vprintf (fmtstr, va); 89 vprintf (fmtstr, va);
90 va_end (va); 90 va_end (va);
91 } 91 }
92
93 str versionString () {
94 #if VERSION_PATCH == 0
95 return fmt ("%d.%d", VERSION_MAJOR, VERSION_MINOR);
96 #else
97 return fmt ("%d.%d.%d", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH);
98 #endif // VERSION_PATCH
99 }
100
101 const char* versionMoniker () {
102 #if BUILD_ID == BUILD_INTERNAL
103 return " Internal";
104 #elif BUILD_ID == BUILD_ALPHA
105 return " Alpha";
106 #elif BUILD_ID == BUILD_BETA
107 return " Beta";
108 #elif BUILD_ID == BUILD_RC
109 return " RC";
110 #else
111 return "";
112 #endif // BUILD_ID
113 }
114
115 str fullVersionString () {
116 return fmt ("v%s%s", versionString ().chars (), versionMoniker ());
117 }

mercurial