diff options
Diffstat (limited to 'src/crawl')
-rwxr-xr-x | src/crawl/GNUmakefile | 4 | ||||
-rwxr-xr-x | src/crawl/crawl.cpp | 14 |
2 files changed, 3 insertions, 15 deletions
diff --git a/src/crawl/GNUmakefile b/src/crawl/GNUmakefile index 5a9051a..cea25f5 100755 --- a/src/crawl/GNUmakefile +++ b/src/crawl/GNUmakefile @@ -36,10 +36,6 @@ endif ifeq ($(WITH_LUA),1) INCLUDE_CXXFLAGS += \ -DWITH_LUA - -INCLUDE_DIRS += \ - -I$(TOPDIR)/src/libcrawler \ - $(TOLUA_INCLUDES) endif CPP_OBJS = \ diff --git a/src/crawl/crawl.cpp b/src/crawl/crawl.cpp index 4abd37c..648060c 100755 --- a/src/crawl/crawl.cpp +++ b/src/crawl/crawl.cpp @@ -6,6 +6,7 @@ #include "URLNormalizer.hpp" #include "URLFilter.hpp" #include "TypeDetect.hpp" +#include "libcrawler.hpp" #include "ModuleLoader.hpp" @@ -55,18 +56,14 @@ BOOL WINAPI termHandler( DWORD ctrlType ) #endif -#ifdef WITH_LUA -// TODO: should be in the laoding function of libcrawl -#include "tolua.h" -#include "URLLua.hpp" -#endif - static int counter = 0; int main( int /* argc */, char *argv[] ) { try { LuaVM luaVm; + + initialize_libcrawler( (void *)&luaVm ); //Logger::instance( ).openConsoleLog( logDEBUG ); @@ -107,11 +104,6 @@ int main( int /* argc */, char *argv[] ) #endif ModuleLoader<URLNormalizer> urlNormalizers( normalizerModules, CLOSE_DEFERRED, (void *)&luaVm ); -#ifdef WITH_LUA - // TODO: should be in the laoding function of libcrawl - tolua_URL_open( luaVm.handle( ) ); -#endif - // initialize crawler function luaVm.executeFunction( "init" ); |