Allow logger usage on console applications
This commit is contained in:
parent
de873448b5
commit
962e9c7d16
|
@ -6,6 +6,7 @@ ENDIF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6)
|
||||||
# add framework cmake modules
|
# add framework cmake modules
|
||||||
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake;${CMAKE_MODULE_PATH}")
|
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake;${CMAKE_MODULE_PATH}")
|
||||||
|
|
||||||
|
ADD_DEFINITIONS(-DFRAMEWORK)
|
||||||
OPTION(CRASH_HANDLER "Generate crash reports" ON)
|
OPTION(CRASH_HANDLER "Generate crash reports" ON)
|
||||||
OPTION(LUAJIT "Use lua jit" OFF)
|
OPTION(LUAJIT "Use lua jit" OFF)
|
||||||
OPTION(USE_STATIC_LIBS "Don't use shared libraries (dlls)" ON)
|
OPTION(USE_STATIC_LIBS "Don't use shared libraries (dlls)" ON)
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
EventDispatcher g_dispatcher;
|
EventDispatcher g_dispatcher;
|
||||||
|
|
||||||
|
|
||||||
void EventDispatcher::flush()
|
void EventDispatcher::flush()
|
||||||
{
|
{
|
||||||
while(!m_eventList.empty())
|
while(!m_eventList.empty())
|
||||||
|
|
|
@ -61,7 +61,9 @@ void Logger::log(Fw::LogLevel level, const std::string& message)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(level == Fw::LogFatal) {
|
if(level == Fw::LogFatal) {
|
||||||
|
#ifdef OTCLIENT
|
||||||
g_window.displayFatalError(message);
|
g_window.displayFatalError(message);
|
||||||
|
#endif
|
||||||
ignoreLogs = true;
|
ignoreLogs = true;
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -368,8 +368,6 @@ static const luaL_Reg bitlib[] = {
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int luaopen_bit32 (lua_State *L) {
|
int luaopen_bit32 (lua_State *L) {
|
||||||
luaL_newlib(L, bitlib);
|
luaL_newlib(L, bitlib);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -4,6 +4,7 @@ IF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6)
|
||||||
ENDIF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6)
|
ENDIF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6)
|
||||||
|
|
||||||
# otclient options
|
# otclient options
|
||||||
|
ADD_DEFINITIONS(-DOTCLIENT)
|
||||||
OPTION(BOT_PROTECTION "Enable bot protection" ON)
|
OPTION(BOT_PROTECTION "Enable bot protection" ON)
|
||||||
SET(PROTOCOL 860 CACHE "Protocol version" STRING)
|
SET(PROTOCOL 860 CACHE "Protocol version" STRING)
|
||||||
OPTION(CIPSOFT_RSA "Use cipsoft RSA to login into original tibia" OFF)
|
OPTION(CIPSOFT_RSA "Use cipsoft RSA to login into original tibia" OFF)
|
||||||
|
|
Loading…
Reference in New Issue