* fix #3225 * Servatrice: use websockets as an optional component (for qt < 5.3) * Attempt++
This commit is contained in:
parent
73fb9ee03e
commit
c06fc562a1
9 changed files with 72 additions and 152 deletions
|
@ -130,29 +130,23 @@ OPTION(UPDATE_TRANSLATIONS "Update translations on compile" OFF)
|
||||||
MESSAGE(STATUS "UPDATE TRANSLATIONS: ${UPDATE_TRANSLATIONS}")
|
MESSAGE(STATUS "UPDATE TRANSLATIONS: ${UPDATE_TRANSLATIONS}")
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
FIND_PACKAGE(Qt5Widgets 5.4.0 REQUIRED) # For QSysInfo::buildAbi()
|
FIND_PACKAGE(Qt5Core 5.4.0 REQUIRED) # For QSysInfo::buildAbi()
|
||||||
ELSE()
|
ELSE()
|
||||||
FIND_PACKAGE(Qt5Widgets 5.0.3 REQUIRED)
|
FIND_PACKAGE(Qt5Core 5.0.3 REQUIRED)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(Qt5Widgets_FOUND)
|
IF(Qt5Core_FOUND)
|
||||||
MESSAGE(STATUS "Found Qt ${Qt5Widgets_VERSION_STRING}")
|
MESSAGE(STATUS "Found Qt ${Qt5Core_VERSION_STRING}")
|
||||||
|
|
||||||
# FIX: Qt was built with -reduce-relocations
|
# FIX: Qt was built with -reduce-relocations
|
||||||
if (Qt5_POSITION_INDEPENDENT_CODE)
|
if (Qt5_POSITION_INDEPENDENT_CODE)
|
||||||
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
FIND_PACKAGE(Qt5LinguistTools)
|
# guess plugins and libraries directory
|
||||||
IF(UPDATE_TRANSLATIONS)
|
set(QT_PLUGINS_DIR "${Qt5Core_DIR}/../../../plugins")
|
||||||
IF(NOT Qt5_LUPDATE_EXECUTABLE)
|
get_target_property(QT_LIBRARY_DIR Qt5::Core LOCATION)
|
||||||
MESSAGE(WARNING "Qt's lupdate not found.")
|
get_filename_component(QT_LIBRARY_DIR ${QT_LIBRARY_DIR} PATH)
|
||||||
ENDIF()
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF(NOT Qt5_LRELEASE_EXECUTABLE)
|
|
||||||
MESSAGE(WARNING "Qt's lrelease not found.")
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
ELSE()
|
ELSE()
|
||||||
MESSAGE(FATAL_ERROR "No Qt5 found!")
|
MESSAGE(FATAL_ERROR "No Qt5 found!")
|
||||||
|
|
|
@ -148,71 +148,33 @@ if(APPLE)
|
||||||
set(cockatrice_SOURCES ${cockatrice_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/resources/appicon.icns)
|
set(cockatrice_SOURCES ${cockatrice_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/resources/appicon.icns)
|
||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
|
|
||||||
set(COCKATRICE_LIBS)
|
# Qt5
|
||||||
|
find_package(Qt5 COMPONENTS Concurrent Multimedia Network PrintSupport Svg Widgets REQUIRED)
|
||||||
|
include_directories(${Qt5Concurrent_INCLUDE_DIRS} ${Qt5Multimedia_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS} ${Qt5PrintSupport_INCLUDE_DIRS} ${Qt5Svg_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
|
||||||
|
set(COCKATRICE_QT_MODULES Concurrent Multimedia Network PrintSupport Svg Widgets)
|
||||||
|
|
||||||
# qt5 stuff
|
# Qt5LinguistTools
|
||||||
if(Qt5Widgets_FOUND)
|
find_package(Qt5LinguistTools)
|
||||||
include_directories(${Qt5Widgets_INCLUDE_DIRS})
|
if(Qt5LinguistTools_FOUND)
|
||||||
list(APPEND COCKATRICE_LIBS Widgets)
|
include_directories(${Qt5LinguistTools_INCLUDE_DIRS})
|
||||||
|
list(APPEND COCKATRICE_LIBS LinguistTools)
|
||||||
|
|
||||||
# QtConcurrent
|
if(NOT Qt5_LRELEASE_EXECUTABLE)
|
||||||
find_package(Qt5Concurrent)
|
MESSAGE(WARNING "Qt's lrelease not found.")
|
||||||
if(Qt5Concurrent_FOUND)
|
|
||||||
include_directories(${Qt5Concurrent_INCLUDE_DIRS})
|
|
||||||
list(APPEND ORACLE_LIBS Concurrent)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# QtNetwork
|
if(UPDATE_TRANSLATIONS)
|
||||||
find_package(Qt5Network)
|
if(NOT Qt5_LUPDATE_EXECUTABLE)
|
||||||
if(Qt5Network_FOUND)
|
MESSAGE(WARNING "Qt's lupdate not found.")
|
||||||
include_directories(${Qt5Network_INCLUDE_DIRS})
|
endif()
|
||||||
list(APPEND COCKATRICE_LIBS Network)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# QtMultimedia
|
|
||||||
find_package(Qt5Multimedia)
|
|
||||||
if(Qt5Multimedia_FOUND)
|
|
||||||
include_directories(${Qt5Multimedia_INCLUDE_DIRS})
|
|
||||||
list(APPEND COCKATRICE_LIBS Multimedia)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# QtPrinter
|
|
||||||
find_package(Qt5PrintSupport)
|
|
||||||
if(Qt5PrintSupport_FOUND)
|
|
||||||
include_directories(${Qt5PrintSupport_INCLUDE_DIRS})
|
|
||||||
list(APPEND COCKATRICE_LIBS PrintSupport)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# QtSvg
|
|
||||||
find_package(Qt5Svg)
|
|
||||||
if(Qt5Svg_FOUND)
|
|
||||||
include_directories(${Qt5Svg_INCLUDE_DIRS})
|
|
||||||
list(APPEND COCKATRICE_LIBS Svg)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Qt5LinguistTools
|
|
||||||
find_package(Qt5LinguistTools)
|
|
||||||
if(Qt5LinguistTools_FOUND)
|
|
||||||
include_directories(${Qt5LinguistTools_INCLUDE_DIRS})
|
|
||||||
list(APPEND COCKATRICE_LIBS LinguistTools)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Let cmake chew Qt5's translations and resource files
|
|
||||||
# Note: header files are MOC-ed automatically by cmake
|
|
||||||
IF(UPDATE_TRANSLATIONS)
|
|
||||||
QT5_CREATE_TRANSLATION(cockatrice_QM ${translate_SRCS} ${cockatrice_TS})
|
QT5_CREATE_TRANSLATION(cockatrice_QM ${translate_SRCS} ${cockatrice_TS})
|
||||||
ELSE()
|
else()
|
||||||
QT5_ADD_TRANSLATION(cockatrice_QM ${cockatrice_TS})
|
QT5_ADD_TRANSLATION(cockatrice_QM ${cockatrice_TS})
|
||||||
ENDIF()
|
endif()
|
||||||
|
|
||||||
QT5_ADD_RESOURCES(cockatrice_RESOURCES_RCC ${cockatrice_RESOURCES})
|
|
||||||
|
|
||||||
# guess plugins and libraries directory
|
|
||||||
set(QT_PLUGINS_DIR "${Qt5Widgets_DIR}/../../../plugins")
|
|
||||||
get_target_property(QT_LIBRARY_DIR Qt5::Core LOCATION)
|
|
||||||
get_filename_component(QT_LIBRARY_DIR ${QT_LIBRARY_DIR} PATH)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
QT5_ADD_RESOURCES(cockatrice_RESOURCES_RCC ${cockatrice_RESOURCES})
|
||||||
|
|
||||||
# Declare path variables
|
# Declare path variables
|
||||||
set(ICONDIR share/icons CACHE STRING "icon dir")
|
set(ICONDIR share/icons CACHE STRING "icon dir")
|
||||||
set(DESKTOPDIR share/applications CACHE STRING "desktop file destination")
|
set(DESKTOPDIR share/applications CACHE STRING "desktop file destination")
|
||||||
|
@ -227,7 +189,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
ADD_EXECUTABLE(cockatrice WIN32 MACOSX_BUNDLE ${cockatrice_SOURCES} ${cockatrice_QM} ${cockatrice_RESOURCES_RCC} ${cockatrice_MOC_SRCS})
|
ADD_EXECUTABLE(cockatrice WIN32 MACOSX_BUNDLE ${cockatrice_SOURCES} ${cockatrice_QM} ${cockatrice_RESOURCES_RCC} ${cockatrice_MOC_SRCS})
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(cockatrice cockatrice_common)
|
TARGET_LINK_LIBRARIES(cockatrice cockatrice_common)
|
||||||
qt5_use_modules(cockatrice ${COCKATRICE_LIBS})
|
qt5_use_modules(cockatrice ${COCKATRICE_QT_MODULES})
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
|
|
@ -33,7 +33,7 @@ set(ORACLE_LIBS)
|
||||||
INCLUDE_DIRECTORIES(pb)
|
INCLUDE_DIRECTORIES(pb)
|
||||||
INCLUDE_DIRECTORIES(sfmt)
|
INCLUDE_DIRECTORIES(sfmt)
|
||||||
INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR})
|
||||||
include_directories(${Qt5Widgets_INCLUDE_DIRS})
|
include_directories(${Qt5Core_INCLUDE_DIRS})
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
add_library(cockatrice_common ${common_SOURCES} ${common_MOC_SRCS})
|
add_library(cockatrice_common ${common_SOURCES} ${common_MOC_SRCS})
|
||||||
|
|
|
@ -48,50 +48,33 @@ if(APPLE)
|
||||||
set(oracle_SOURCES ${oracle_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/resources/appicon.icns)
|
set(oracle_SOURCES ${oracle_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/resources/appicon.icns)
|
||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
|
|
||||||
set(ORACLE_LIBS)
|
# Qt5
|
||||||
|
find_package(Qt5 COMPONENTS Concurrent Network Svg Widgets REQUIRED)
|
||||||
|
include_directories(${Qt5Concurrent_INCLUDE_DIRS} ${Qt5Multimedia_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS} ${Qt5PrintSupport_INCLUDE_DIRS} ${Qt5Svg_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
|
||||||
|
set(ORACLE_QT_MODULES Concurrent Multimedia Network PrintSupport Svg Widgets)
|
||||||
|
|
||||||
# qt5 stuff
|
# Qt5LinguistTools
|
||||||
if(Qt5Widgets_FOUND)
|
find_package(Qt5LinguistTools)
|
||||||
include_directories(${Qt5Widgets_INCLUDE_DIRS})
|
if(Qt5LinguistTools_FOUND)
|
||||||
list(APPEND ORACLE_LIBS Widgets)
|
include_directories(${Qt5LinguistTools_INCLUDE_DIRS})
|
||||||
|
list(APPEND ORACLE_LIBS LinguistTools)
|
||||||
|
|
||||||
# QtConcurrent
|
if(NOT Qt5_LRELEASE_EXECUTABLE)
|
||||||
find_package(Qt5Concurrent)
|
MESSAGE(WARNING "Qt's lrelease not found.")
|
||||||
if(Qt5Concurrent_FOUND)
|
|
||||||
include_directories(${Qt5Concurrent_INCLUDE_DIRS})
|
|
||||||
list(APPEND ORACLE_LIBS Concurrent)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# QtNetwork
|
if(UPDATE_TRANSLATIONS)
|
||||||
find_package(Qt5Network)
|
if(NOT Qt5_LUPDATE_EXECUTABLE)
|
||||||
if(Qt5Network_FOUND)
|
MESSAGE(WARNING "Qt's lupdate not found.")
|
||||||
include_directories(${Qt5Network_INCLUDE_DIRS})
|
endif()
|
||||||
list(APPEND ORACLE_LIBS Network)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# QtSvg
|
|
||||||
find_package(Qt5Svg)
|
|
||||||
if(Qt5Svg_FOUND)
|
|
||||||
include_directories(${Qt5Svg_INCLUDE_DIRS})
|
|
||||||
list(APPEND ORACLE_LIBS Svg)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Let cmake chew Qt5's translations and resource files
|
|
||||||
# Note: header files are MOC-ed automatically by cmake
|
|
||||||
IF(UPDATE_TRANSLATIONS)
|
|
||||||
QT5_CREATE_TRANSLATION(oracle_QM ${translate_SRCS} ${oracle_TS})
|
QT5_CREATE_TRANSLATION(oracle_QM ${translate_SRCS} ${oracle_TS})
|
||||||
ELSE()
|
else()
|
||||||
QT5_ADD_TRANSLATION(oracle_QM ${oracle_TS})
|
QT5_ADD_TRANSLATION(oracle_QM ${oracle_TS})
|
||||||
ENDIF()
|
endif()
|
||||||
|
|
||||||
QT5_ADD_RESOURCES(oracle_RESOURCES_RCC ${oracle_RESOURCES})
|
|
||||||
|
|
||||||
# guess plugins and libraries directory
|
|
||||||
set(QT_PLUGINS_DIR "${Qt5Widgets_DIR}/../../../plugins")
|
|
||||||
get_target_property(QT_LIBRARY_DIR Qt5::Core LOCATION)
|
|
||||||
get_filename_component(QT_LIBRARY_DIR ${QT_LIBRARY_DIR} PATH)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
QT5_ADD_RESOURCES(oracle_RESOURCES_RCC ${oracle_RESOURCES})
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(../cockatrice/src)
|
INCLUDE_DIRECTORIES(../cockatrice/src)
|
||||||
|
|
||||||
# Libz is required to support zipped files
|
# Libz is required to support zipped files
|
||||||
|
@ -112,7 +95,7 @@ ENDIF()
|
||||||
# Build oracle binary and link it
|
# Build oracle binary and link it
|
||||||
ADD_EXECUTABLE(oracle WIN32 MACOSX_BUNDLE ${oracle_SOURCES} ${oracle_QM} ${oracle_RESOURCES_RCC} ${oracle_MOC_SRCS})
|
ADD_EXECUTABLE(oracle WIN32 MACOSX_BUNDLE ${oracle_SOURCES} ${oracle_QM} ${oracle_RESOURCES_RCC} ${oracle_MOC_SRCS})
|
||||||
|
|
||||||
qt5_use_modules(oracle ${ORACLE_LIBS})
|
qt5_use_modules(oracle ${ORACLE_QT_MODULES})
|
||||||
|
|
||||||
IF(ZLIB_FOUND)
|
IF(ZLIB_FOUND)
|
||||||
TARGET_LINK_LIBRARIES(oracle ${ZLIB_LIBRARIES})
|
TARGET_LINK_LIBRARIES(oracle ${ZLIB_LIBRARIES})
|
||||||
|
|
|
@ -36,42 +36,23 @@ if(APPLE)
|
||||||
set(servatrice_SOURCES ${servatrice_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/resources/appicon.icns)
|
set(servatrice_SOURCES ${servatrice_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/resources/appicon.icns)
|
||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
|
|
||||||
set(SERVATRICE_LIBS)
|
# Qt5
|
||||||
|
find_package(Qt5 COMPONENTS Network Sql REQUIRED)
|
||||||
|
include_directories(${Qt5Core_INCLUDE_DIRS})
|
||||||
|
include_directories(${Qt5Network_INCLUDE_DIRS})
|
||||||
|
include_directories(${Qt5Sql_INCLUDE_DIRS})
|
||||||
|
set(SERVATRICE_QT_MODULES Core Network Sql)
|
||||||
|
|
||||||
# qt5 stuff
|
# Qt Websockets
|
||||||
if(Qt5Widgets_FOUND)
|
find_package(Qt5WebSockets)
|
||||||
include_directories(${Qt5Widgets_INCLUDE_DIRS})
|
if(Qt5WebSockets_FOUND)
|
||||||
list(APPEND SERVATRICE_LIBS Widgets)
|
include_directories(${Qt5WebSockets_INCLUDE_DIRS})
|
||||||
|
list(APPEND SERVATRICE_QT_MODULES WebSockets)
|
||||||
# QtNetwork
|
else()
|
||||||
find_package(Qt5Network)
|
MESSAGE(WARNING "Qt5 websocket module not found")
|
||||||
if(Qt5Network_FOUND)
|
|
||||||
include_directories(${Qt5Network_INCLUDE_DIRS})
|
|
||||||
list(APPEND SERVATRICE_LIBS Network)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# QtSql
|
|
||||||
find_package(Qt5Sql)
|
|
||||||
if(Qt5Sql_FOUND)
|
|
||||||
include_directories(${Qt5Sql_INCLUDE_DIRS})
|
|
||||||
list(APPEND SERVATRICE_LIBS Sql)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# QtWebsockets
|
|
||||||
find_package(Qt5WebSockets)
|
|
||||||
if(Qt5WebSockets_FOUND)
|
|
||||||
include_directories(${Qt5WebSockets_INCLUDE_DIRS})
|
|
||||||
list(APPEND SERVATRICE_LIBS WebSockets)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
QT5_ADD_RESOURCES(servatrice_RESOURCES_RCC ${servatrice_RESOURCES})
|
|
||||||
|
|
||||||
# guess plugins and libraries directory
|
|
||||||
set(QT_PLUGINS_DIR "${Qt5Widgets_DIR}/../../../plugins")
|
|
||||||
get_target_property(QT_LIBRARY_DIR Qt5::Core LOCATION)
|
|
||||||
get_filename_component(QT_LIBRARY_DIR ${QT_LIBRARY_DIR} PATH)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
QT5_ADD_RESOURCES(servatrice_RESOURCES_RCC ${servatrice_RESOURCES})
|
||||||
SET(QT_DONT_USE_QTGUI TRUE)
|
SET(QT_DONT_USE_QTGUI TRUE)
|
||||||
|
|
||||||
# Mysql connector
|
# Mysql connector
|
||||||
|
@ -114,7 +95,7 @@ if(MSVC)
|
||||||
else()
|
else()
|
||||||
TARGET_LINK_LIBRARIES(servatrice cockatrice_common ${CMAKE_THREAD_LIBS_INIT})
|
TARGET_LINK_LIBRARIES(servatrice cockatrice_common ${CMAKE_THREAD_LIBS_INIT})
|
||||||
endif()
|
endif()
|
||||||
qt5_use_modules(servatrice ${SERVATRICE_LIBS})
|
qt5_use_modules(servatrice ${SERVATRICE_QT_MODULES})
|
||||||
|
|
||||||
# install rules
|
# install rules
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
|
|
|
@ -104,7 +104,7 @@ Servatrice_ConnectionPool *Servatrice_GameServer::findLeastUsedConnectionPool()
|
||||||
return connectionPools[poolIndex];
|
return connectionPools[poolIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION > 0x050300
|
#ifdef QT_WEBSOCKETS_LIB
|
||||||
#define WEBSOCKET_POOL_NUMBER 999
|
#define WEBSOCKET_POOL_NUMBER 999
|
||||||
|
|
||||||
Servatrice_WebsocketGameServer::Servatrice_WebsocketGameServer(Servatrice *_server,
|
Servatrice_WebsocketGameServer::Servatrice_WebsocketGameServer(Servatrice *_server,
|
||||||
|
@ -430,7 +430,7 @@ bool Servatrice::initServer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION > 0x050300
|
#ifdef QT_WEBSOCKETS_LIB
|
||||||
// WEBSOCKET SERVER
|
// WEBSOCKET SERVER
|
||||||
if (getNumberOfWebSocketPools() > 0) {
|
if (getNumberOfWebSocketPools() > 0) {
|
||||||
websocketGameServer = new Servatrice_WebsocketGameServer(this, getNumberOfWebSocketPools(),
|
websocketGameServer = new Servatrice_WebsocketGameServer(this, getNumberOfWebSocketPools(),
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define SERVATRICE_H
|
#define SERVATRICE_H
|
||||||
|
|
||||||
#include <QTcpServer>
|
#include <QTcpServer>
|
||||||
#if QT_VERSION > 0x050300
|
#ifdef QT_WEBSOCKETS_LIB
|
||||||
#include <QWebSocketServer>
|
#include <QWebSocketServer>
|
||||||
#endif
|
#endif
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
|
@ -66,7 +66,7 @@ protected:
|
||||||
Servatrice_ConnectionPool *findLeastUsedConnectionPool();
|
Servatrice_ConnectionPool *findLeastUsedConnectionPool();
|
||||||
};
|
};
|
||||||
|
|
||||||
#if QT_VERSION > 0x050300
|
#ifdef QT_WEBSOCKETS_LIB
|
||||||
class Servatrice_WebsocketGameServer : public QWebSocketServer
|
class Servatrice_WebsocketGameServer : public QWebSocketServer
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -158,7 +158,7 @@ private:
|
||||||
DatabaseType databaseType;
|
DatabaseType databaseType;
|
||||||
QTimer *pingClock, *statusUpdateClock;
|
QTimer *pingClock, *statusUpdateClock;
|
||||||
Servatrice_GameServer *gameServer;
|
Servatrice_GameServer *gameServer;
|
||||||
#if QT_VERSION > 0x050300
|
#ifdef QT_WEBSOCKETS_LIB
|
||||||
Servatrice_WebsocketGameServer *websocketGameServer;
|
Servatrice_WebsocketGameServer *websocketGameServer;
|
||||||
#endif
|
#endif
|
||||||
Servatrice_IslServer *islServer;
|
Servatrice_IslServer *islServer;
|
||||||
|
|
|
@ -1629,7 +1629,7 @@ bool TcpServerSocketInterface::initTcpSession()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION > 0x050300
|
#ifdef QT_WEBSOCKETS_LIB
|
||||||
WebsocketServerSocketInterface::WebsocketServerSocketInterface(Servatrice *_server,
|
WebsocketServerSocketInterface::WebsocketServerSocketInterface(Servatrice *_server,
|
||||||
Servatrice_DatabaseInterface *_databaseInterface,
|
Servatrice_DatabaseInterface *_databaseInterface,
|
||||||
QObject *parent)
|
QObject *parent)
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define SERVERSOCKETINTERFACE_H
|
#define SERVERSOCKETINTERFACE_H
|
||||||
|
|
||||||
#include <QTcpSocket>
|
#include <QTcpSocket>
|
||||||
#if QT_VERSION > 0x050300
|
#ifdef QT_WEBSOCKETS_LIB
|
||||||
#include <QWebSocket>
|
#include <QWebSocket>
|
||||||
#endif
|
#endif
|
||||||
#include "server_protocolhandler.h"
|
#include "server_protocolhandler.h"
|
||||||
|
@ -181,7 +181,7 @@ public slots:
|
||||||
void initConnection(int socketDescriptor);
|
void initConnection(int socketDescriptor);
|
||||||
};
|
};
|
||||||
|
|
||||||
#if QT_VERSION > 0x050300
|
#ifdef QT_WEBSOCKETS_LIB
|
||||||
class WebsocketServerSocketInterface : public AbstractServerSocketInterface
|
class WebsocketServerSocketInterface : public AbstractServerSocketInterface
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
Loading…
Reference in a new issue