2019-01-02 14:19:39 +03:00
|
|
|
#include <QCoreApplication>
|
|
|
|
#include <serverutils.h>
|
|
|
|
#include <quasarapp.h>
|
2019-03-10 16:56:42 +03:00
|
|
|
#include <serverutils.h>
|
|
|
|
#include <mainserver.h>
|
2019-01-02 14:19:39 +03:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
if (!ServerUtils::parseParams(argc, argv)) {
|
|
|
|
ServerUtils::help();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (QuasarAppUtils::Params::isEndable("help") ||
|
|
|
|
QuasarAppUtils::Params::isEndable("h")) {
|
|
|
|
ServerUtils::help();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-01-06 14:55:25 +03:00
|
|
|
if(ServerUtils::runDaemon()) {
|
|
|
|
return 0;
|
2019-01-02 14:19:39 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
QCoreApplication a(argc, argv);
|
|
|
|
|
2019-03-10 16:56:42 +03:00
|
|
|
MainServer loclaServer;
|
2019-03-10 21:20:51 +03:00
|
|
|
if (!loclaServer.run()) {
|
|
|
|
QuasarAppUtils::Params::verboseLog("server is not run!");
|
|
|
|
return 1;
|
|
|
|
}
|
2019-01-06 14:55:25 +03:00
|
|
|
|
2019-01-02 14:19:39 +03:00
|
|
|
return a.exec();
|
|
|
|
}
|