develop
Warmist 2011-08-09 00:34:49 +03:00
commit c1273982cf
4 changed files with 20 additions and 21 deletions

@ -8,6 +8,11 @@ ELSE()
SET ( LIBS m dl )
ENDIF()
IF(UNIX)
add_definitions(-DLINUX_BUILD)
SET(CMAKE_C_FLAGS "-m32")
ENDIF()
# Build Libraries
SET (SRC_LIBLUA
src/lapi.c

@ -1,17 +1,10 @@
find_package(Lua51 QUIET)
if(LUA51_FOUND)
include_directories(${LUA_INCLUDE_DIR} include)
include_directories("${dfhack_SOURCE_DIR}/library/depends/tthread")
FILE(GLOB DFUSION_CPPS src/*.c*)
set(
DFUSION_CPPS_ALL
dfusion.cpp
${DFUSION_CPPS}
)
DFHACK_PLUGIN(dfusion ${DFUSION_CPPS_ALL})
target_link_libraries(dfusion ${LUA_LIBRARIES})
install(DIRECTORY luafiles/ DESTINATION ${DFHACK_DATA_DESTINATION}/dfusion)
else(LUA51_FOUND)
MESSAGE(STATUS "Required libraries (lua51) not found - dfusion plugin can't be built.")
endif(LUA51_FOUND)
include_directories(include)
include_directories("${dfhack_SOURCE_DIR}/library/depends/tthread")
FILE(GLOB DFUSION_CPPS src/*.c*)
set(
DFUSION_CPPS_ALL
dfusion.cpp
${DFUSION_CPPS}
)
DFHACK_PLUGIN(dfusion ${DFUSION_CPPS_ALL} LINK_LIBRARIES lua)
install(DIRECTORY luafiles/ DESTINATION ${DFHACK_DATA_DESTINATION}/dfusion)

@ -75,7 +75,7 @@ DFhackCExport command_result plugin_onupdate ( Core * c )
catch(lua::exception &e)
{
c->con.printerr("Error OnTick:%s\n",e.what());
c->con.printerr("%s",lua::DebugDump(lua::glua::Get()));
c->con.printerr("%s",lua::DebugDump(lua::glua::Get()).c_str());
c->con.msleep(1000);
}
}
@ -102,7 +102,7 @@ void InterpreterLoop(Core* c)
catch(lua::exception &e)
{
con.printerr("Error:%s\n",e.what());
c->con.printerr("%s",lua::DebugDump(lua::glua::Get()));
c->con.printerr("%s",lua::DebugDump(lua::glua::Get()).c_str());
s.settop(0);
}
con.lineedit(">>",curline);
@ -123,7 +123,7 @@ DFhackCExport command_result lua_run (Core * c, vector <string> & parameters)
catch(lua::exception &e)
{
con.printerr("Error:%s\n",e.what());
c->con.printerr("%s",lua::DebugDump(lua::glua::Get()));
c->con.printerr("%s",lua::DebugDump(lua::glua::Get()).c_str());
}
}
else
@ -148,7 +148,7 @@ DFhackCExport command_result dfusion (Core * c, vector <string> & parameters)
catch(lua::exception &e)
{
con.printerr("Error:%s\n",e.what());
c->con.printerr("%s",lua::DebugDump(lua::glua::Get()));
c->con.printerr("%s",lua::DebugDump(lua::glua::Get()).c_str());
}
s.settop(0);// clean up
mymutex->unlock();

@ -2,6 +2,7 @@
#define FUNCTIONCALL__H
#include <vector>
using std::vector;
using std::size_t;
class FunctionCaller
{
public: