|
1 #include <QApplication> |
1 #include "types.h" |
2 #include "types.h" |
|
3 #include "config.h" |
2 |
4 |
3 int main() { |
5 // ============================================================================= |
|
6 // ----------------------------------------------------------------------------- |
|
7 int main( int argc, char* argv[] ) { |
|
8 QApplication app( argc, argv ); |
|
9 |
|
10 for( int i = 1; i < argc; ++i ) { |
|
11 str arg = argv[i]; |
|
12 |
|
13 if( arg == "--config" ) { |
|
14 ConfigBox* dlg = new ConfigBox; |
|
15 dlg->show(); |
|
16 } |
|
17 } |
|
18 |
4 print ("Hello world! This is " APPNAME " %1\n", versionString() ); |
19 print ("Hello world! This is " APPNAME " %1\n", versionString() ); |
|
20 return app.exec(); |
5 } |
21 } |
6 |
22 |
|
23 // ============================================================================= |
|
24 // ----------------------------------------------------------------------------- |
7 QString versionString() { |
25 QString versionString() { |
8 str text = fmt( "v%1.%2", VERSION_MAJOR, VERSION_MINOR ); |
26 str text = fmt( "v%1.%2", VERSION_MAJOR, VERSION_MINOR ); |
9 #if VERSION_PATCH != 0 |
27 #if VERSION_PATCH != 0 |
10 text += fmt( ".%3", VERSION_PATCH ); |
28 text += fmt( ".%1", VERSION_PATCH ); |
11 #endif |
29 #endif |
12 |
30 |
13 #if BUILD_ID == BUILD_INTERNAL |
31 #if BUILD_ID == BUILD_INTERNAL |
14 text += "-intern"; |
32 text += "-intern"; |
15 #elif BUILD_ID == BUILD_ALPHA |
33 #elif BUILD_ID == BUILD_ALPHA |