mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-20 16:08:44 +00:00
Merge with develop
This commit is contained in:
commit
c0e1abd41d
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 :
|
||||
# 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)
|
||||
PROJECT(RyzomCore CXX C)
|
||||
SET(NL_VERSION_MAJOR 0)
|
||||
SET(NL_VERSION_MINOR 12)
|
||||
SET(NL_VERSION_PATCH 0)
|
||||
SET(YEAR "2004-2015")
|
||||
SET(YEAR "2004-${CURRENT_YEAR}")
|
||||
SET(AUTHOR "Winchgate and The Ryzom Core Community")
|
||||
|
||||
SET(RYZOM_VERSION_MAJOR 2)
|
||||
|
@ -122,13 +128,17 @@ ENDIF(WITH_LIBXML2_ICONV)
|
|||
|
||||
IF(WITH_STATIC)
|
||||
# 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(APPLE)
|
||||
FIND_PACKAGE(LibLZMA REQUIRED)
|
||||
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES})
|
||||
ENDIF(APPLE)
|
||||
IF(UNIX)
|
||||
# under Linux and OS X, recent libxml2 versions are linked against liblzma
|
||||
FIND_PACKAGE(LibLZMA)
|
||||
IF(LIBLZMA_LIBRARIES)
|
||||
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF(WITH_STATIC)
|
||||
|
||||
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/PCHSupport.cmake)
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
FIND_PACKAGE(OpenGL REQUIRED)
|
||||
|
||||
IF(NOT WIN32)
|
||||
IF(APPLE)
|
||||
FIND_LIBRARY(CARBON NAMES Carbon)
|
||||
FIND_LIBRARY(COCOA NAMES Cocoa)
|
||||
FIND_PACKAGE(OpenGL REQUIRED)
|
||||
ELSE()
|
||||
SET(OLD_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES .so)
|
||||
FIND_PACKAGE(X11)
|
||||
FIND_PACKAGE(XF86VidMode)
|
||||
FIND_PACKAGE(OpenGL REQUIRED)
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
ENDIF()
|
||||
ELSE()
|
||||
FIND_PACKAGE(OpenGL REQUIRED)
|
||||
ENDIF()
|
||||
|
||||
FILE(GLOB SRC *.cpp *.h *.def *.rc)
|
||||
|
|
|
@ -21,6 +21,12 @@
|
|||
// STL includes
|
||||
|
||||
// Qt includes
|
||||
#include <qglobal.h>
|
||||
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
#undef Q_COMPILER_RVALUE_REFS
|
||||
#endif
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
// NeL includes
|
||||
|
|
|
@ -21,6 +21,12 @@
|
|||
// STL includes
|
||||
|
||||
// Qt includes
|
||||
#include <qglobal.h>
|
||||
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
#undef Q_COMPILER_RVALUE_REFS
|
||||
#endif
|
||||
|
||||
#include <QWidget>
|
||||
#include <QTextEdit>
|
||||
#include <QLineEdit>
|
||||
|
|
|
@ -26,6 +26,12 @@
|
|||
#endif
|
||||
|
||||
// Qt includes
|
||||
#include <qglobal.h>
|
||||
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
#undef Q_COMPILER_RVALUE_REFS
|
||||
#endif
|
||||
|
||||
#include <QApplication>
|
||||
#include <QtCore/QMap>
|
||||
#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);
|
||||
|
||||
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)
|
||||
|
@ -115,9 +115,8 @@ void CCommandLog::returnPressed()
|
|||
if (text.isEmpty())
|
||||
return;
|
||||
|
||||
std::string cmd = text.toLocal8Bit().data();
|
||||
execCommand(cmd);
|
||||
if (m_Func) m_Func(cmd);
|
||||
emit execCommand(text);
|
||||
if (m_Func) m_Func(text.toUtf8().constData());
|
||||
|
||||
m_CommandInput->clear();
|
||||
}
|
||||
|
@ -148,10 +147,12 @@ void CCommandLogDisplayer::doDisplay(const NLMISC::CLog::TDisplayInfo& args, con
|
|||
CCommandLog::doDisplay(args, message);
|
||||
}
|
||||
|
||||
void CCommandLogDisplayer::execCommandLog(const std::string &cmd)
|
||||
void CCommandLogDisplayer::execCommandLog(const QString &cmd)
|
||||
{
|
||||
m_Log.displayRawNL("> %s", cmd.c_str());
|
||||
ICommand::execute(cmd, m_Log);
|
||||
std::string str = cmd.toUtf8().constData();
|
||||
|
||||
m_Log.displayRawNL("> %s", str.c_str());
|
||||
ICommand::execute(str, m_Log);
|
||||
}
|
||||
|
||||
} /* namespace NLQT */
|
||||
|
|
|
@ -34,6 +34,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
// STL includes
|
||||
|
||||
// Qt includes
|
||||
#include <qglobal.h>
|
||||
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
#undef Q_COMPILER_RVALUE_REFS
|
||||
#endif
|
||||
|
||||
#include <QWidget>
|
||||
#include <QTextEdit>
|
||||
#include <QLineEdit>
|
||||
|
@ -64,7 +70,7 @@ public:
|
|||
|
||||
signals:
|
||||
void tSigDisplay(const QColor &c, const QString &text);
|
||||
void execCommand(const std::string &cmd);
|
||||
void execCommand(const QString &cmd);
|
||||
|
||||
private slots:
|
||||
void returnPressed();
|
||||
|
@ -93,7 +99,7 @@ protected:
|
|||
virtual void doDisplay(const NLMISC::CLog::TDisplayInfo& args, const char *message);
|
||||
|
||||
private slots:
|
||||
void execCommandLog(const std::string &cmd);
|
||||
void execCommandLog(const QString &cmd);
|
||||
|
||||
private:
|
||||
NLMISC::CLog m_Log;
|
||||
|
|
Loading…
Reference in a new issue