summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreathenabot <eathenabot@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-11 02:37:53 +0000
committereathenabot <eathenabot@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-11 02:37:53 +0000
commit2402a9a0a5a654a3a3c8f5b22dd1cf0cf4a2f3f9 (patch)
tree474ad9b1fbffd707166ba468a3a1ffa51f44ca47
parenta96c4a26bef0595b083baeaa6454d3a980001ac9 (diff)
downloadhercules-2402a9a0a5a654a3a3c8f5b22dd1cf0cf4a2f3f9.tar.gz
hercules-2402a9a0a5a654a3a3c8f5b22dd1cf0cf4a2f3f9.tar.bz2
hercules-2402a9a0a5a654a3a3c8f5b22dd1cf0cf4a2f3f9.tar.xz
hercules-2402a9a0a5a654a3a3c8f5b22dd1cf0cf4a2f3f9.zip
* Merged changes up to eAthena 15094.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16096 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--3rdparty/CMakeLists.txt1
-rw-r--r--CMakeLists.txt24
-rw-r--r--src/map/map.c78
3 files changed, 43 insertions, 60 deletions
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
index c64c8ccd1..3b60b68dc 100644
--- a/3rdparty/CMakeLists.txt
+++ b/3rdparty/CMakeLists.txt
@@ -47,7 +47,6 @@ macro( CONFIGURE_WITH_LOCAL_OR_SYSTEM name )
endmacro( CONFIGURE_WITH_LOCAL_OR_SYSTEM )
-set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake CACHE INTERNAL "" )
add_subdirectory( libconfig )
add_subdirectory( msinttypes )
add_subdirectory( mt19937ar )
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fdbfb1d7f..83e021fc3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,7 +70,7 @@ endif()
#
# 3rd party
#
-add_subdirectory( 3rdparty )
+set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/cmake CACHE INTERNAL "" )
include( CheckCSourceCompiles )
include( CheckCSourceRuns )
include( CheckIncludeFile )
@@ -115,7 +115,10 @@ if( SVNVERSION_EXECUTABLE )
execute_process( COMMAND ${SVNVERSION_EXECUTABLE} ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE SVNVERSION
OUTPUT_STRIP_TRAILING_WHITESPACE )
- string( REGEX REPLACE "[^1234567890MSexported]" "_" SVNVERSION ${SVNVERSION} )
+ 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()
@@ -494,11 +497,17 @@ else()
DESTINATION "."
COMPONENT Runtime_base )
foreach( DIR IN ITEMS ${RUNTIME_DIRECTORIES} )
- install( DIRECTORY "${DIR}/"
- DESTINATION "${DIR}"
- COMPONENT Runtime_base
- PATTERN ${SVN_FOLDER_PATTERN} EXCLUDE
- PATTERN "conf/import-tmpl" EXCLUDE )
+ 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 )
@@ -556,6 +565,7 @@ endif( INSTALL_COMPONENT_RUNTIME )
# sources
#
set( TARGET_LIST CACHE INTERNAL "" )
+add_subdirectory( 3rdparty )
add_subdirectory( src )
diff --git a/src/map/map.c b/src/map/map.c
index 9e2dbef25..073901204 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -3260,46 +3260,33 @@ int map_config_read(char *cfgName)
if(strcmpi(w1,"timestamp_format")==0)
strncpy(timestamp_format, w2, 20);
- else
- if(strcmpi(w1,"stdout_with_ansisequence")==0)
+ else if(strcmpi(w1,"stdout_with_ansisequence")==0)
stdout_with_ansisequence = config_switch(w2);
- else
- if(strcmpi(w1,"console_silent")==0) {
+ else if(strcmpi(w1,"console_silent")==0) {
ShowInfo("Console Silent Setting: %d\n", atoi(w2));
msg_silent = atoi(w2);
- } else
- if (strcmpi(w1, "userid")==0)
+ } else if (strcmpi(w1, "userid")==0)
chrif_setuserid(w2);
- else
- if (strcmpi(w1, "passwd") == 0)
+ else if (strcmpi(w1, "passwd") == 0)
chrif_setpasswd(w2);
- else
- if (strcmpi(w1, "char_ip") == 0)
+ else if (strcmpi(w1, "char_ip") == 0)
char_ip_set = chrif_setip(w2);
- else
- if (strcmpi(w1, "char_port") == 0)
+ else if (strcmpi(w1, "char_port") == 0)
chrif_setport(atoi(w2));
- else
- if (strcmpi(w1, "map_ip") == 0)
+ else if (strcmpi(w1, "map_ip") == 0)
map_ip_set = clif_setip(w2);
- else
- if (strcmpi(w1, "bind_ip") == 0)
+ else if (strcmpi(w1, "bind_ip") == 0)
clif_setbindip(w2);
- else
- if (strcmpi(w1, "map_port") == 0) {
+ else if (strcmpi(w1, "map_port") == 0) {
clif_setport(atoi(w2));
map_port = (atoi(w2));
- } else
- if (strcmpi(w1, "map") == 0)
+ } else if (strcmpi(w1, "map") == 0)
map_addmap(w2);
- else
- if (strcmpi(w1, "delmap") == 0)
+ else if (strcmpi(w1, "delmap") == 0)
map_delmap(w2);
- else
- if (strcmpi(w1, "npc") == 0)
+ else if (strcmpi(w1, "npc") == 0)
npc_addsrcfile(w2);
- else
- if (strcmpi(w1, "delnpc") == 0)
+ else if (strcmpi(w1, "delnpc") == 0)
npc_delsrcfile(w2);
else if (strcmpi(w1, "autosave_time") == 0) {
autosave_interval = atoi(w2);
@@ -3307,48 +3294,35 @@ int map_config_read(char *cfgName)
autosave_interval = DEFAULT_AUTOSAVE_INTERVAL;
else
autosave_interval *= 1000; //Pass from sec to ms
- } else
- if (strcmpi(w1, "minsave_time") == 0) {
+ } else if (strcmpi(w1, "minsave_time") == 0) {
minsave_interval= atoi(w2);
if (minsave_interval < 1)
minsave_interval = 1;
- } else
- if (strcmpi(w1, "save_settings") == 0)
+ } else if (strcmpi(w1, "save_settings") == 0)
save_settings = atoi(w2);
- else
- if (strcmpi(w1, "motd_txt") == 0)
+ else if (strcmpi(w1, "motd_txt") == 0)
strcpy(motd_txt, w2);
- else
- if (strcmpi(w1, "help_txt") == 0)
+ else if (strcmpi(w1, "help_txt") == 0)
strcpy(help_txt, w2);
- else
- if (strcmpi(w1, "help2_txt") == 0)
+ else if (strcmpi(w1, "help2_txt") == 0)
strcpy(help2_txt, w2);
- else
- if (strcmpi(w1, "charhelp_txt") == 0)
+ else if (strcmpi(w1, "charhelp_txt") == 0)
strcpy(charhelp_txt, w2);
- else
- if(strcmpi(w1,"map_cache_file") == 0)
+ else if(strcmpi(w1,"map_cache_file") == 0)
strncpy(map_cache_file,w2,255);
- else
- if(strcmpi(w1,"db_path") == 0)
+ else if(strcmpi(w1,"db_path") == 0)
strncpy(db_path,w2,255);
- else
- if (strcmpi(w1, "console") == 0) {
+ else if (strcmpi(w1, "console") == 0) {
console = config_switch(w2);
if (console)
ShowNotice("Console Commands are enabled.\n");
- } else
- if (strcmpi(w1, "enable_spy") == 0)
+ } else if (strcmpi(w1, "enable_spy") == 0)
enable_spy = config_switch(w2);
- else
- if (strcmpi(w1, "use_grf") == 0)
+ else if (strcmpi(w1, "use_grf") == 0)
enable_grf = config_switch(w2);
- else
- if (strcmpi(w1, "console_msg_log") == 0)
+ else if (strcmpi(w1, "console_msg_log") == 0)
console_msg_log = atoi(w2);//[Ind]
- else
- if (strcmpi(w1, "import") == 0)
+ else if (strcmpi(w1, "import") == 0)
map_config_read(w2);
else
ShowWarning("Unknown setting '%s' in file %s\n", w1, cfgName);