diff options
author | Haruna <haru@dotalux.com> | 2014-05-30 03:31:14 +0200 |
---|---|---|
committer | Haruna <haru@dotalux.com> | 2014-05-30 03:31:14 +0200 |
commit | c3976d24500abc6084a4d96d60ae84c65302e3ae (patch) | |
tree | d3c9d26b2d7ba1a5ab124b0bdced0e05eb42e9ca | |
parent | a81f3869bf34deb99c21be65b1f384780045c401 (diff) | |
parent | 90e074b3d791b6df55ba62d1209c124233c4135b (diff) | |
download | hercules-c3976d24500abc6084a4d96d60ae84c65302e3ae.tar.gz hercules-c3976d24500abc6084a4d96d60ae84c65302e3ae.tar.bz2 hercules-c3976d24500abc6084a4d96d60ae84c65302e3ae.tar.xz hercules-c3976d24500abc6084a4d96d60ae84c65302e3ae.zip |
Merge pull request #285 from MrKeiKun/fix/remove_redundants
Removed redundants
-rw-r--r-- | 3rdparty/CMakeLists.txt | 55 | ||||
-rw-r--r-- | 3rdparty/cmake/FindFunctionLibrary.cmake | 47 | ||||
-rw-r--r-- | 3rdparty/cmake/FindMYSQL.cmake | 37 | ||||
-rw-r--r-- | 3rdparty/cmake/FindPCRE.cmake | 36 | ||||
-rw-r--r-- | 3rdparty/cmake/tests/HAVE_MONOTONIC_CLOCK.c | 8 | ||||
-rw-r--r-- | 3rdparty/libconfig/CMakeLists.txt | 29 | ||||
-rw-r--r-- | 3rdparty/msinttypes/CMakeLists.txt | 9 | ||||
-rw-r--r-- | 3rdparty/mt19937ar/CMakeLists.txt | 16 | ||||
-rw-r--r-- | 3rdparty/mysql/CMakeLists.txt | 68 | ||||
-rw-r--r-- | 3rdparty/pcre/CMakeLists.txt | 65 | ||||
-rw-r--r-- | 3rdparty/zlib/CMakeLists.txt | 64 | ||||
-rw-r--r-- | CMakeLists.txt | 594 | ||||
-rw-r--r-- | Makefile.in | 35 | ||||
-rw-r--r-- | README.txt | 175 | ||||
-rw-r--r-- | src/CMakeLists.txt | 20 | ||||
-rw-r--r-- | src/char/CMakeLists.txt | 62 | ||||
-rw-r--r-- | src/common/CMakeLists.txt | 166 | ||||
-rw-r--r-- | src/login/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/login/sql/CMakeLists.txt | 39 | ||||
-rw-r--r-- | src/map/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/map/sql/CMakeLists.txt | 118 | ||||
-rw-r--r-- | src/plugins/CMakeLists.txt | 36 | ||||
-rw-r--r-- | src/tool/CMakeLists.txt | 45 | ||||
-rwxr-xr-x | start | 35 | ||||
-rwxr-xr-x | tools/item_db.pl | 116 |
25 files changed, 0 insertions, 1899 deletions
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt deleted file mode 100644 index 3b60b68dc..000000000 --- a/3rdparty/CMakeLists.txt +++ /dev/null @@ -1,55 +0,0 @@ - -# macro to configure the use of local or system version of a package -# Uses: -# HAVE_LOCAL_${name} - is local version available? -# ${name}_LOCAL_LIBRARIES - libraries of the local version -# ${name}_LOCAL_INCLUDE_DIRS - include directories of the local version -# HAVE_SYSTEM_${name} - is system version available? -# ${name}_SYSTEM_LIBRARIES - libraries of the system version -# ${name}_SYSTEM_INCLUDE_DIRS - include directories of the system version -# Generates: -# WITH_LOCAL_${name} - use the local version of the package (only when local is available) -# WITH_${name} - use this package -# ${name}_LIBRARIES - libraries -# ${name}_INCLUDE_DIRS - include directories -macro( CONFIGURE_WITH_LOCAL_OR_SYSTEM name ) - unset( ${name}_LIBRARIES CACHE ) - unset( ${name}_INCLUDE_DIRS CACHE ) - if( HAVE_LOCAL_${name} ) - set( WITH_LOCAL_${name} ON - CACHE BOOL "use local version of ${name}" ) - else() - unset( WITH_LOCAL_${name} CACHE ) - endif() - if( WITH_LOCAL_${name} ) - message( STATUS "Configuring for local ${name}" ) - set( ${name}_LIBRARIES ${${name}_LOCAL_LIBRARIES} ) - set( ${name}_INCLUDE_DIRS ${${name}_LOCAL_INCLUDE_DIRS} ) - message( STATUS "Configuring for local ${name} - done" ) - elseif( HAVE_SYSTEM_${name} ) - message( STATUS "Configuring for system ${name}" ) - set( ${name}_LIBRARIES ${${name}_SYSTEM_LIBRARIES} ) - set( ${name}_INCLUDE_DIRS ${${name}_SYSTEM_INCLUDE_DIRS} ) - message( STATUS "Configuring for system ${name} - done" ) - endif() - if( WITH_LOCAL_${name} OR HAVE_SYSTEM_${name} ) - set( WITH_${name} ON - CACHE BOOL "use ${name}" ) - else() - unset( WITH_${name} CACHE ) - endif() - set( ${name}_LIBRARIES ${${name}_LIBRARIES} - CACHE PATH "${name} libraries" ) - set( ${name}_INCLUDE_DIRS ${${name}_INCLUDE_DIRS} - CACHE PATH "${name} include directories" ) - mark_as_advanced( ${name}_LIBRARIES ) - mark_as_advanced( ${name}_INCLUDE_DIRS ) -endmacro( CONFIGURE_WITH_LOCAL_OR_SYSTEM ) - - -add_subdirectory( libconfig ) -add_subdirectory( msinttypes ) -add_subdirectory( mt19937ar ) -add_subdirectory( mysql ) -add_subdirectory( pcre ) -add_subdirectory( zlib ) diff --git a/3rdparty/cmake/FindFunctionLibrary.cmake b/3rdparty/cmake/FindFunctionLibrary.cmake deleted file mode 100644 index f1d32001e..000000000 --- a/3rdparty/cmake/FindFunctionLibrary.cmake +++ /dev/null @@ -1,47 +0,0 @@ -# - Check which library is needed to link a C function -# find_function_library( <function> <variable> [<library> ...] ) -# -# Check which library provides the <function>. -# Sets <variable> to 0 if found in the global libraries. -# Sets <variable> to the library path if found in the provided libraries. -# Raises a FATAL_ERROR if not found. -# -# The following variables may be set before calling this macro to -# modify the way the check is run: -# -# CMAKE_REQUIRED_FLAGS = string of compile command line flags -# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) -# CMAKE_REQUIRED_INCLUDES = list of include directories -# CMAKE_REQUIRED_LIBRARIES = list of libraries to link -include( CheckFunctionExists ) - -macro( find_function_library FUNC VAR ) - if( "${VAR}" MATCHES "^${VAR}$" ) - CHECK_FUNCTION_EXISTS( ${FUNC} ${VAR} ) - if( ${VAR} ) - message( STATUS "Found ${FUNC} in global libraries" ) - set( ${VAR} 0 CACHE INTERNAL "Found ${FUNC} in global libraries" )# global - else() - foreach( LIB IN ITEMS ${ARGN} ) - message( STATUS "Looking for ${FUNC} in ${LIB}" ) - find_library( ${LIB}_LIBRARY ${LIB} ) - mark_as_advanced( ${LIB}_LIBRARY ) - if( ${LIB}_LIBRARY ) - unset( ${VAR} CACHE ) - set( CMAKE_REQUIRED_LIBRARIES ${${LIB}_LIBRARY} ) - CHECK_FUNCTION_EXISTS( ${FUNC} ${VAR} ) - set( CMAKE_REQUIRED_LIBRARIES ) - if( ${VAR} ) - message( STATUS "Found ${FUNC} in ${LIB}: ${${LIB}_LIBRARY}" ) - set( ${VAR} ${${LIB}_LIBRARY} CACHE INTERNAL "Found ${FUNC} in ${LIB}" )# lib - break() - endif() - endif() - endforeach() - if( NOT ${VAR} ) - message( FATAL_ERROR "Function ${FUNC} not found" ) - endif() - endif() - endif() -endmacro( find_function_library ) - diff --git a/3rdparty/cmake/FindMYSQL.cmake b/3rdparty/cmake/FindMYSQL.cmake deleted file mode 100644 index 9da72073a..000000000 --- a/3rdparty/cmake/FindMYSQL.cmake +++ /dev/null @@ -1,37 +0,0 @@ -# - Find libmysql/mysqlclient -# Find the native MySQL includes and library -# -# MYSQL_INCLUDE_DIRS - where to find mysql.h, etc. -# MYSQL_LIBRARIES - mysqlclient library. -# MYSQL_FOUND - True if mysqlclient is found. -# - -find_path( MYSQL_INCLUDE_DIRS "mysql.h" - PATHS - "/usr/include/mysql" - "/usr/local/include/mysql" - "/usr/mysql/include/mysql" - "$ENV{PROGRAMFILES}/MySQL/*/include" - "$ENV{SYSTEMDRIVE}/MySQL/*/include" ) - -find_library( MYSQL_LIBRARIES - NAMES "libmysql" "mysqlclient" "mysqlclient_r" - PATHS - "/usr/lib/mysql" - "/usr/local/lib/mysql" - "/usr/mysql/lib/mysql" - "$ENV{PROGRAMFILES}/MySQL/*/lib" - "$ENV{SYSTEMDRIVE}/MySQL/*/lib" ) -mark_as_advanced( MYSQL_LIBRARIES MYSQL_INCLUDE_DIRS ) - -if( MYSQL_INCLUDE_DIRS AND EXISTS "${MYSQL_INCLUDE_DIRS}/mysql_version.h" ) - file( STRINGS "${MYSQL_INCLUDE_DIRS}/mysql_version.h" MYSQL_VERSION_H REGEX "^#define[ \t]+MYSQL_SERVER_VERSION[ \t]+\"[^\"]+\".*$" ) - string( REGEX REPLACE "^.*MYSQL_SERVER_VERSION[ \t]+\"([^\"]+)\".*$" "\\1" MYSQL_VERSION_STRING "${MYSQL_VERSION_H}" ) -endif() - -# handle the QUIETLY and REQUIRED arguments and set MYSQL_FOUND to TRUE if -# all listed variables are TRUE -include( FindPackageHandleStandardArgs ) -FIND_PACKAGE_HANDLE_STANDARD_ARGS( MYSQL - REQUIRED_VARS MYSQL_LIBRARIES MYSQL_INCLUDE_DIRS - VERSION_VAR MYSQL_VERSION_STRING ) diff --git a/3rdparty/cmake/FindPCRE.cmake b/3rdparty/cmake/FindPCRE.cmake deleted file mode 100644 index 2215451d1..000000000 --- a/3rdparty/cmake/FindPCRE.cmake +++ /dev/null @@ -1,36 +0,0 @@ -# - Find pcre -# Find the native PCRE includes and library -# -# PCRE_INCLUDE_DIRS - where to find pcre.h -# PCRE_LIBRARIES - List of libraries when using pcre. -# PCRE_FOUND - True if pcre found. - - -find_path( PCRE_INCLUDE_DIR pcre.h - PATHS - "/usr/include/pcre" ) -set( PCRE_NAMES pcre ) -find_library( PCRE_LIBRARY NAMES ${PCRE_NAMES} ) -mark_as_advanced( PCRE_LIBRARY PCRE_INCLUDE_DIR ) - -if( PCRE_INCLUDE_DIR AND EXISTS "${PCRE_INCLUDE_DIR}/pcre.h" ) - file( STRINGS "${PCRE_INCLUDE_DIR}/pcre.h" PCRE_H REGEX "^#define[ \t]+PCRE_M[A-Z]+[ \t]+[0-9]+.*$" ) - string( REGEX REPLACE "^.*PCRE_MAJOR[ \t]+([0-9]+).*$" "\\1" PCRE_MAJOR "${PCRE_H}" ) - string( REGEX REPLACE "^.*PCRE_MINOR[ \t]+([0-9]+).*$" "\\1" PCRE_MINOR "${PCRE_H}" ) - - set( PCRE_VERSION_STRING "${PCRE_MAJOR}.${PCRE_MINOR}" ) - set( PCRE_VERSION_MAJOR "${PCRE_MAJOR}" ) - set( PCRE_VERSION_MINOR "${PCRE_MINOR}" ) -endif() - -# handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if -# all listed variables are TRUE -include( FindPackageHandleStandardArgs ) -FIND_PACKAGE_HANDLE_STANDARD_ARGS( PCRE - REQUIRED_VARS PCRE_LIBRARY PCRE_INCLUDE_DIR - VERSION_VAR PCRE_VERSION_STRING ) - -if( PCRE_FOUND ) - set( PCRE_LIBRARIES ${PCRE_LIBRARY} ) - set( PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR} ) -endif() diff --git a/3rdparty/cmake/tests/HAVE_MONOTONIC_CLOCK.c b/3rdparty/cmake/tests/HAVE_MONOTONIC_CLOCK.c deleted file mode 100644 index ad460a1af..000000000 --- a/3rdparty/cmake/tests/HAVE_MONOTONIC_CLOCK.c +++ /dev/null @@ -1,8 +0,0 @@ -#include <sys/time.h> -#include <time.h> -#include <unistd.h> -int main(int argc, char** argv) -{ - struct timespec tval; - return clock_gettime(CLOCK_MONOTONIC, &tval); -} diff --git a/3rdparty/libconfig/CMakeLists.txt b/3rdparty/libconfig/CMakeLists.txt deleted file mode 100644 index a99441249..000000000 --- a/3rdparty/libconfig/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ - -find_path( LIBCONFIG_INCLUDE_DIRS "libconfig.h" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}" - NO_DEFAULT_PATH ) -find_path( LIBCONFIG_SOURCE_DIR "libconfig.c" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}" - NO_DEFAULT_PATH ) -mark_as_advanced( LIBCONFIG_INCLUDE_DIRS ) -mark_as_advanced( LIBCONFIG_SOURCE_DIR ) - -set( LIBCONFIG_HEADERS - "${CMAKE_CURRENT_SOURCE_DIR}/grammar.h" - "${CMAKE_CURRENT_SOURCE_DIR}/libconfig.h" - "${CMAKE_CURRENT_SOURCE_DIR}/parsectx.h" - "${CMAKE_CURRENT_SOURCE_DIR}/scanctx.h" - "${CMAKE_CURRENT_SOURCE_DIR}/scanner.h" - "${CMAKE_CURRENT_SOURCE_DIR}/strbuf.h" - "${CMAKE_CURRENT_SOURCE_DIR}/wincompat.h" - CACHE INTERNAL "libconfig headers" ) -set( LIBCONFIG_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/grammar.c" - "${CMAKE_CURRENT_SOURCE_DIR}/libconfig.c" - "${CMAKE_CURRENT_SOURCE_DIR}/scanctx.c" - "${CMAKE_CURRENT_SOURCE_DIR}/scanner.c" - "${CMAKE_CURRENT_SOURCE_DIR}/strbuf.c" - CACHE INTERNAL "libconfig sources" ) -set( LIBCONFIG_DEFINITIONS - "-DLIBCONFIG_STATIC" - CACHE INTERNAL "libconfig definitions" ) diff --git a/3rdparty/msinttypes/CMakeLists.txt b/3rdparty/msinttypes/CMakeLists.txt deleted file mode 100644 index c11c1d72a..000000000 --- a/3rdparty/msinttypes/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ - -if( MSVC ) -find_path( MSINTTYPES_INCLUDE_DIRS "inttypes.h" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}/include" - NO_DEFAULT_PATH ) -mark_as_advanced( MSINTTYPES_INCLUDE_DIRS ) -message( STATUS "Adding global include directory: ${MSINTTYPES_INCLUDE_DIRS}" ) -set_property( CACHE GLOBAL_INCLUDE_DIRS PROPERTY VALUE ${GLOBAL_INCLUDE_DIRS} ${MSINTTYPES_INCLUDE_DIRS} ) -endif() diff --git a/3rdparty/mt19937ar/CMakeLists.txt b/3rdparty/mt19937ar/CMakeLists.txt deleted file mode 100644 index 08eff5790..000000000 --- a/3rdparty/mt19937ar/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ - -find_path( MT19937AR_INCLUDE_DIRS "mt19937ar.h" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}" - NO_DEFAULT_PATH ) -find_path( MT19937AR_SOURCE_DIR "mt19937ar.c" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}" - NO_DEFAULT_PATH ) -mark_as_advanced( MT19937AR_INCLUDE_DIRS ) -mark_as_advanced( MT19937AR_SOURCE_DIR ) - -set( MT19937AR_HEADERS - "${CMAKE_CURRENT_SOURCE_DIR}/mt19937ar.h" - CACHE INTERNAL "mt19937ar headers" ) -set( MT19937AR_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/mt19937ar.c" - CACHE INTERNAL "mt19937ar sources" ) diff --git a/3rdparty/mysql/CMakeLists.txt b/3rdparty/mysql/CMakeLists.txt deleted file mode 100644 index e85fd626d..000000000 --- a/3rdparty/mysql/CMakeLists.txt +++ /dev/null @@ -1,68 +0,0 @@ - -# -# local copy -# -if( WIN32 ) -message( STATUS "Detecting local MYSQL" ) -find_path( MYSQL_LOCAL_INCLUDE_DIRS "mysql.h" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}/include" - NO_DEFAULT_PATH ) -find_library( MYSQL_LOCAL_LIBRARIES - NAMES libmysql - PATHS "${CMAKE_CURRENT_SOURCE_DIR}/lib" - NO_DEFAULT_PATH ) -mark_as_advanced( MYSQL_LOCAL_LIBRARIES ) -mark_as_advanced( MYSQL_LOCAL_INCLUDE_DIRS ) - -if( MYSQL_LOCAL_LIBRARIES AND MYSQL_LOCAL_INCLUDE_DIRS ) - if( EXISTS "${MYSQL_LOCAL_INCLUDE_DIRS}/mysql_version.h" ) - file( STRINGS "${MYSQL_LOCAL_INCLUDE_DIRS}/mysql_version.h" MYSQL_VERSION_H REGEX "^#define MYSQL_SERVER_VERSION[ \t]+\"[^\"]+\".*$" ) - string( REGEX REPLACE "^.*MYSQL_SERVER_VERSION[ \t]+\"([^\"]+)\".*$" "\\1" MYSQL_SERVER_VERSION "${MYSQL_VERSION_H}" ) - message( STATUS "Found MYSQL: ${MYSQL_LOCAL_LIBRARIES} (found version ${MYSQL_SERVER_VERSION})" ) - else() - message( STATUS "Found MYSQL: ${MYSQL_LOCAL_LIBRARIES}" ) - endif() - set( HAVE_LOCAL_MYSQL ON - CACHE BOOL "mysql client is available as a local copy") - mark_as_advanced( HAVE_LOCAL_MYSQL ) -else() - foreach( _VAR MYSQL_LOCAL_LIBRARIES MYSQL_LOCAL_INCLUDE_DIRS ) - if( NOT "${_VAR}" ) - set( MISSING_VARS ${MISSING_VARS} ${_VAR} ) - endif() - endforeach() - message( STATUS "Could NOT find MYSQL (missing: ${MISSING_VARS})" ) - unset( HAVE_LOCAL_MYSQL CACHE ) -endif() -message( STATUS "Detecting local MYSQL - done" ) -endif( WIN32 ) - - -# -# system -# -message( STATUS "Detecting system MYSQL" ) -unset( MYSQL_LIBRARIES CACHE ) -unset( MYSQL_INCLUDE_DIRS CACHE ) -find_package( MYSQL ) -set( MYSQL_SYSTEM_LIBRARIES "${MYSQL_LIBRARIES}" - CACHE PATH "system mysql libraries" ) -set( MYSQL_SYSTEM_INCLUDE_DIRS "${MYSQL_INCLUDE_DIRS}" - CACHE PATH "system mysql include directories" ) -mark_as_advanced( MYSQL_SYSTEM_LIBRARIES ) -mark_as_advanced( MYSQL_SYSTEM_INCLUDE_DIRS ) - -if( MYSQL_SYSTEM_LIBRARIES AND MYSQL_SYSTEM_INCLUDE_DIRS ) - set( HAVE_SYSTEM_MYSQL ON - CACHE BOOL "mysql client is available on the system" ) - mark_as_advanced( HAVE_SYSTEM_MYSQL ) -else() - unset( HAVE_SYSTEM_MYSQL CACHE ) -endif() -message( STATUS "Detecting system MYSQL - done" ) - - -# -# configure -# -CONFIGURE_WITH_LOCAL_OR_SYSTEM( MYSQL ) diff --git a/3rdparty/pcre/CMakeLists.txt b/3rdparty/pcre/CMakeLists.txt deleted file mode 100644 index 57465a46c..000000000 --- a/3rdparty/pcre/CMakeLists.txt +++ /dev/null @@ -1,65 +0,0 @@ - -# -# local copy -# -if( WIN32 ) -message( STATUS "Detecting local PCRE" ) -find_path( PCRE_LOCAL_INCLUDE_DIRS "pcre.h" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}/include" - NO_DEFAULT_PATH ) -find_library( PCRE_LOCAL_LIBRARIES - NAMES pcre - PATHS "${CMAKE_CURRENT_SOURCE_DIR}/lib" - NO_DEFAULT_PATH ) -mark_as_advanced( PCRE_LOCAL_LIBRARIES ) -mark_as_advanced( PCRE_LOCAL_INCLUDE_DIRS ) - -if( PCRE_LOCAL_LIBRARIES AND PCRE_LOCAL_INCLUDE_DIRS ) - file( STRINGS "${PCRE_LOCAL_INCLUDE_DIRS}/pcre.h" PCRE_H REGEX "^#define[ \t]+PCRE_M[A-Z]+[ \t]+[0-9]+.*$" ) - string( REGEX REPLACE "^.*PCRE_MAJOR[ \t]+([0-9]+).*$" "\\1" PCRE_MAJOR "${PCRE_H}" ) - string( REGEX REPLACE "^.*PCRE_MINOR[ \t]+([0-9]+).*$" "\\1" PCRE_MINOR "${PCRE_H}" ) - message( STATUS "Found PCRE: ${PCRE_LOCAL_LIBRARIES} (found version ${PCRE_MAJOR}.${PCRE_MINOR})" ) - set( HAVE_LOCAL_PCRE ON - CACHE BOOL "pcre is available as a local copy" ) - mark_as_advanced( HAVE_LOCAL_PCRE ) -else() - foreach( _VAR PCRE_LOCAL_LIBRARIES PCRE_LOCAL_INCLUDE_DIRS ) - if( NOT "${_VAR}" ) - set( MISSING_VARS ${MISSING_VARS} ${_VAR} ) - endif() - endforeach() - message( STATUS "Could NOT find PCRE (missing: ${MISSING_VARS})" ) - unset( HAVE_LOCAL_PCRE CACHE ) -endif() -message( STATUS "Detecting local PCRE - done" ) -endif( WIN32 ) - - -# -# system -# -message( STATUS "Detecting system PCRE" ) -unset( PCRE_LIBRARIES CACHE ) -unset( PCRE_INCLUDE_DIRS CACHE ) -find_package( PCRE ) -set( PCRE_SYSTEM_LIBRARIES ${PCRE_LIBRARIES} - CACHE PATH "system pcre libraries" ) -set( PCRE_SYSTEM_INCLUDE_DIRS ${PCRE_INCLUDE_DIRS} - CACHE PATH "system pcre include directories" ) -mark_as_advanced( PCRE_SYSTEM_LIBRARIES ) -mark_as_advanced( PCRE_SYSTEM_INCLUDE_DIRS ) - -if( PCRE_SYSTEM_LIBRARIES AND PCRE_SYSTEM_INCLUDE_DIRS ) - set( HAVE_SYSTEM_PCRE ON - CACHE BOOL "pcre is available on the system" ) - mark_as_advanced( HAVE_SYSTEM_PCRE ) -else() - unset( HAVE_SYSTEM_PCRE CACHE ) -endif() -message( STATUS "Detecting system PCRE - done" ) - - -# -# configure -# -CONFIGURE_WITH_LOCAL_OR_SYSTEM( PCRE ) diff --git a/3rdparty/zlib/CMakeLists.txt b/3rdparty/zlib/CMakeLists.txt deleted file mode 100644 index 4002908f5..000000000 --- a/3rdparty/zlib/CMakeLists.txt +++ /dev/null @@ -1,64 +0,0 @@ - -# -# local copy -# -if( WIN32 ) -message( STATUS "Detecting local ZLIB" ) -find_path( ZLIB_LOCAL_INCLUDE_DIRS "zlib.h" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}/include" - NO_DEFAULT_PATH ) -find_library( ZLIB_LOCAL_LIBRARIES - NAMES zdll - PATHS "${CMAKE_CURRENT_SOURCE_DIR}/lib" - NO_DEFAULT_PATH ) -mark_as_advanced( ZLIB_LOCAL_LIBRARIES ) -mark_as_advanced( ZLIB_LOCAL_INCLUDE_DIRS ) - -if( ZLIB_LOCAL_LIBRARIES AND ZLIB_LOCAL_INCLUDE_DIRS ) - file( STRINGS "${ZLIB_LOCAL_INCLUDE_DIRS}/zlib.h" ZLIB_H REGEX "^#define[ \t]+ZLIB_VERSION[ \t]+\"[^\"]+\".*$" ) - string( REGEX REPLACE "^.*ZLIB_VERSION[ \t]+\"([^\"]+)\".*$" "\\1" ZLIB_VERSION "${ZLIB_H}" ) - message( STATUS "Found local ZLIB: ${ZLIB_LOCAL_LIBRARIES} (found version ${ZLIB_VERSION})" ) - set( HAVE_LOCAL_ZLIB ON - CACHE BOOL "zlib is available as a local copy" ) - mark_as_advanced( HAVE_LOCAL_ZLIB ) -else() - foreach( _VAR ZLIB_LOCAL_LIBRARIES ZLIB_LOCAL_INCLUDE_DIRS ) - if( NOT "${_VAR}" ) - set( MISSING_VARS ${MISSING_VARS} ${_VAR} ) - endif() - endforeach() - message( STATUS "Could NOT find local ZLIB (missing: ${MISSING_VARS})" ) - unset( HAVE_LOCAL_ZLIB CACHE ) -endif() -message( STATUS "Detecting local ZLIB - done" ) -endif( WIN32 ) - - -# -# system -# -message( STATUS "Detecting system ZLIB" ) -unset( ZLIB_LIBRARIES CACHE ) -unset( ZLIB_INCLUDE_DIRS CACHE ) -find_package( ZLIB ) -set( ZLIB_SYSTEM_LIBRARIES ${ZLIB_LIBRARIES} - CACHE PATH "system zlib libraries" ) -set( ZLIB_SYSTEM_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} - CACHE PATH "system zlib include directories" ) -mark_as_advanced( ZLIB_SYSTEM_LIBRARIES ) -mark_as_advanced( ZLIB_SYSTEM_INCLUDE_DIRS ) - -if( ZLIB_SYSTEM_LIBRARIES AND ZLIB_SYSTEM_INCLUDE_DIRS ) - set( HAVE_SYSTEM_ZLIB ON - CACHE BOOL "zlib is available on the system" ) - mark_as_advanced( HAVE_SYSTEM_ZLIB ) -else() - unset( HAVE_SYSTEM_ZLIB CACHE ) -endif() -message( STATUS "Detecting system ZLIB - done" ) - - -# -# configure -# -CONFIGURE_WITH_LOCAL_OR_SYSTEM( ZLIB ) diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 883920817..000000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,594 +0,0 @@ -##################################################################### -# -# "Getting Started with CMake", a tutorial video by Eric Wing. -# Part 1 of 6: http://www.youtube.com/watch?v=CLvZTyji_Uw -# Part 2 of 6: http://www.youtube.com/watch?v=gUW-RrRQjEg -# Part 3 of 6: http://www.youtube.com/watch?v=sz6cPhbuTk4 -# Part 4 of 6: http://www.youtube.com/watch?v=JICZOkyNXbg -# Part 5 of 6: http://www.youtube.com/watch?v=lAiuLHy4dCk -# Part 6 of 6: http://www.youtube.com/watch?v=fAtJNzDZdH8 -# -# You can use notepad++ for syntax highlighting. -# Naming conventions: -# WITH_* : option to use an external package or not -# ENABLE_* : option to use an internal feature/code or not -# HAVE_* : internal variable indicating if we have and are using something -# -# Maintainer: Fl�vio J. Saraiva (feel free to send complaints or suggestions) -# flaviojs @ rAthena forum/irc -# flaviojs2005 \A-T/ gmail <D.o,T> com -# -##################################################################### - - -#cmake_minimum_required( VERSION 2.8.4 ) -# Functional changes from 2.8.3 to 2.8.4: -# string(SUBSTRING) works with length -1 as "rest of string" -# changes to some CPack generators -# CYGWIN no longer defines WIN32 -# CMP0017: Prefer files from the CMake module directory when including from there. -set( CMAKE_LEGACY_CYGWIN_WIN32 0 ) -cmake_minimum_required( VERSION 2.8.3 ) -project( rAthena C ) -if( CYGWIN ) - unset( WIN32 ) -endif() - - -# -# Prevent building in the source directory by default -# -if( ALLOW_SAME_DIRECTORY ) -elseif( "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}" ) - option( ALLOW_SAME_DIRECTORY "Allow CMake to build in the source directory." OFF ) - message( FATAL_ERROR - "Do not use the source directory to build your files, instead delete CMakeCache.txt, create a separate folder and build there.\n" - "Example: (build in subdir 'build' and install to source dir)\n" - " rm -f CMakeCache.txt\n" - " mkdir build\n" - " cd build\n" - " cmake -G\"Unix Makefiles\" -DINSTALL_TO_SOURCE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\n" - " make install\n" - " cd ..\n" - " rm -rf build\n" - "To skip this check, set ALLOW_SAME_DIRECTORY to ON (-DALLOW_SAME_DIRECTORY=ON)" ) -endif() - - -# -# Global stuff -# -set( GLOBAL_LIBRARIES ${LINK_LIBRARIES} CACHE INTERNAL "" )# list (comma separated values) -set( GLOBAL_INCLUDE_DIRS ${INCLUDE_DIRECTORIES} CACHE INTERNAL "" )# list (comma separated values) -set( GLOBAL_DEFINITIONS ${COMPILE_DEFINITIONS} CACHE INTERNAL "" )# string (space separated values -DFOO=bar) -mark_as_advanced( GLOBAL_LIBRARIES GLOBAL_INCLUDE_DIRS GLOBAL_DEFINITIONS ) -if( WIN32 ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DFD_SETSIZE=4096" ) -endif() -if( MSVC ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} "oldnames.lib" "ws2_32.lib" ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE" ) -endif() - - -# -# 3rd party -# -set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/cmake CACHE INTERNAL "" ) -include( CheckCSourceCompiles ) -include( CheckCSourceRuns ) -include( CheckIncludeFile ) -include( CheckFunctionExists ) -include( FindFunctionLibrary ) -include( TestBigEndian ) - - -# -# Find svnversion -# -message( STATUS "Detecting svnversion" ) -find_program( SVNVERSION_EXECUTABLE svnversion ) -mark_as_advanced( SVNVERSION_EXECUTABLE ) -if( SVNVERSION_EXECUTABLE ) - message( STATUS "Found svnversion: ${SVNVERSION_EXECUTABLE}" ) -endif() -message( STATUS "Detecting svnversion - done" ) - - -# -# Find Subversion -# -message( STATUS "Detecting Subversion" ) -find_package( Subversion ) -message( STATUS "Detecting Subversion - done" ) - -# -# PACKETVER -# -set( PACKETVER CACHE STRING "Sets the PACKETVER define of the servers. (see src/common/mmo.h)" ) -if( PACKETVER ) - list( APPEND GLOBAL_DEFINITIONS PACKETVER=${PACKETVER} ) -endif() - - -# -# SVNVERSION -# -if( SVNVERSION_EXECUTABLE ) - message( STATUS "Getting svn version" ) - execute_process( COMMAND ${SVNVERSION_EXECUTABLE} ${PROJECT_SOURCE_DIR} - OUTPUT_VARIABLE SVNVERSION - OUTPUT_STRIP_TRAILING_WHITESPACE ) - if( SVNVERSION MATCHES "^Unversioned" ) - set( SVNVERSION ) - endif() - string( REGEX REPLACE "[^1234567890MSexported]" "_" SVNVERSION "${SVNVERSION}" ) - message( STATUS "Found version: ${SVNVERSION}" ) - message( STATUS "Getting svn version - done" ) -endif() -if( Subversion_FOUND AND SVNVERSION ) - message( STATUS "Getting svn branch" ) - Subversion_WC_INFO( ${PROJECT_SOURCE_DIR} rAthena ) - if( rAthena_WC_URL ) - string( REGEX MATCH "[^/]+$" BRANCH ${rAthena_WC_URL} ) - set( SVNVERSION "${BRANCH}-${SVNVERSION}" ) - message( STATUS "Found branch: ${BRANCH}" ) - endif() - message( STATUS "Getting svn branch - done" ) -endif() - - -# -# threads -# -message( STATUS "Detecting threads library" ) -set( CMAKE_THREAD_PREFER_PTHREAD 1 ) -find_package(Threads REQUIRED) -if( CMAKE_THREAD_LIBS_INIT ) - message( STATUS "Adding global library: ${FUNCTION_FLOOR_LIBRARIES}" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ) -endif() -message( STATUS "Detecting threads library - done" ) - - -# -# math library (FreeBSD/Linux/Solaris) -# -message( STATUS "Detecting math library (m)" ) -CHECK_INCLUDE_FILE( math.h HAVE_MATH_H ) -if( NOT HAVE_MATH_H ) - message( FATAL_ERROR "math.h not found" ) -endif() -set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} ) -find_function_library( floor FUNCTION_FLOOR_LIBRARIES m ) -if( FUNCTION_FLOOR_LIBRARIES ) - message( STATUS "Adding global library: ${FUNCTION_FLOOR_LIBRARIES}" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${FUNCTION_FLOOR_LIBRARIES} ) -endif() -message( STATUS "Detecting math library (m) - done" ) - - -# -# dynamic loading library (Linux) -# -if( NOT WIN32 ) -message( STATUS "Detecting dynamic loading library (dl)" ) -set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} ) -find_function_library( dlopen FUNCTION_DLOPEN_LIBRARIES dl ) -if( FUNCTION_DLOPEN_LIBRARIES ) - message( STATUS "Adding global library: ${FUNCTION_DLOPEN_LIBRARIES}" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${FUNCTION_DLOPEN_LIBRARIES} ) -endif() -message( STATUS "Detecting dynamic loading library (dl) - done" ) -endif() - - -# -# networking library (Solaris/MinGW) -# -if( NOT MSVC ) -message( STATUS "Detecting networking library (socket/nsl/ws2_32)" ) -set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} ) -find_function_library( bind FUNCTION_BIND_LIBRARIES socket ws2_32 ) -if( FUNCTION_BIND_LIBRARIES ) - message( STATUS "Adding global library: ${FUNCTION_BIND_LIBRARIES}" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${FUNCTION_BIND_LIBRARIES} ) -endif() -set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} ) -find_function_library( gethostbyname FUNCTION_GETHOSTBYNAME_LIBRARIES nsl ) -if( FUNCTION_GETHOSTBYNAME_LIBRARIES ) - message( STATUS "Adding global library: ${FUNCTION_GETHOSTBYNAME_LIBRARIES}" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${FUNCTION_GETHOSTBYNAME_LIBRARIES} ) -endif() -message( STATUS "Detecting networking library (socket/nsl/ws2_32) - done" ) -endif() - - -# -# Test for big endian -# -TEST_BIG_ENDIAN( BIG_ENDIAN ) -if( NOT DEFINED BIG_ENDIAN ) - message( WARNING "unable to determine endianess, only LITTLE ENDIAN is supported" ) -elseif( BIG_ENDIAN ) - message( FATAL_ERROR "bigendian is not supported" ) -endif() - - -# -# Test monotonic clock -# -# CLOCK_MONOTONIC clock for clock_gettime -# Normally defines _POSIX_TIMERS > 0 and _POSIX_MONOTONIC_CLOCK (for posix -# compliant systems) and __FreeBSD_cc_version >= 500005 (for FreeBSD -# >= 5.1.0, which does not have the posix defines (ref. r11983)) would be -# checked but some systems define them even when they do not support it -# (ref. bugreport:1003). -# -message( STATUS "Check for monotonic clock" ) -find_library( RT_LIBRARY rt )# (optional, rt on Debian) -mark_as_advanced( RT_LIBRARY ) -set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} ${RT_LIBRARY} ) -file( READ "${CMAKE_SOURCE_DIR}/3rdparty/cmake/tests/HAVE_MONOTONIC_CLOCK.c" _SOURCE ) -CHECK_C_SOURCE_RUNS( "${_SOURCE}" HAVE_MONOTONIC_CLOCK ) -if( HAVE_MONOTONIC_CLOCK ) - message( STATUS "Check for monotonic clock - yes" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${RT_LIBRARY} ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DHAVE_MONOTONIC_CLOCK" ) -else() - message( STATUS "Check for monotonic clock - no" ) -endif() - - -# -# Test if function exists: -# setrlimit - used to set the socket limit -# strnlen - string length with upper scan bound -# getpid - process id -# gettid - thread id -# -CHECK_FUNCTION_EXISTS( setrlimit HAVE_SETRLIMIT ) -CHECK_FUNCTION_EXISTS( strnlen HAVE_STRNLEN ) -CHECK_FUNCTION_EXISTS( getpid HAVE_GETPID ) -CHECK_FUNCTION_EXISTS( gettid HAVE_GETTID ) -foreach( define HAVE_SETRLIMIT HAVE_STRNLEN HAVE_GETPID HAVE_GETTID ) - if( ${define} ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -D${define}" ) - endif() -endforeach() - - -# -# Use RDTSC instruction as a timing source (time stamp counter on x86 since Pentium) (default=OFF) -# -# Enable it when you've timing issues. (ex: in conjunction with XEN or Other Virtualization mechanisms) -# Please ensure that you've disabled dynamic CPU-Frequencys, such as power saving options. -# (On the most modern Dedicated Servers cpufreq is preconfigured, see your distribution's manual how to disable it) -# -option( ENABLE_RDTSC "use RDTSC instruction as a timing source (default=OFF)" OFF ) -if( ENABLE_RDTSC ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DENABLE_RDTSC" ) - message( STATUS "Enabled RDTSC as a timing source" ) -endif() - - -# -# Enable extra debug code (default=OFF) -# -option( ENABLE_EXTRA_DEBUG_CODE "enable extra debug code (default=OFF)" OFF ) -if( ENABLE_EXTRA_DEBUG_CODE ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DDEBUG" ) - message( STATUS "Enabled extra DEBUG code" ) -endif() - - -# -# Enable builtin memory manager (default=default) -# -set( MEMMGR_OPTIONS "default;yes;no" ) -set( ENABLE_MEMMGR "default" CACHE STRING "enable builtin memory manager: ${MEMMGR_OPTIONS} (default=default)" ) -set_property( CACHE ENABLE_MEMMGR PROPERTY STRINGS ${MEMMGR_OPTIONS} ) -if( ENABLE_MEMMGR STREQUAL "default" ) - # use source code default -elseif( ENABLE_MEMMGR STREQUAL "yes" ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DUSE_MEMMGR" ) - message( STATUS "Enabled the builtin memory manager" ) -elseif( ENABLE_MEMMGR STREQUAL "no" ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DNO_MEMMGR" ) - message( STATUS "Disabled the builtin memory manager" ) -else() - message( FATAL_ERROR "invalid option ENABLE_MEMMGR=${ENABLE_MEMMGR} (valid options: ${MEMMGR_OPTIONS})" ) -endif() - - -# -# Enable memory library (default=system) -# -set( MEMORY_OPTIONS "system;memwatch;dmalloc;gcollect" ) -set( ENABLE_MEMORY "system" CACHE STRING "enable memory library: ${MEMORY_OPTIONS} (default=system)" ) -set_property( CACHE ENABLE_MEMORY PROPERTY STRINGS ${MEMORY_OPTIONS} ) -if( ENABLE_MEMORY STREQUAL "system" ) - # use system functions - -elseif( ENABLE_MEMORY STREQUAL "memwatch" ) - CHECK_INCLUDE_FILE( memwatch.h HAVE_MEMWATCH_H ) - find_library( MEMWATCH_LIBRARY memwatch ) - mark_as_advanced( MEMWATCH_LIBRARY ) - if( HAVE_MEMWATCH_H AND MEMWATCH_LIBRARY ) - message( STATUS "Adding global library: ${MEMWATCH_LIBRARY}" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${MEMWATCH_LIBRARY} ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DMEMWATCH" ) - message( STATUS "Enabled the memory library memwatch" ) - else() - message( FATAL_ERROR "Failed to enable the memory library memwatch" ) - endif() - -elseif( ENABLE_MEMORY STREQUAL "dmalloc" ) - CHECK_INCLUDE_FILE( dmalloc.h HAVE_DMALLOC_H ) - find_library( DMALLOC_LIBRARY dmalloc ) - mark_as_advanced( DMALLOC_LIBRARY ) - if( HAVE_DMALLOC_H AND DMALLOC_LIBRARY ) - message( STATUS "Adding global library: ${DMALLOC_LIBRARY}" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${DMALLOC_LIBRARY} ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DDMALLOC -DDMALLOC_FUNC_CHECK" ) - message( STATUS "Enabled the memory library dmalloc" ) - else() - message( FATAL_ERROR "Failed to enable the memory library dmalloc" ) - endif() - -elseif( ENABLE_MEMORY STREQUAL "gcollect" ) - CHECK_INCLUDE_FILE( gc.h HAVE_GC_H ) - find_library( GC_LIBRARY gc ) - mark_as_advanced( GC_LIBRARY ) - if( HAVE_GC_H AND GC_LIBRARY ) - message( STATUS "Adding global library: ${GC_LIBRARY}" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${GC_LIBRARY} ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DGCOLLECT" ) - message( STATUS "Enabled the memory library gcollect" ) - else() - message( FATAL_ERROR "Failed to enable the memory library gcollect" ) - endif() - -else() - message( FATAL_ERROR "invalid option ENABLE_MEMORY=${ENABLE_MEMORY} (valid options: ${MEMORY_OPTIONS})" ) -endif() - - -# -# Enable profiler (default=none) -# -set( PROFILER_OPTIONS "none;gprof" ) -set( ENABLE_PROFILER "none" CACHE STRING "enable profiler: ${PROFILER_OPTIONS} (default=none)" ) -set_property( CACHE ENABLE_PROFILER PROPERTY STRINGS ${PROFILER_OPTIONS} ) -if( ENABLE_PROFILER STREQUAL "none" ) - # no profiler - -elseif( ENABLE_PROFILER STREQUAL "gprof" ) - if( CMAKE_C_COMPILER_ID STREQUAL "GNU" ) - if( NOT HAVE_GPROF_FLAGS ) - set_property( CACHE CMAKE_C_FLAGS PROPERTY VALUE "${CMAKE_C_FLAGS} -pg" ) - set_property( CACHE CMAKE_EXE_LINKER_FLAGS PROPERTY VALUE "${CMAKE_EXE_LINKER_FLAGS} -pg" ) - set( HAVE_GPROF_FLAGS ON CACHE INTERNAL "" ) - endif() - message( STATUS "Enabled the profiler gprof" ) - else() - message( FATAL_ERROR "Failed to enable the profiler gprof - not GNU" ) - endif() - -else() - message( FATAL_ERROR "invalid option ENABLE_PROFILER=${ENABLE_PROFILER} (valid options: ${PROFILER_OPTIONS})" ) -endif() - - -# -# Enable extra buildbot code (default=OFF) -# -option( ENABLE_EXTRA_BUILDBOT_CODE "enable extra buildbot code (default=OFF)" OFF ) -if( ENABLE_EXTRA_BUILDBOT_CODE ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DBUILDBOT" ) - message( STATUS "Enabled extra BUILDBOT code" ) -endif() - - -##################################################################### -# package stuff -# -set( CPACK_PACKAGE_NAME "Hercules" ) -set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "MMORPG server package" ) -set( CPACK_PACKAGE_VERSION ${SVNVERSION} ) -set( CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE ) -#set( CPACK_MONOLITHIC_INSTALL ON ) -include( CPACK OPTIONAL RESULT_VARIABLE HAVE_CPACK ) -if( HAVE_CPACK ) - option( WITH_CPACK "enable building packages with CPack ('package' target)" ON ) -endif() -if( NOT WITH_CPACK ) - # empty replacements - macro( cpack_add_component_group ) - endmacro() - macro( cpack_add_component ) - endmacro() - message( STATUS "Disabled package creation" ) -endif() - -set( Runtime "Runtime files" CACHE INTERNAL "" ) -set( Runtime_base "configurations, dbs, npcs, docs, ..." CACHE INTERNAL "" ) -set( Runtime_templates "conf/import and save (generated from conf/import-tmpl and save-tmpl)" CACHE INTERNAL "" ) -cpack_add_component_group( Runtime DESCRIPTION ${Runtime} DISPLAY_NAME "Runtime" ) -cpack_add_component( Runtime_base DESCRIPTION ${Runtime_base} DISPLAY_NAME "Base files" GROUP Runtime ) -cpack_add_component( Runtime_templates DESCRIPTION ${Runtime_templates} DISPLAY_NAME "Base templates" GROUP Runtime ) - -set( Development "Development files" CACHE INTERNAL "" ) -set( Development_base "projects, 3rdparty, sources, templates" CACHE INTERNAL "" ) -cpack_add_component_group( Development DESCRIPTION ${Development} DISPLAY_NAME "Development" ) -cpack_add_component( Development_base DESCRIPTION ${Development_base} DISPLAY_NAME "Base files" GROUP Development ) - - -# -# install stuff -# -option( INSTALL_COMPONENT_RUNTIME "install/package files needed to run the project" ON ) -option( INSTALL_COMPONENT_DEVELOPMENT "install/package files needed to build the project" OFF ) -option( INSTALL_TO_PATH "copy files to INSTALL_PATH" OFF ) -option( INSTALL_TO_SOURCE "copy files to source directory, skips what is already there (${CMAKE_CURRENT_SOURCE_DIR})" OFF ) -option( INSTALL_TO_SUBDIR "copy files to subdirectory (${CMAKE_CURRENT_BINARY_DIR}/install)" OFF ) -set( INSTALL_PATH "${CMAKE_INSTALL_PREFIX}" CACHE STRING "install path (only used when INSTALL_TO_PATH is set)" ) -mark_as_advanced( CMAKE_INSTALL_PREFIX ) -if( INSTALL_TO_PATH AND NOT ("${INSTALL_TO}" STREQUAL "path") )# changed to path - set_property( CACHE INSTALL_TO_SOURCE INSTALL_TO_SUBDIR PROPERTY VALUE OFF ) -elseif( INSTALL_TO_SOURCE AND NOT ("${INSTALL_TO}" STREQUAL "source") )# changed to source - set_property( CACHE INSTALL_TO_PATH INSTALL_TO_SUBDIR PROPERTY VALUE OFF ) -elseif( INSTALL_TO_SUBDIR AND NOT ("${INSTALL_TO}" STREQUAL "subdir") )# changed to subdir - set_property( CACHE INSTALL_TO_PATH INSTALL_TO_SOURCE PROPERTY VALUE OFF ) -elseif( NOT INSTALL_TO_PATH AND NOT INSTALL_TO_SOURCE AND NOT INSTALL_TO_SUBDIR )# default - set_property( CACHE INSTALL_TO_SUBDIR PROPERTY VALUE ON ) -endif() -if( INSTALL_TO_PATH ) - set( INSTALL_TO "path" CACHE INTERNAL "" ) - set_property( CACHE CMAKE_INSTALL_PREFIX PROPERTY VALUE "${INSTALL_PATH}" ) -elseif( INSTALL_TO_SOURCE ) - set( INSTALL_TO "source" CACHE INTERNAL "" ) - set_property( CACHE CMAKE_INSTALL_PREFIX PROPERTY VALUE "${CMAKE_CURRENT_SOURCE_DIR}" ) -elseif( INSTALL_TO_SUBDIR ) - set( INSTALL_TO "subdir" CACHE INTERNAL "" ) - set_property( CACHE CMAKE_INSTALL_PREFIX PROPERTY VALUE "${CMAKE_CURRENT_BINARY_DIR}/install" ) -endif() -set( SVN_FOLDER_PATTERN "[\\.]svn" CACHE STRING "pattern of svn folder that we exclude from instalations" ) -mark_as_advanced( SVN_FOLDER_PATTERN ) -set( DEVELOPMENT_FILES - "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt" - "${CMAKE_CURRENT_SOURCE_DIR}/configure" - "${CMAKE_CURRENT_SOURCE_DIR}/configure.in" - "${CMAKE_CURRENT_SOURCE_DIR}/Hercules-9.sln" - "${CMAKE_CURRENT_SOURCE_DIR}/Hercules-10.sln" - ) -set( DEVELOPMENT_DIRECTORIES - "3rdparty" - "conf/import-tmpl" - "src" - "vcproj-9" - "vcproj-10" - ) -set( RUNTIME_FILES - "${CMAKE_CURRENT_SOURCE_DIR}/athena-start" - "${CMAKE_CURRENT_SOURCE_DIR}/char-server.sh" - "${CMAKE_CURRENT_SOURCE_DIR}/charserv-sql.bat" - "${CMAKE_CURRENT_SOURCE_DIR}/dbghelp.dll" - "${CMAKE_CURRENT_SOURCE_DIR}/libmysql.dll" - "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" - "${CMAKE_CURRENT_SOURCE_DIR}/login-server.sh" - "${CMAKE_CURRENT_SOURCE_DIR}/logserv-sql.bat" - "${CMAKE_CURRENT_SOURCE_DIR}/map-server.sh" - "${CMAKE_CURRENT_SOURCE_DIR}/mapserv-sql.bat" - "${CMAKE_CURRENT_SOURCE_DIR}/pcre3.dll" - "${CMAKE_CURRENT_SOURCE_DIR}/README.txt" - "${CMAKE_CURRENT_SOURCE_DIR}/runserver-sql.bat" - "${CMAKE_CURRENT_SOURCE_DIR}/serv.bat" - "${CMAKE_CURRENT_SOURCE_DIR}/start" - "${CMAKE_CURRENT_SOURCE_DIR}/zlib1.dll" - ) -set( RUNTIME_DIRECTORIES - "conf" - "db" - "doc" - "log" - "npc" - "plugins" - "sql-files" - "tools" - ) -if( INSTALL_TO_SOURCE )# skip, already in the source dir -else() - if( INSTALL_COMPONENT_RUNTIME ) - install( FILES ${RUNTIME_FILES} - DESTINATION "." - COMPONENT Runtime_base ) - foreach( DIR IN ITEMS ${RUNTIME_DIRECTORIES} ) - if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${DIR}/" ) - install( DIRECTORY "${DIR}/" - DESTINATION "${DIR}" - COMPONENT Runtime_base - PATTERN ${SVN_FOLDER_PATTERN} EXCLUDE - PATTERN "conf/import-tmpl" EXCLUDE ) - else() - # create empty directory - install( CODE "file(MAKE_DIRECTORY \"\${ENV}\${CMAKE_INSTALL_PREFIX}/${DIR}\")" - COMPONENT Runtime_base ) - endif() - endforeach() - endif( INSTALL_COMPONENT_RUNTIME ) - if( INSTALL_COMPONENT_DEVELOPMENT ) - install( FILES ${DEVELOPMENT_FILES} - DESTINATION "." - COMPONENT Development_base ) - foreach( DIR IN ITEMS ${DEVELOPMENT_DIRECTORIES} ) - install( DIRECTORY "${DIR}/" - DESTINATION "${DIR}" - COMPONENT Development_base - PATTERN ${SVN_FOLDER_PATTERN} EXCLUDE ) - endforeach() - endif( INSTALL_COMPONENT_DEVELOPMENT ) -endif() -if( INSTALL_COMPONENT_RUNTIME ) - # templates - set( _TEMPLATES - "conf/import-tmpl" "conf/import" - ) - set( INSTALL_TEMPLATES_FILE "${CMAKE_CURRENT_BINARY_DIR}/InstallTemplates.cmake" ) - file( WRITE "${INSTALL_TEMPLATES_FILE}" - "macro( INSTALL_TEMPLATE _SRC _DST )\n" - " set( SRC \"${CMAKE_CURRENT_SOURCE_DIR}/\${_SRC}\" )\n" - " set( DST \"\${CMAKE_INSTALL_PREFIX}/\${_DST}\" )\n" - " if( EXISTS \"\${DST}\" )\n" - " message( \"-- Already exists: \${DST}\" )\n" - " else()\n" - " message( \"-- Installing template: \${DST}\" )\n" - " execute_process( COMMAND \"${CMAKE_COMMAND}\" -E copy \"\${SRC}\" \"\${DST}\" )\n" - " endif()\n" - "endmacro()\n" - ) - while( _TEMPLATES ) - list( GET _TEMPLATES 0 _SRC ) - list( GET _TEMPLATES 1 _DST ) - list( REMOVE_AT _TEMPLATES 0 1 ) - if( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${_SRC}" ) - file( GLOB _PATHS "${CMAKE_CURRENT_SOURCE_DIR}/${_SRC}/*" ) - foreach( _PATH IN ITEMS ${_PATHS} ) - string( REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/${_SRC}/" "" _PATH "${_PATH}" ) - if( NOT "${_PATH}" MATCHES "${SVN_FOLDER_PATTERN}" ) - list( APPEND _TEMPLATES "${_SRC}/${_PATH}" "${_DST}/${_PATH}" ) - endif() - endforeach() - else() - file( APPEND "${INSTALL_TEMPLATES_FILE}" "INSTALL_TEMPLATE( \"${_SRC}\" \"${_DST}\" )\n" ) - endif() - endwhile() - install( SCRIPT "${INSTALL_TEMPLATES_FILE}" - COMPONENT Runtime_templates ) -endif( INSTALL_COMPONENT_RUNTIME ) - - -# -# sources -# -set( TARGET_LIST CACHE INTERNAL "" ) -add_subdirectory( 3rdparty ) -add_subdirectory( src ) - - -##################################################################### -# final checks and warnings -# -if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) - message( WARNING "64bit should work, but is not recommended." ) -elseif( NOT CMAKE_SIZEOF_VOID_P EQUAL 4 ) - message( FATAL_ERROR "unexpected architecture (CMAKE_SIZEOF_VOID_P is ${CMAKE_SIZEOF_VOID_P})" ) -endif() -list( LENGTH TARGET_LIST _LEN ) -if( _LEN EQUAL 0 ) - message( FATAL_ERROR "no targets available" ) -endif() -message( STATUS "Available targets:" ) -foreach( _TARGET IN ITEMS ${TARGET_LIST} ) - message( STATUS "\t${_TARGET}" ) -endforeach() diff --git a/Makefile.in b/Makefile.in index 4a1ac2a72..c91a77c6f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -190,38 +190,3 @@ needs_mysql: no_plugins: @echo "Plugins disabled by the configure script" @exit 1 - -##################################################################### -# TODO - -#install: conf/%.conf conf/%.txt -# @read -p "WARNING: This target does not work properly yet. Press Ctrl+C to cancel or Enter to continue." -# @mkdir -p /opt/hercules/bin/ -# @mkdir -p /opt/hercules/etc/hercules/ -# @mkdir -p /opt/hercules/var/log/hercules/ -# @mv save /opt/hercules/etc/hercules/save -# @mv db /opt/hercules/etc/hercules/db -# @mv conf /opt/hercules/etc/hercules/conf -# @mv npc /opt/hercules/etc/hercules/npc -# @mv log/* /opt/hercules/var/log/hercules/ -# @cp *-server /opt/hercules/bin/ -# @ln -s /opt/hercules/etc/hercules/save/ /opt/hercules/bin/ -# @ln -s /opt/hercules/etc/hercules/db/ /opt/hercules/bin/ -# @ln -s /opt/hercules/etc/hercules/conf/ /opt/hercules/bin/ -# @ln -s /opt/hercules/etc/hercules/npc/ /opt/hercules/bin/ -# @ln -s /opt/hercules/var/log/hercules/ /opt/hercules/bin/log - -#bin-clean: -# @rm /opt/hercules/bin/login-server -# @rm /opt/hercules/bin/char-server -# @rm /opt/hercules/bin/map-server - -#uninstall: bin-clean -# @read -p "WARNING: This target does not work properly yet. Press Ctrl+C to cancel or Enter to continue." -# @rm /opt/hercules/bin/save -# @rm /opt/hercules/bin/db -# @rm /opt/hercules/bin/conf -# @rm /opt/hercules/bin/npc -# @rm /opt/hercules/bin/log -# @rm -rf /opt/hercules/etc/hercules -# @rm -rf /opt/hercules/var/log/hercules diff --git a/README.txt b/README.txt deleted file mode 100644 index a02c9117a..000000000 --- a/README.txt +++ /dev/null @@ -1,175 +0,0 @@ -//============================================================ -//= Hercules Readme File -//===== By: ================================================== -//= Hercules Dev Team -//===== Description: ========================================= -//= Basic information and installation guide with links to -//= various forum posts and Wiki articles. -//============================================================ - -============================ -|| Table of Contents || -============================ -|| 1. What is Hercules? || -|| 2. Prerequisites || -|| 3. Installation || -|| 4. Troubleshooting || -|| 5. Helpful Links || -|| 6. More Documentation || -============================ - - -============================ -|| 1. What is Hercules? || -============================ -Hercules is a collaborative software development project revolving around the -creation of a robust massively multiplayer online role playing game (MMORPG) -server package. Written in C, the program is very versatile and provides NPCs, -warps and modifications. The project is jointly managed by a group of volunteers -located around the world as well as a tremendous community providing QA and -support. Hercules is a continuation of the original Athena project. - - - -============================ -|| 2. Prerequisites || -============================ -Before installing Hercules there are certain tools and applications you will need. -This differs between the varying operating systems available, so the following -is broken down into Windows and Linux prerequisites. - -Windows - * TortoiseGIT (http://code.google.com/p/tortoisegit/) - * MSysGit (http://code.google.com/p/msysgit/downloads/list?can=2) - * MySQL (http://www.mysql.com/downloads/mysql/) - * MySQL Workbench (http://www.mysql.com/downloads/workbench/) - * MS Visual C++ (http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express) - -Linux (names of packages may require specific version numbers on certain distributions) - * gcc - * make - * mysql - * mysql-devel - * mysql-server - * pcre-devel - * git - * zlib-devel - - - -============================ -|| 3. Installation || -============================ -This section is a very brief set of installation instructions. For more concise guides -relevant to your Operation System, please refer to the Wiki (links at the end of this file). - -Windows - * Install prerequisites - * Create a folder to download Hercules into (e.g. C:\Hercules) - * Right click this folder and select "Git Clone". - * Paste the GIT URL into the box: https://github.com/HerculesWS/Hercules.git - * Open MySQL Workbench and create an instance to connect to your MySQL Server - * Create a database (hercules), a user (hercules), give permissions (GRANT SELECT,INSERT,UPDATE,DELETE) - and then login using the new user - * Use MySQL Workbench to run the .sql files in /sql-files/ on the new Hercules database - -Linux - (For CentOS) Step 1: yum install gcc make mysql mysql-devel mysql-server pcre-devel zlib-devel - Step 2: rpm -Uvhhttp://repo.webtatic.com/yum/centos/5/latest.rpm - Step 3: yum install --enablerepo=webtatic git-all - Step 4: yum install --enablerepo=webtatic --disableexcludes=main git-all - (For Debian) Type: apt-get install git make gcc libmysqlclient-dev zlib1g-dev libpcre3-dev - * Type: mysql_secure_installation - * Start your MySQL server - * Setup a MySQL user: CREATE USER 'hercules'@'localhost' IDENTIFIED BY 'password'; - * Assign permissions: GRANT SELECT,INSERT,UPDATE,DELETE ON `hercules\_rag`.* TO 'hercules'@'localhost'; - * Type: git clone https://github.com/HerculesWS/Hercules.git ~/Hercules - * Insert SQL files: mysql --user=root -p hercules_rag < trunk/sql-files/main.sql (and others) - * Type: cd trunk && ./configure && make clean && make sql - * When you're ready, type: ./athena-start start - - - -============================ -|| 4. Troubleshooting || -============================ -If you're having problems with starting your server, the first thing you should -do is check what's happening on your consoles. More often that not, all support issues -can be solved simply by looking at the error messages given. - -Examples: - - 1.) You get an error on your map-server_sql that looks something like this: - [Error]: npc_parsesrcfile: Unable to parse, probably a missing or extra TAB in - file 'npc/custom/jobmaster.txt', line '17'. Skipping line... - * w1=prontera,153,193,6 script - * w2=Job Master - * w3=123,{ - * w4= - - If you look at the error, it's telling you that you're missing (or have an extra) TAB. - This is easily fixed by looking at this part of the error: * w1=prontera,153,193,6 script - If there was a TAB where it's supposed to be, that line would have prontera,153,193,6 at w1 - and 'script' at w2. As there's a space instead of a TAB, the two sections are read as a - single parameter. - - 2.) You have a default user/password warning similar to the following: - [Warning]: Using the default user/password s1/p1 is NOT RECOMMENDED. - [Notice]: Please edit your 'login' table to create a proper inter-server user/pa - ssword (gender 'S') - [Notice]: and then edit your user/password in conf/map-server.conf (or conf/impo - rt/map_conf.txt) - - Relax. This is just indicating that you're using the default username and password. To - fix this, check over the part in the installation instructions relevant to the `login` table. - - 3.) Your Map Server says the following: - [Error]: make_connection: connect failed (socket #2, error 10061: No connection - could be made because the target machine actively refused it. - )! - - If this shows up on the map server, it generally means that there is no Char Server available - to accept the connection. - - - -============================ -|| 5. Helpful Links || -============================ -The following list of links point to various help files within the GIT, articles or -pages on the Wiki or topics within the Hercules forum. - -* Hercules Forums - http://hercules.ws/board/ - -* GIT Repository URL: - https://github.com/HerculesWS/Hercules - -* Hercules IRC Channel - irc.rizon.net - Channel: #Hercules - - - -============================ -|| 6. More Documentation || -============================ -Hercules has a large collection of help files and sample NPC scripts located in /doc/ - -* Scripting - It is recommended to look through /doc/script_commands.txt for help, pointers or - even for ideas for your next NPC script. Most script commands have a usage example. - -* @commands - In-game, Game Masters have the ability to use Atcommands (@) to control players, - create items, spawn mobs, reload configuration files and even control the weather. - For an in-depth explanation, please see /doc/atcommands.txt - -* Permissions - The Hercules emulator has a permission system that enables certain groups of players - to perform certain actions, or have access to certain visual enhancements or in-game - activity. To see what permissions are available, they are detailed in /doc/permissions.txt - -There are more files in the /doc/ directory that will help you to create scripts or update the -mapcache, or even explain how the job system and item bonuses work. Before posting a topic asking -for help on the forums, we recommend that all users take the time to look over this directory. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt deleted file mode 100644 index 0c120f99a..000000000 --- a/src/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ - -# -# setup and static libraries -# -add_subdirectory( common ) -if( HAVE_common_sql ) - option( BUILD_SQL_SERVERS "build sql server executables" ON ) -else() - message( STATUS "Disabled sql server targets (requires common_sql)" ) -endif() - - -# -# targets -# -add_subdirectory( login ) -add_subdirectory( char ) -add_subdirectory( map ) -add_subdirectory( tool ) -add_subdirectory( plugins ) diff --git a/src/char/CMakeLists.txt b/src/char/CMakeLists.txt deleted file mode 100644 index 9413ff303..000000000 --- a/src/char/CMakeLists.txt +++ /dev/null @@ -1,62 +0,0 @@ - -# -# setup -# -set( SQL_CHAR_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" ) - - -# -# char sql -# -if( BUILD_SQL_SERVERS ) -message( STATUS "Creating target char-server" ) -set( SQL_CHAR_HEADERS - "${CMAKE_CURRENT_SOURCE_DIR}/char.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_auction.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_elemental.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_guild.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_homun.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_mail.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_mercenary.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_party.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_pet.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_quest.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_storage.h" - "${CMAKE_CURRENT_SOURCE_DIR}/inter.h" - "${CMAKE_CURRENT_SOURCE_DIR}/pincode.h" - ) -set( SQL_CHAR_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/char.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_auction.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_elemental.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_guild.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_homun.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_mail.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_mercenary.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_party.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_pet.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_quest.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_storage.c" - "${CMAKE_CURRENT_SOURCE_DIR}/inter.c" - "${CMAKE_CURRENT_SOURCE_DIR}/pincode.c" - ) -set( DEPENDENCIES common_sql ) -set( LIBRARIES ${GLOBAL_LIBRARIES} ) -set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${COMMON_BASE_INCLUDE_DIRS} ) -set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_BASE_DEFINITIONS}" ) -set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_CHAR_HEADERS} ${SQL_CHAR_SOURCES} ) -source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ) -source_group( char FILES ${SQL_CHAR_HEADERS} ${SQL_CHAR_SOURCES} ) -include_directories( ${INCLUDE_DIRS} ) -add_executable( char-server ${SOURCE_FILES} ) -add_dependencies( char-server ${DEPENDENCIES} ) -target_link_libraries( char-server ${LIBRARIES} ${DEPENDENCIES} ) -set_target_properties( char-server PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" ) -if( INSTALL_COMPONENT_RUNTIME ) - cpack_add_component( Runtime_charserver_sql DESCRIPTION "char-server (sql version)" DISPLAY_NAME "char-server" GROUP Runtime ) - install( TARGETS char-server - DESTINATION "." - COMPONENT Runtime_charserver_sql ) -endif( INSTALL_COMPONENT_RUNTIME ) -message( STATUS "Creating target char-server - done" ) -endif( BUILD_SQL_SERVERS ) diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt deleted file mode 100644 index 5653663df..000000000 --- a/src/common/CMakeLists.txt +++ /dev/null @@ -1,166 +0,0 @@ - -# -# Create svnversion.h -# -message( STATUS "Creating svnversion.h" ) -if( SVNVERSION ) - file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h - "#ifndef SVNVERSION\n#define SVNVERSION ${SVNVERSION}\n#endif\n" ) -else() - file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h "" ) -endif() -set( GLOBAL_INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "" ) -set( SVNVERSION ${SVNVERSION} - CACHE STRING "SVN version of the source code" ) -if( INSTALL_COMPONENT_DEVELOPMENT ) - install( FILES ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h - DESTINATION "src/common" - COMPONENT Development_base ) -endif( INSTALL_COMPONENT_DEVELOPMENT ) -message( STATUS "Creating svnversion.h - done" ) - - -##################################################################### -# setup -# -set( COMMON_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" - CACHE PATH "common source directory" ) -mark_as_advanced( COMMON_SOURCE_DIR ) - -set( COMMON_ALL_HEADERS - "${CMAKE_CURRENT_BINARY_DIR}/svnversion.h" - "${COMMON_SOURCE_DIR}/cbasetypes.h" - "${COMMON_SOURCE_DIR}/mmo.h" - ) - -set( COMMON_MINI_HEADERS - ${COMMON_ALL_HEADERS} - "${COMMON_SOURCE_DIR}/core.h" - "${COMMON_SOURCE_DIR}/console.h" - "${COMMON_SOURCE_DIR}/malloc.h" - "${COMMON_SOURCE_DIR}/showmsg.h" - "${COMMON_SOURCE_DIR}/strlib.h" - ${LIBCONFIG_HEADERS} # needed by showmsg.h - CACHE INTERNAL "" ) -set( COMMON_MINI_SOURCES - "${COMMON_SOURCE_DIR}/core.c" - "${COMMON_SOURCE_DIR}/console.c" - "${COMMON_SOURCE_DIR}/malloc.c" - "${COMMON_SOURCE_DIR}/showmsg.c" - "${COMMON_SOURCE_DIR}/strlib.c" - ${LIBCONFIG_SOURCES} # needed by showmsg.c - CACHE INTERNAL "" ) -set( COMMON_MINI_INCLUDE_DIRS ${LIBCONFIG_INCLUDE_DIRS} CACHE INTERNAL "" ) -set( COMMON_MINI_DEFINITIONS "-DMINICORE ${LIBCONFIG_DEFINITIONS}" CACHE INTERNAL "" ) - - -# -# common_base -# -if( WITH_ZLIB ) -message( STATUS "Creating target common_base" ) -set( COMMON_BASE_HEADERS - ${COMMON_ALL_HEADERS} - "${COMMON_SOURCE_DIR}/conf.h" - "${COMMON_SOURCE_DIR}/core.h" - "${COMMON_SOURCE_DIR}/console.h" - "${COMMON_SOURCE_DIR}/db.h" - "${COMMON_SOURCE_DIR}/des.h" - "${COMMON_SOURCE_DIR}/ers.h" - "${COMMON_SOURCE_DIR}/grfio.h" - "${COMMON_SOURCE_DIR}/HPM.h" - "${COMMON_SOURCE_DIR}/HPMi.h" - "${COMMON_SOURCE_DIR}/malloc.h" - "${COMMON_SOURCE_DIR}/mapindex.h" - "${COMMON_SOURCE_DIR}/md5calc.h" - "${COMMON_SOURCE_DIR}/nullpo.h" - "${COMMON_SOURCE_DIR}/random.h" - "${COMMON_SOURCE_DIR}/showmsg.h" - "${COMMON_SOURCE_DIR}/socket.h" - "${COMMON_SOURCE_DIR}/strlib.h" - "${COMMON_SOURCE_DIR}/timer.h" - "${COMMON_SOURCE_DIR}/utils.h" - "${COMMON_SOURCE_DIR}/atomic.h" - "${COMMON_SOURCE_DIR}/spinlock.h" - "${COMMON_SOURCE_DIR}/thread.h" - "${COMMON_SOURCE_DIR}/mutex.h" - ${LIBCONFIG_HEADERS} # needed by conf.h/showmsg.h - CACHE INTERNAL "common_base headers" ) -set( COMMON_BASE_SOURCES - "${COMMON_SOURCE_DIR}/conf.c" - "${COMMON_SOURCE_DIR}/core.c" - "${COMMON_SOURCE_DIR}/console.c" - "${COMMON_SOURCE_DIR}/db.c" - "${COMMON_SOURCE_DIR}/des.c" - "${COMMON_SOURCE_DIR}/ers.c" - "${COMMON_SOURCE_DIR}/grfio.c" - "${COMMON_SOURCE_DIR}/HPM.c" - "${COMMON_SOURCE_DIR}/malloc.c" - "${COMMON_SOURCE_DIR}/mapindex.c" - "${COMMON_SOURCE_DIR}/md5calc.c" - "${COMMON_SOURCE_DIR}/nullpo.c" - "${COMMON_SOURCE_DIR}/random.c" - "${COMMON_SOURCE_DIR}/showmsg.c" - "${COMMON_SOURCE_DIR}/socket.c" - "${COMMON_SOURCE_DIR}/strlib.c" - "${COMMON_SOURCE_DIR}/timer.c" - "${COMMON_SOURCE_DIR}/utils.c" - "${COMMON_SOURCE_DIR}/thread.c" - "${COMMON_SOURCE_DIR}/mutex.c" - ${LIBCONFIG_SOURCES} # needed by conf.c/showmsg.c - CACHE INTERNAL "common_base sources" ) -set( COMMON_BASE_INCLUDE_DIRS - ${LIBCONFIG_INCLUDE_DIRS} - CACHE INTERNAL "common_base include dirs" ) -set( COMMON_BASE_DEFINITIONS - ${LIBCONFIG_DEFINITIONS} - CACHE INTERNAL "common_base definitions" ) -set( LIBRARIES ${GLOBAL_LIBRARIES} ${ZLIB_LIBRARIES} ) -set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${MT19937AR_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${COMMON_BASE_INCLUDE_DIRS} ) -set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_BASE_DEFINITIONS}" ) -set( SOURCE_FILES ${MT19937AR_HEADERS} ${MT19937AR_SOURCES} ${COMMON_BASE_HEADERS} ${COMMON_BASE_SOURCES} ) -source_group( mt19937ar FILES ${MT19937AR_HEADERS} ${MT19937AR_SOURCES} ) -source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_BASE_SOURCES} ) -add_library( common_base ${SOURCE_FILES} ) -target_link_libraries( common_base ${LIBRARIES} ) -set_target_properties( common_base PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" ) -include_directories( ${INCLUDE_DIRS} ) -set( HAVE_common_base ON CACHE INTERNAL "" ) -set( TARGET_LIST ${TARGET_LIST} common_base CACHE INTERNAL "" ) -message( STATUS "Creating target common_base - done" ) -else() -message( STATUS "Skipping target common_base (requires ZLIB)" ) -unset( HAVE_common_base CACHE ) -endif() - - -# -# common_sql -# -if( HAVE_common_base AND WITH_MYSQL ) -message( STATUS "Creating target common_sql" ) -set( COMMON_SQL_HEADERS - ${COMMON_ALL_HEADERS} - "${CMAKE_CURRENT_SOURCE_DIR}/sql.h" - CACHE INTERNAL "common_sql headers" ) -set( COMMON_SQL_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/sql.c" - CACHE INTERNAL "common_sql sources" ) -set( DEPENDENCIES common_base ) -set( LIBRARIES ${GLOBAL_LIBRARIES} ${MYSQL_LIBRARIES} ) -set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${MYSQL_INCLUDE_DIRS} ) -set( DEFINITIONS "${GLOBAL_DEFINITIONS}" ) -set( SOURCE_FILES ${COMMON_SQL_HEADERS} ${COMMON_SQL_SOURCES} ) -source_group( common FILES ${COMMON_SQL_HEADERS} ${COMMON_SQL_SOURCES} ) -add_library( common_sql ${SOURCE_FILES} ) -add_dependencies( common_sql ${DEPENDENCIES} ) -target_link_libraries( common_sql ${LIBRARIES} ${DEPENDENCIES} ) -set_target_properties( common_sql PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" ) -include_directories( ${INCLUDE_DIRS} ) -set( HAVE_common_sql ON CACHE INTERNAL "" ) -set( TARGET_LIST ${TARGET_LIST} common_sql CACHE INTERNAL "" ) -message( STATUS "Creating target common_sql - done" ) -else() -message( STATUS "Skipping target common_sql (requires common_base and MYSQL)" ) -unset( HAVE_common_sql CACHE ) -endif() diff --git a/src/login/CMakeLists.txt b/src/login/CMakeLists.txt deleted file mode 100644 index fa657f8fd..000000000 --- a/src/login/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ - -# -# setup -# -set( LOGIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" ) -set( SQL_LOGIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" ) - - -# -# targets -# -add_subdirectory( sql ) diff --git a/src/login/sql/CMakeLists.txt b/src/login/sql/CMakeLists.txt deleted file mode 100644 index 46cf4db02..000000000 --- a/src/login/sql/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ - -# -# login sql -# -if( BUILD_SQL_SERVERS ) -message( STATUS "Creating target login-server" ) -set( SQL_LOGIN_HEADERS - "${SQL_LOGIN_SOURCE_DIR}/account.h" - "${SQL_LOGIN_SOURCE_DIR}/ipban.h" - "${SQL_LOGIN_SOURCE_DIR}/login.h" - "${SQL_LOGIN_SOURCE_DIR}/loginlog.h" - ) -set( SQL_LOGIN_SOURCES - "${SQL_LOGIN_SOURCE_DIR}/account_sql.c" - "${SQL_LOGIN_SOURCE_DIR}/ipban_sql.c" - "${SQL_LOGIN_SOURCE_DIR}/login.c" - "${SQL_LOGIN_SOURCE_DIR}/loginlog_sql.c" - ) -set( DEPENDENCIES common_sql ) -set( LIBRARIES ${GLOBAL_LIBRARIES} ) -set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${COMMON_BASE_INCLUDE_DIRS} ) -set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_BASE_DEFINITIONS} -DWITH_SQL" ) -set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_LOGIN_HEADERS} ${SQL_LOGIN_SOURCES} ) -source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ) -source_group( login FILES ${SQL_LOGIN_HEADERS} ${SQL_LOGIN_SOURCES} ) -include_directories( ${INCLUDE_DIRS} ) -add_executable( login-server ${SOURCE_FILES} ) -add_dependencies( login-server ${DEPENDENCIES} ) -target_link_libraries( login-server ${LIBRARIES} ${DEPENDENCIES} ) -set_target_properties( login-server PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" ) -if( INSTALL_COMPONENT_RUNTIME ) - cpack_add_component( Runtime_loginserver_sql DESCRIPTION "login-server (sql version)" DISPLAY_NAME "login-server" GROUP Runtime ) - install( TARGETS login-server - DESTINATION "." - COMPONENT Runtime_loginserver_sql ) -endif( INSTALL_COMPONENT_RUNTIME ) -set( TARGET_LIST ${TARGET_LIST} login-server CACHE INTERNAL "" ) -message( STATUS "Creating target login-server - done" ) -endif( BUILD_SQL_SERVERS ) diff --git a/src/map/CMakeLists.txt b/src/map/CMakeLists.txt deleted file mode 100644 index 51c3538ef..000000000 --- a/src/map/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ - -# -# setup -# -set( MAP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" ) -set( SQL_MAP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" ) - - -# -# targets -# -add_subdirectory( sql ) diff --git a/src/map/sql/CMakeLists.txt b/src/map/sql/CMakeLists.txt deleted file mode 100644 index 1629b2a8b..000000000 --- a/src/map/sql/CMakeLists.txt +++ /dev/null @@ -1,118 +0,0 @@ - -# -# map sql -# -if( BUILD_SQL_SERVERS ) -message( STATUS "Creating target map-server" ) -set( SQL_MAP_HEADERS - "${SQL_MAP_SOURCE_DIR}/atcommand.h" - "${SQL_MAP_SOURCE_DIR}/battle.h" - "${SQL_MAP_SOURCE_DIR}/battleground.h" - "${SQL_MAP_SOURCE_DIR}/buyingstore.h" - "${SQL_MAP_SOURCE_DIR}/chat.h" - "${SQL_MAP_SOURCE_DIR}/chrif.h" - "${SQL_MAP_SOURCE_DIR}/clif.h" - "${SQL_MAP_SOURCE_DIR}/date.h" - "${SQL_MAP_SOURCE_DIR}/duel.h" - "${SQL_MAP_SOURCE_DIR}/elemental.h" - "${SQL_MAP_SOURCE_DIR}/guild.h" - "${SQL_MAP_SOURCE_DIR}/homunculus.h" - "${SQL_MAP_SOURCE_DIR}/HPMmap.h" - "${SQL_MAP_SOURCE_DIR}/instance.h" - "${SQL_MAP_SOURCE_DIR}/intif.h" - "${SQL_MAP_SOURCE_DIR}/irc-bot.h" - "${SQL_MAP_SOURCE_DIR}/itemdb.h" - "${SQL_MAP_SOURCE_DIR}/log.h" - "${SQL_MAP_SOURCE_DIR}/mail.h" - "${SQL_MAP_SOURCE_DIR}/map.h" - "${SQL_MAP_SOURCE_DIR}/mapreg.h" - "${SQL_MAP_SOURCE_DIR}/mercenary.h" - "${SQL_MAP_SOURCE_DIR}/mob.h" - "${SQL_MAP_SOURCE_DIR}/npc.h" - "${SQL_MAP_SOURCE_DIR}/packets.h" - "${SQL_MAP_SOURCE_DIR}/packets_struct.h" - "${SQL_MAP_SOURCE_DIR}/party.h" - "${SQL_MAP_SOURCE_DIR}/path.h" - "${SQL_MAP_SOURCE_DIR}/pc.h" - "${SQL_MAP_SOURCE_DIR}/pc_groups.h" - "${SQL_MAP_SOURCE_DIR}/pet.h" - "${SQL_MAP_SOURCE_DIR}/quest.h" - "${SQL_MAP_SOURCE_DIR}/script.h" - "${SQL_MAP_SOURCE_DIR}/searchstore.h" - "${SQL_MAP_SOURCE_DIR}/skill.h" - "${SQL_MAP_SOURCE_DIR}/status.h" - "${SQL_MAP_SOURCE_DIR}/storage.h" - "${SQL_MAP_SOURCE_DIR}/trade.h" - "${SQL_MAP_SOURCE_DIR}/unit.h" - "${SQL_MAP_SOURCE_DIR}/vending.h" - ) -set( SQL_MAP_SOURCES - "${SQL_MAP_SOURCE_DIR}/atcommand.c" - "${SQL_MAP_SOURCE_DIR}/battle.c" - "${SQL_MAP_SOURCE_DIR}/battleground.c" - "${SQL_MAP_SOURCE_DIR}/buyingstore.c" - "${SQL_MAP_SOURCE_DIR}/chat.c" - "${SQL_MAP_SOURCE_DIR}/chrif.c" - "${SQL_MAP_SOURCE_DIR}/clif.c" - "${SQL_MAP_SOURCE_DIR}/date.c" - "${SQL_MAP_SOURCE_DIR}/duel.c" - "${SQL_MAP_SOURCE_DIR}/elemental.c" - "${SQL_MAP_SOURCE_DIR}/guild.c" - "${SQL_MAP_SOURCE_DIR}/homunculus.c" - "${SQL_MAP_SOURCE_DIR}/HPMmap.c" - "${SQL_MAP_SOURCE_DIR}/instance.c" - "${SQL_MAP_SOURCE_DIR}/intif.c" - "${SQL_MAP_SOURCE_DIR}/irc-bot.c" - "${SQL_MAP_SOURCE_DIR}/itemdb.c" - "${SQL_MAP_SOURCE_DIR}/log.c" - "${SQL_MAP_SOURCE_DIR}/mail.c" - "${SQL_MAP_SOURCE_DIR}/map.c" - "${SQL_MAP_SOURCE_DIR}/mapreg_sql.c" - "${SQL_MAP_SOURCE_DIR}/mercenary.c" - "${SQL_MAP_SOURCE_DIR}/mob.c" - "${SQL_MAP_SOURCE_DIR}/npc.c" - "${SQL_MAP_SOURCE_DIR}/npc_chat.c" - "${SQL_MAP_SOURCE_DIR}/party.c" - "${SQL_MAP_SOURCE_DIR}/path.c" - "${SQL_MAP_SOURCE_DIR}/pc.c" - "${SQL_MAP_SOURCE_DIR}/pc_groups.c" - "${SQL_MAP_SOURCE_DIR}/pet.c" - "${SQL_MAP_SOURCE_DIR}/quest.c" - "${SQL_MAP_SOURCE_DIR}/script.c" - "${SQL_MAP_SOURCE_DIR}/searchstore.c" - "${SQL_MAP_SOURCE_DIR}/skill.c" - "${SQL_MAP_SOURCE_DIR}/status.c" - "${SQL_MAP_SOURCE_DIR}/storage.c" - "${SQL_MAP_SOURCE_DIR}/trade.c" - "${SQL_MAP_SOURCE_DIR}/unit.c" - "${SQL_MAP_SOURCE_DIR}/vending.c" - ) -set( DEPENDENCIES common_sql ) -set( LIBRARIES ${GLOBAL_LIBRARIES} ) -set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${COMMON_BASE_INCLUDE_DIRS} ) -set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_BASE_DEFINITIONS}" ) -if( WITH_PCRE ) - message( STATUS "Enabled PCRE code" ) - set( LIBRARIES ${LIBRARIES} ${PCRE_LIBRARIES} ) - set( INCLUDE_DIRS ${INCLUDE_DIRS} ${PCRE_INCLUDE_DIRS} ) - set( DEFINITIONS "${DEFINITIONS} -DPCRE_SUPPORT" ) -else() - message( STATUS "Disabled PCRE code" ) -endif() -set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_MAP_HEADERS} ${SQL_MAP_SOURCES} ) -source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ) -source_group( map FILES ${SQL_MAP_HEADERS} ${SQL_MAP_SOURCES} ) -include_directories( ${INCLUDE_DIRS} ) -add_executable( map-server ${SOURCE_FILES} ) -add_dependencies( map-server ${DEPENDENCIES} ) -target_link_libraries( map-server ${LIBRARIES} ${DEPENDENCIES} ) -set_target_properties( map-server PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" ) -if( INSTALL_COMPONENT_RUNTIME ) - cpack_add_component( Runtime_mapserver_sql DESCRIPTION "map-server (sql version)" DISPLAY_NAME "map-server" GROUP Runtime ) - install( TARGETS map-server - DESTINATION "." - COMPONENT Runtime_mapserver_sql ) -endif( INSTALL_COMPONENT_RUNTIME ) -set( TARGET_LIST ${TARGET_LIST} map-server CACHE INTERNAL "" ) -message( STATUS "Creating target map-server - done" ) -endif( BUILD_SQL_SERVERS ) diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt deleted file mode 100644 index e3043a668..000000000 --- a/src/plugins/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -# -# setup -# -get_property( CAN_BUILD_SHARED_LIBS GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS ) -if( NOT CAN_BUILD_SHARED_LIBS ) - return() -endif() - -# -# sample -# -option( BUILD_PLUGIN_sample "build sample plugin" OFF ) -if( BUILD_PLUGIN_sample ) -message( STATUS "Creating target sample" ) -set( SAMPLE_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/sample.c" - ) -set( LIBRARIES ${GLOBAL_LIBRARIES} ) -set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ) -set( DEFINITIONS ${GLOBAL_DEFINITIONS} ) -set( SOURCE_FILES ${SAMPLE_SOURCES} ) -source_group( sample FILES ${SAMPLE_SOURCES} ) -include_directories( ${INCLUDE_DIRS} ) -add_library( sample SHARED ${SOURCE_FILES} ) -target_link_libraries( sample ${LIBRARIES} ) -set_target_properties( sample PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" ) -set_target_properties( sample PROPERTIES PREFIX "" ) -if( INSTALL_COMPONENT_RUNTIME ) - cpack_add_component( Runtime_sample DESCRIPTION "sample plugin" DISPLAY_NAME "sample" GROUP Runtime ) - install( TARGETS sample - DESTINATION "plugins" - COMPONENT Runtime_sample ) -endif( INSTALL_COMPONENT_RUNTIME ) -set( TARGET_LIST ${TARGET_LIST} sample CACHE INTERNAL "" ) -message( STATUS "Creating target sample - done" ) -endif( BUILD_PLUGIN_sample ) diff --git a/src/tool/CMakeLists.txt b/src/tool/CMakeLists.txt deleted file mode 100644 index a54ffa0e2..000000000 --- a/src/tool/CMakeLists.txt +++ /dev/null @@ -1,45 +0,0 @@ - -# -# mapcache -# -if( WITH_ZLIB ) - option( BUILD_MAPCACHE "build mapcache executable" ON ) -else() - message( STATUS "Disabled mapcache target (required ZLIB)" ) -endif() -if( BUILD_MAPCACHE ) -message( STATUS "Creating target mapcache" ) -set( COMMON_HEADERS - ${COMMON_MINI_HEADERS} - "${COMMON_SOURCE_DIR}/des.h" - "${COMMON_SOURCE_DIR}/grfio.h" - "${COMMON_SOURCE_DIR}/utils.h" - ) -set( COMMON_SOURCES - ${COMMON_MINI_SOURCES} - "${COMMON_SOURCE_DIR}/des.c" - "${COMMON_SOURCE_DIR}/grfio.c" - "${COMMON_SOURCE_DIR}/utils.c" - ) -set( MAPCACHE_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/mapcache.c" - ) -set( LIBRARIES ${GLOBAL_LIBRARIES} ${ZLIB_LIBRARIES} ) -set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${COMMON_MINI_INCLUDE_DIRS} ) -set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_MINI_DEFINITIONS}" ) -set( SOURCE_FILES ${COMMON_HEADERS} ${COMMON_SOURCES} ${MAPCACHE_SOURCES} ) -source_group( common FILES ${COMMON_HEADERS} ${COMMON_SOURCES} ) -source_group( mapcache FILES ${MAPCACHE_SOURCES} ) -add_executable( mapcache ${SOURCE_FILES} ) -include_directories( ${INCLUDE_DIRS} ) -target_link_libraries( mapcache ${LIBRARIES} ) -set_target_properties( mapcache PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" ) -if( INSTALL_COMPONENT_RUNTIME ) - cpack_add_component( Runtime_mapcache DESCRIPTION "mapcache generator" DISPLAY_NAME "mapcache" GROUP Runtime ) - install( TARGETS mapcache - DESTINATION "." - COMPONENT Runtime_mapcache ) -endif( INSTALL_COMPONENT_RUNTIME ) -set( TARGET_LIST ${TARGET_LIST} mapcache CACHE INTERNAL "" ) -message( STATUS "Creating target mapcache - done" ) -endif( BUILD_MAPCACHE ) diff --git a/start b/start deleted file mode 100755 index bd12a5e88..000000000 --- a/start +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# modified by shazeya@syafi.com (NL130240) - -./athena-start start -sleep 30 - -while [ true ]; do - if [ " 0" = "$(ps | grep -e log | wc -l)" ] || -# if [ " 0" = "$(ps | grep -e login | wc -l)" ] || - [ " 0" = "$(ps | grep -e char | wc -l)" ] || - [ " 0" = "$(ps | grep -e map | wc -l)" ]; then - printf "Error:" - date - sleep 10 - printf "Checking:" - date - if [ " 0" = "$(ps | grep -e log | wc -l)" ] || -# if [ " 0" = "$(ps | grep -e login | wc -l)" ] || - [ " 0" = "$(ps | grep -e char | wc -l)" ] || - [ " 0" = "$(ps | grep -e map | wc -l)" ]; then - printf "Error Confirmation:" - date - printf "Restoration:" - date - ./athena-start start - else - printf "Check Miss Sorry:" - date - fi -# else -# printf "Check OK:" -# date - fi - sleep 10 -done diff --git a/tools/item_db.pl b/tools/item_db.pl deleted file mode 100755 index a2b443de9..000000000 --- a/tools/item_db.pl +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/perl -$db = "item_db"; -$nb_columns = 22; -@str_col = (1,2,7,19,20,21); -$line_format = "([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),(\{.*\}),(\{.*\}),(\{.*\})"; -#$line_format = ; -$create_table = "# -# Table structure for table `item_db` -# - -DROP TABLE IF EXISTS `item_db`; -CREATE TABLE `item_db` ( - `id` smallint(5) unsigned NOT NULL default '0', - `name_english` varchar(50) NOT NULL default '', - `name_japanese` varchar(50) NOT NULL default '', - `type` tinyint(2) unsigned NOT NULL default '0', - `price_buy` mediumint(10) unsigned default NULL, - `price_sell` mediumint(10) unsigned default NULL, - `weight` smallint(5) unsigned NOT NULL default '0', - `attack` smallint(3) unsigned default NULL, - `defence` tinyint(3) unsigned default NULL, - `range` tinyint(2) unsigned default NULL, - `slots` tinyint(2) unsigned default NULL, - `equip_jobs` int(12) unsigned default NULL, - `equip_upper` tinyint(8) unsigned default NULL, - `equip_genders` tinyint(2) unsigned default NULL, - `equip_locations` smallint(4) unsigned default NULL, - `weapon_level` tinyint(2) unsigned default NULL, - `equip_level` tinyint(3) unsigned default NULL, - `refineable` tinyint(1) unsigned default NULL, - `view` smallint(3) unsigned default NULL, - `script` text, - `equip_script` text, - `unequip_script` text, - PRIMARY KEY (`id`) -) ENGINE=MyISAM; -"; -printf("%s\n",$create_table); -while ($ligne=<STDIN>) -{ - if ($ligne =~ /[^\r\n]+/) - { - $ligne = $&; - if ($ligne =~ /^\/\//) - { - printf("# "); - $ligne = substr($ligne, 2); - } - if ($ligne =~ $line_format) { - @champ = ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22); - } else { - @champ = (); - } - if ($#champ != $nb_columns - 1) - { - # Can't parse, it's a real comment - printf ("%s\n", $ligne); - } else { - printf("REPLACE INTO `%s` VALUES (", $db); - for ($i=0; $i<$#champ; $i++) - { - printField($champ[$i],",",$i); - } - printField($champ[$#champ],");\n",$#champ); - } - } -} -print("\n"); - - -sub printField { - my ($str, $suffix, $idCol) = @_; - # Remove first { and last } - if ($str =~ /{.*}/) - { - $str = substr($&,1,-1); - } - # If nothing, put NULL - if ($str eq "") { - printf("NULL%s", $suffix); - } else { - my $flag = 0; - # Search if it's a string column ? - foreach $col (@str_col) - { - if ($col == $idCol) - { - $flag = 1; - break; - } - } - if ($flag == 1) - { - # String column, so escape and add '' - printf("'%s'%s", escape($str), $suffix); - } else { - # Not a string column - printf("%s%s", $str,$suffix); - } - } -} - -sub escape { - my ($str) = @_; - my @str_splitted = split("'", $str); - my $result = ""; - for (my $i=0; $i<=$#str_splitted; $i++) - { - if ($i == 0) { - $result = @str_splitted[0]; - } else { - $result = $result."\\'".@str_splitted[$i]; - } - } - return $result -} |