src/main.cpp

changeset 0
bb264814dd81
child 1
c9b22c06307c
equal deleted inserted replaced
-1:000000000000 0:bb264814dd81
1 #include "types.h"
2
3 int main() {
4 print ("Hello world! This is " APPNAME " %1\n", versionString() );
5 }
6
7 QString versionString() {
8 str text = fmt( "v%1.%2", VERSION_MAJOR, VERSION_MINOR );
9 #if VERSION_PATCH != 0
10 text += fmt( ".%3", VERSION_PATCH );
11 #endif
12
13 #if BUILD_ID == BUILD_INTERNAL
14 text += "-intern";
15 #elif BUILD_ID == BUILD_ALPHA
16 text += "-alpha";
17 #elif BUILD_ID == BUILD_BETA
18 text += "-beta";
19 #elif BUILD_ID == BUILD_RC
20 text += fmt( "-rc%1", RC_ID );
21 #elif BUILD_ID == BUILD_RELEASE
22 text += "-rel";
23 #else
24 # error Invalid build code!
25 #endif // BUILD_ID
26
27 return text;
28 }

mercurial