mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Fix launch sequence to avoid http port collisions
This commit is contained in:
parent
f183fc1dd2
commit
d96d01d963
@ -215,16 +215,6 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SERVER_RELEASE
|
||||
QSettings *settings = new QSettings(YACReader::getSettingsPath() + "/YACReaderLibrary.ini", QSettings::IniFormat); //TODO unificar la creaci<63>n del fichero de config con el servidor
|
||||
settings->beginGroup("libraryConfig");
|
||||
|
||||
s = new Startup();
|
||||
|
||||
if (settings->value(SERVER_ON, true).toBool()) {
|
||||
s->start();
|
||||
}
|
||||
#endif
|
||||
QLOG_INFO() << "YACReaderLibrary attempting to start";
|
||||
|
||||
logSystemAndConfig();
|
||||
@ -237,8 +227,20 @@ int main(int argc, char **argv)
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
QLOG_INFO() << "YACReaderLibrary starting";
|
||||
|
||||
#ifdef SERVER_RELEASE
|
||||
QSettings *settings = new QSettings(YACReader::getSettingsPath() + "/YACReaderLibrary.ini", QSettings::IniFormat); //TODO unificar la creaci<63>n del fichero de config con el servidor
|
||||
settings->beginGroup("libraryConfig");
|
||||
|
||||
s = new Startup();
|
||||
|
||||
if (settings->value(SERVER_ON, true).toBool()) {
|
||||
s->start();
|
||||
}
|
||||
#endif
|
||||
|
||||
auto localServer = new YACReaderLocalServer();
|
||||
|
||||
auto mw = new LibraryWindow();
|
||||
|
@ -175,6 +175,21 @@ int main(int argc, char **argv)
|
||||
|
||||
qRegisterMetaType<ComicDB>("ComicDB");
|
||||
|
||||
QLOG_INFO() << "YACReaderLibraryServer attempting to start";
|
||||
|
||||
logSystemAndConfig();
|
||||
|
||||
if (YACReaderLocalServer::isRunning()) // allow one server instance
|
||||
{
|
||||
QLOG_WARN() << "another instance of YACReaderLibrary is running";
|
||||
#ifdef Q_OS_WIN
|
||||
logger.shutDownLoggerThread();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
QLOG_INFO() << "YACReaderLibrary starting";
|
||||
|
||||
QSettings *settings = new QSettings(YACReader::getSettingsPath() + "/" + QCoreApplication::applicationName() + ".ini", QSettings::IniFormat);
|
||||
settings->beginGroup("libraryConfig");
|
||||
|
||||
@ -195,19 +210,6 @@ int main(int argc, char **argv)
|
||||
s->start();
|
||||
}
|
||||
|
||||
QLOG_INFO() << "YACReaderLibraryServer attempting to start";
|
||||
|
||||
logSystemAndConfig();
|
||||
|
||||
if (YACReaderLocalServer::isRunning()) // allow one server instance
|
||||
{
|
||||
QLOG_WARN() << "another instance of YACReaderLibrary is running";
|
||||
#ifdef Q_OS_WIN
|
||||
logger.shutDownLoggerThread();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
QLOG_INFO() << "YACReaderLibrary starting";
|
||||
QLOG_INFO() << "Running on port" << s->getPort();
|
||||
|
||||
//Update libraries to now versions
|
||||
|
Loading…
Reference in New Issue
Block a user