Wed, 17 Jul 2013 03:06:21 +0300
Added configs for Zandronum binary paths
1 | 1 | #include <QApplication> |
3
d0b278fd29d5
Implemented wad path list
Teemu Piippo <crimsondusk64@gmail.com>
parents:
2
diff
changeset
|
2 | #include <QSettings> |
0 | 3 | #include "types.h" |
1 | 4 | #include "config.h" |
0 | 5 | |
5
3c04e05ab24f
Added configs for Zandronum binary paths
Teemu Piippo <crimsondusk64@gmail.com>
parents:
3
diff
changeset
|
6 | const list<str> g_zanVersions ({ |
3c04e05ab24f
Added configs for Zandronum binary paths
Teemu Piippo <crimsondusk64@gmail.com>
parents:
3
diff
changeset
|
7 | "1.1", |
3c04e05ab24f
Added configs for Zandronum binary paths
Teemu Piippo <crimsondusk64@gmail.com>
parents:
3
diff
changeset
|
8 | }); |
3
d0b278fd29d5
Implemented wad path list
Teemu Piippo <crimsondusk64@gmail.com>
parents:
2
diff
changeset
|
9 | |
1 | 10 | // ============================================================================= |
11 | // ----------------------------------------------------------------------------- | |
12 | int main( int argc, char* argv[] ) { | |
13 | QApplication app( argc, argv ); | |
5
3c04e05ab24f
Added configs for Zandronum binary paths
Teemu Piippo <crimsondusk64@gmail.com>
parents:
3
diff
changeset
|
14 | app.setApplicationName( UNIXNAME ); |
3c04e05ab24f
Added configs for Zandronum binary paths
Teemu Piippo <crimsondusk64@gmail.com>
parents:
3
diff
changeset
|
15 | app.setOrganizationName( UNIXNAME ); |
3
d0b278fd29d5
Implemented wad path list
Teemu Piippo <crimsondusk64@gmail.com>
parents:
2
diff
changeset
|
16 | app.setApplicationVersion( versionString() ); |
d0b278fd29d5
Implemented wad path list
Teemu Piippo <crimsondusk64@gmail.com>
parents:
2
diff
changeset
|
17 | |
5
3c04e05ab24f
Added configs for Zandronum binary paths
Teemu Piippo <crimsondusk64@gmail.com>
parents:
3
diff
changeset
|
18 | print( "Settings path: %1\n", QSettings().fileName() ); |
1 | 19 | |
20 | for( int i = 1; i < argc; ++i ) { | |
21 | str arg = argv[i]; | |
22 | ||
23 | if( arg == "--config" ) { | |
5
3c04e05ab24f
Added configs for Zandronum binary paths
Teemu Piippo <crimsondusk64@gmail.com>
parents:
3
diff
changeset
|
24 | ConfigBox dlg; |
3c04e05ab24f
Added configs for Zandronum binary paths
Teemu Piippo <crimsondusk64@gmail.com>
parents:
3
diff
changeset
|
25 | return dlg.exec(); |
1 | 26 | } |
27 | } | |
28 | ||
29 | return app.exec(); | |
0 | 30 | } |
31 | ||
1 | 32 | // ============================================================================= |
33 | // ----------------------------------------------------------------------------- | |
5
3c04e05ab24f
Added configs for Zandronum binary paths
Teemu Piippo <crimsondusk64@gmail.com>
parents:
3
diff
changeset
|
34 | str versionString() { |
0 | 35 | str text = fmt( "v%1.%2", VERSION_MAJOR, VERSION_MINOR ); |
36 | #if VERSION_PATCH != 0 | |
1 | 37 | text += fmt( ".%1", VERSION_PATCH ); |
0 | 38 | #endif |
39 | ||
40 | #if BUILD_ID == BUILD_INTERNAL | |
41 | text += "-intern"; | |
42 | #elif BUILD_ID == BUILD_ALPHA | |
43 | text += "-alpha"; | |
44 | #elif BUILD_ID == BUILD_BETA | |
45 | text += "-beta"; | |
46 | #elif BUILD_ID == BUILD_RC | |
47 | text += fmt( "-rc%1", RC_ID ); | |
48 | #elif BUILD_ID == BUILD_RELEASE | |
49 | text += "-rel"; | |
50 | #else | |
51 | # error Invalid build code! | |
52 | #endif // BUILD_ID | |
53 | ||
54 | return text; | |
55 | } |