mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-05 23:09:04 +00:00
Merge with develop
--HG-- branch : compatibility-develop
This commit is contained in:
commit
b149c94a26
7 changed files with 55 additions and 18 deletions
|
@ -44,12 +44,18 @@ CHECK_OUT_OF_SOURCE()
|
||||||
# To be able to specify a different deployment target on Mac OS X :
|
# To be able to specify a different deployment target on Mac OS X :
|
||||||
# export MACOSX_DEPLOYMENT_TARGET=10.6
|
# export MACOSX_DEPLOYMENT_TARGET=10.6
|
||||||
|
|
||||||
|
IF(CMAKE_VERSION VERSION_GREATER "2.8.10")
|
||||||
|
STRING(TIMESTAMP CURRENT_YEAR "%Y")
|
||||||
|
ELSE()
|
||||||
|
SET(CURRENT_YEAR "2016")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||||
PROJECT(RyzomCore CXX C)
|
PROJECT(RyzomCore CXX C)
|
||||||
SET(NL_VERSION_MAJOR 0)
|
SET(NL_VERSION_MAJOR 0)
|
||||||
SET(NL_VERSION_MINOR 12)
|
SET(NL_VERSION_MINOR 12)
|
||||||
SET(NL_VERSION_PATCH 0)
|
SET(NL_VERSION_PATCH 0)
|
||||||
SET(YEAR "2004-2015")
|
SET(YEAR "2004-${CURRENT_YEAR}")
|
||||||
SET(AUTHOR "Winchgate and The Ryzom Core Community")
|
SET(AUTHOR "Winchgate and The Ryzom Core Community")
|
||||||
|
|
||||||
SET(RYZOM_VERSION_MAJOR 2)
|
SET(RYZOM_VERSION_MAJOR 2)
|
||||||
|
@ -122,13 +128,17 @@ ENDIF(WITH_LIBXML2_ICONV)
|
||||||
|
|
||||||
IF(WITH_STATIC)
|
IF(WITH_STATIC)
|
||||||
# libxml2 could need winsock2 library
|
# libxml2 could need winsock2 library
|
||||||
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${WINSOCK2_LIB})
|
IF(WINSOCK2_LIB)
|
||||||
|
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${WINSOCK2_LIB})
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# on Mac OS X libxml2 requires iconv and liblzma
|
IF(UNIX)
|
||||||
IF(APPLE)
|
# under Linux and OS X, recent libxml2 versions are linked against liblzma
|
||||||
FIND_PACKAGE(LibLZMA REQUIRED)
|
FIND_PACKAGE(LibLZMA)
|
||||||
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES})
|
IF(LIBLZMA_LIBRARIES)
|
||||||
ENDIF(APPLE)
|
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES})
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
ENDIF(WITH_STATIC)
|
ENDIF(WITH_STATIC)
|
||||||
|
|
||||||
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/PCHSupport.cmake)
|
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/PCHSupport.cmake)
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
FIND_PACKAGE(OpenGL REQUIRED)
|
|
||||||
|
|
||||||
IF(NOT WIN32)
|
IF(NOT WIN32)
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
FIND_LIBRARY(CARBON NAMES Carbon)
|
FIND_LIBRARY(CARBON NAMES Carbon)
|
||||||
FIND_LIBRARY(COCOA NAMES Cocoa)
|
FIND_LIBRARY(COCOA NAMES Cocoa)
|
||||||
|
FIND_PACKAGE(OpenGL REQUIRED)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(OLD_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
SET(OLD_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES .so)
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES .so)
|
||||||
FIND_PACKAGE(X11)
|
FIND_PACKAGE(X11)
|
||||||
FIND_PACKAGE(XF86VidMode)
|
FIND_PACKAGE(XF86VidMode)
|
||||||
|
FIND_PACKAGE(OpenGL REQUIRED)
|
||||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_CMAKE_FIND_LIBRARY_SUFFIXES})
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
ELSE()
|
||||||
|
FIND_PACKAGE(OpenGL REQUIRED)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
FILE(GLOB SRC *.cpp *.h *.def *.rc)
|
FILE(GLOB SRC *.cpp *.h *.def *.rc)
|
||||||
|
|
|
@ -21,6 +21,12 @@
|
||||||
// STL includes
|
// STL includes
|
||||||
|
|
||||||
// Qt includes
|
// Qt includes
|
||||||
|
#include <qglobal.h>
|
||||||
|
|
||||||
|
#ifdef Q_COMPILER_RVALUE_REFS
|
||||||
|
#undef Q_COMPILER_RVALUE_REFS
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
|
|
||||||
// NeL includes
|
// NeL includes
|
||||||
|
|
|
@ -21,6 +21,12 @@
|
||||||
// STL includes
|
// STL includes
|
||||||
|
|
||||||
// Qt includes
|
// Qt includes
|
||||||
|
#include <qglobal.h>
|
||||||
|
|
||||||
|
#ifdef Q_COMPILER_RVALUE_REFS
|
||||||
|
#undef Q_COMPILER_RVALUE_REFS
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QTextEdit>
|
#include <QTextEdit>
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
|
|
|
@ -26,6 +26,12 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Qt includes
|
// Qt includes
|
||||||
|
#include <qglobal.h>
|
||||||
|
|
||||||
|
#ifdef Q_COMPILER_RVALUE_REFS
|
||||||
|
#undef Q_COMPILER_RVALUE_REFS
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QtCore/QMap>
|
#include <QtCore/QMap>
|
||||||
#include <QtCore/qdebug.h>
|
#include <QtCore/qdebug.h>
|
||||||
|
|
|
@ -100,7 +100,7 @@ void CCommandLog::doDisplay(const CLog::TDisplayInfo& args, const char *message)
|
||||||
|
|
||||||
std::string str = NLMISC::CWindowDisplayer::stringifyMessage(args, message);
|
std::string str = NLMISC::CWindowDisplayer::stringifyMessage(args, message);
|
||||||
|
|
||||||
tSigDisplay(color, str.substr(0, str.size() - 1).c_str());
|
emit tSigDisplay(color, QString::fromUtf8(str.substr(0, str.size() - 1).c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCommandLog::tSlotDisplay(const QColor &c, const QString &text)
|
void CCommandLog::tSlotDisplay(const QColor &c, const QString &text)
|
||||||
|
@ -115,9 +115,8 @@ void CCommandLog::returnPressed()
|
||||||
if (text.isEmpty())
|
if (text.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::string cmd = text.toLocal8Bit().data();
|
emit execCommand(text);
|
||||||
execCommand(cmd);
|
if (m_Func) m_Func(text.toUtf8().constData());
|
||||||
if (m_Func) m_Func(cmd);
|
|
||||||
|
|
||||||
m_CommandInput->clear();
|
m_CommandInput->clear();
|
||||||
}
|
}
|
||||||
|
@ -148,10 +147,12 @@ void CCommandLogDisplayer::doDisplay(const NLMISC::CLog::TDisplayInfo& args, con
|
||||||
CCommandLog::doDisplay(args, message);
|
CCommandLog::doDisplay(args, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCommandLogDisplayer::execCommandLog(const std::string &cmd)
|
void CCommandLogDisplayer::execCommandLog(const QString &cmd)
|
||||||
{
|
{
|
||||||
m_Log.displayRawNL("> %s", cmd.c_str());
|
std::string str = cmd.toUtf8().constData();
|
||||||
ICommand::execute(cmd, m_Log);
|
|
||||||
|
m_Log.displayRawNL("> %s", str.c_str());
|
||||||
|
ICommand::execute(str, m_Log);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* namespace NLQT */
|
} /* namespace NLQT */
|
||||||
|
|
|
@ -34,6 +34,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
// STL includes
|
// STL includes
|
||||||
|
|
||||||
// Qt includes
|
// Qt includes
|
||||||
|
#include <qglobal.h>
|
||||||
|
|
||||||
|
#ifdef Q_COMPILER_RVALUE_REFS
|
||||||
|
#undef Q_COMPILER_RVALUE_REFS
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QTextEdit>
|
#include <QTextEdit>
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
|
@ -64,7 +70,7 @@ public:
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void tSigDisplay(const QColor &c, const QString &text);
|
void tSigDisplay(const QColor &c, const QString &text);
|
||||||
void execCommand(const std::string &cmd);
|
void execCommand(const QString &cmd);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void returnPressed();
|
void returnPressed();
|
||||||
|
@ -93,7 +99,7 @@ protected:
|
||||||
virtual void doDisplay(const NLMISC::CLog::TDisplayInfo& args, const char *message);
|
virtual void doDisplay(const NLMISC::CLog::TDisplayInfo& args, const char *message);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void execCommandLog(const std::string &cmd);
|
void execCommandLog(const QString &cmd);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NLMISC::CLog m_Log;
|
NLMISC::CLog m_Log;
|
||||||
|
|
Loading…
Reference in a new issue