mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 03:53:26 -08:00
[Server] Build the server startup once for every server executable (#7863)
This commit is contained in:
parent
9315a4aa6d
commit
a6d5dd5275
3 changed files with 42 additions and 13 deletions
|
|
@ -18,6 +18,8 @@
|
|||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#include "libcockatrice/rng/rng_abstract.h"
|
||||
#include "servatrice.h"
|
||||
#include "server_logger.h"
|
||||
|
|
@ -51,12 +53,7 @@
|
|||
#include <qnamespace.h>
|
||||
#include <string>
|
||||
|
||||
RNG_Abstract *rng;
|
||||
ServerLogger *logger;
|
||||
QThread *loggerThread;
|
||||
SettingsCache *settingsCache;
|
||||
SignalHandler *signalhandler;
|
||||
SmtpClient *smtpClient;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
|
|
|
|||
15
servatrice/src/servatrice_globals.cpp
Normal file
15
servatrice/src/servatrice_globals.cpp
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#include "libcockatrice/rng/rng_abstract.h"
|
||||
#include "main.h"
|
||||
#include "server_logger.h"
|
||||
#include "settingscache.h"
|
||||
#include "smtpclient.h"
|
||||
|
||||
#include <QThread>
|
||||
|
||||
// Process-wide services the server sources reach through these pointers. They are defined here, not
|
||||
// in main.cpp, so that every executable sharing servatrice_core sees the same instances.
|
||||
RNG_Abstract *rng = nullptr;
|
||||
ServerLogger *logger = nullptr;
|
||||
QThread *loggerThread = nullptr;
|
||||
SettingsCache *settingsCache = nullptr;
|
||||
SmtpClient *smtpClient = nullptr;
|
||||
Loading…
Add table
Add a link
Reference in a new issue