blob: 34a585c6e2ec9029e17df19738d0f0911d9abfcb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#include <iostream>
#include <stdlib.h>
#include "mainwindow/mainwindow.h"
#include "../shared/settings.h"
#include "serverapp/serverapp.h"
using std::cout;
using std::endl;
void usage()
{
cout << "USAGE pvsmgr [OPTIONS]" << endl;
cout << "OPTIONS: " << endl;
cout << "--manager-only" << endl;
cout << " pvsmgr terminates if this computer is not a manager of a room" << endl;
cout << "--config=INIFILE" << endl;
cout << " read configuration from INIFILE instead of default path (/opt/openslx/pvs2/pvs2.ini) " << endl;
cout << "--usage" << endl;
cout << " shows this message" << endl;
}
int main(int argc, char** argv)
{
qsrand((uint)QDateTime::currentMSecsSinceEpoch());
ServerApp app(argc, argv);
for (QString a : app.arguments()) {
if (a == "--usage" || a == "--help") {
usage();
exit(0);
} else if (a.endsWith("pvsmgr")) {
/* ignore */
} else {
qDebug() << "ignoring unknown argument: \"" << a << "\"";
}
}
QStringList supportedStyles = QStyleFactory::keys();
for (QString style : PREFERRED_STYLES) {
if (supportedStyles.contains(style)) {
qDebug() << "Setting style to: " << style;
app.setStyle(style);
break;
}
}
return app.exec();
}
|