Przeglądaj źródła

Valkyrie example

Move valkyrie sample config into conf/
Change path for relative path so that it could be applied for all.
tested with : 'valkyrie -f valkyrie_sample.cfg'
Change include in common, true that complicate move for those file but
will facilitate the parsing for some ide.
lighta 9 lat temu
rodzic
commit
b480cb3d47

+ 2 - 1
.gitignore

@@ -134,4 +134,5 @@ Thumbs.db
 /.idea/rathena.iml
 /.idea/vcs.xml
 /.idea/workspace.xml
-/build/
+/build/
+

+ 6 - 6
ragit.cfg → conf/valkyrie_sample.cfg

@@ -40,19 +40,19 @@ xml=yes
 xml-user-comment=
 
 [valkyrie]
-binary=/home/lighta/Documents/Myscript/RO/Servs/ragit/char-server
+binary=./char-server
 binary-flags=--run-once
 browser=/usr/bin/perl
-default-logdir=/tmp/valkyrie_lighta/
+default-logdir=./tmp
 font-gen-sys=true
 font-gen-user="Luxi Sans,10,-1,5,50,0,0,0,0,0"
 font-tool-user="Misc Fixed,11,-1,5,50,0,0,0,0,0"
-project-file=
+project-file=/home/lighta/Documents/Dev/RO/rathena/conf/valkyrie_sample.cfg
 show-butt-text=false
 show-tooltips=true
-src-editor=gvim
+src-editor=/bin/geany
 src-lines=2
 use-vk-palette=true
-vg-exec=valgrind
+vg-exec=/bin/valgrind
 view-log=
-working-dir=/home/lighta/Documents/Myscript/RO/Servs/ragit
+working-dir=../

+ 1 - 1
serv.bat

@@ -48,7 +48,7 @@ GOTO RESTART_NT
 
 :DIRECT
 ECHO Do not run this file directly. It is used by logserv.bat, charserv.bat,
-ECHO mapserv.bat and their '-sql' counterparts.
+ECHO mapserv.bat and their '-server' counterparts.
 GOTO END
 
 :NOTFOUND

+ 2 - 2
src/common/atomic.h

@@ -14,10 +14,10 @@
 //
 // our Abstraction is fully API-Compatible to Microsofts implementation @ NT5.0+
 // 
-#include "../common/cbasetypes.h"
+#include "cbasetypes.h"
 
 #if defined(_MSC_VER)
-#include "../common/winapi.h"
+#include "winapi.h"
 
 // This checks if C/C++ Compiler Version is 18.00
 #if _MSC_VER < 1800

+ 1 - 1
src/common/conf.c

@@ -2,7 +2,7 @@
 // For more information, see LICENCE in the main folder
 
 #include "conf.h"
-#include "../common/showmsg.h" // ShowError
+#include "showmsg.h" // ShowError
 
 int conf_read_file(config_t *config, const char *config_filename)
 {

+ 1 - 1
src/common/conf.h

@@ -4,7 +4,7 @@
 #ifndef _CONF_H_
 #define _CONF_H_
 
-#include "../common/cbasetypes.h"
+#include "cbasetypes.h"
 #include "../../3rdparty/libconfig/libconfig.h"
 
 int conf_read_file(config_t *config, const char *config_filename);

+ 1 - 1
src/common/core.c

@@ -19,7 +19,7 @@
 #ifndef _WIN32
 #include <unistd.h>
 #else
-#include "../common/winapi.h" // Console close event handling
+#include "winapi.h" // Console close event handling
 #include <direct.h> // _chdir
 #endif
 

+ 5 - 5
src/common/db.c

@@ -70,11 +70,11 @@
 
 #include "db.h"
 
-#include "../common/ers.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
+#include "ers.h"
+#include "malloc.h"
+#include "mmo.h"
+#include "showmsg.h"
+#include "strlib.h"
 
 #include <stdio.h>
 #include <stdlib.h>

+ 1 - 1
src/common/db.h

@@ -42,7 +42,7 @@
 #ifndef _DB_H_
 #define _DB_H_
 
-#include "../common/cbasetypes.h"
+#include "cbasetypes.h"
 
 #include <stdarg.h>
 

+ 2 - 2
src/common/des.c

@@ -1,7 +1,7 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
-#include "../common/cbasetypes.h"
-#include "../common/des.h"
+#include "cbasetypes.h"
+#include "des.h"
 
 
 /// DES (Data Encryption Standard) algorithm, modified version.

+ 5 - 5
src/common/ers.c

@@ -40,12 +40,12 @@
  * @see common#ers.h                                                         *
 \*****************************************************************************/
 
-#include "ers.h"
 
-#include "../common/cbasetypes.h"
-#include "../common/malloc.h" // CREATE, RECREATE, aMalloc, aFree
-#include "../common/nullpo.h"
-#include "../common/showmsg.h" // ShowMessage, ShowError, ShowFatalError, CL_BOLD, CL_NORMAL
+#include "cbasetypes.h"
+#include "ers.h"
+#include "malloc.h" // CREATE, RECREATE, aMalloc, aFree
+#include "nullpo.h"
+#include "showmsg.h" // ShowMessage, ShowError, ShowFatalError, CL_BOLD, CL_NORMAL
 
 #include <stdlib.h>
 #include <string.h>

+ 1 - 1
src/common/ers.h

@@ -40,7 +40,7 @@
 #ifndef _ERS_H_
 #define _ERS_H_
 
-#include "../common/cbasetypes.h"
+#include "cbasetypes.h"
 
 /*****************************************************************************\
  *  (1) All public parts of the Entry Reusage System.                        *

+ 1 - 1
src/common/evdp.h

@@ -1,7 +1,7 @@
 #ifndef _rA_EVDP_H_
 #define _rA_EVDP_H_
 
-#include "../common/cbasetypes.h"
+#include "cbasetypes.h"
 
 typedef struct EVDP_DATA EVDP_DATA;
 

+ 6 - 6
src/common/grfio.c

@@ -1,12 +1,12 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#include "../common/cbasetypes.h"
-#include "../common/des.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
+#include "cbasetypes.h"
+#include "des.h"
+#include "malloc.h"
+#include "showmsg.h"
+#include "strlib.h"
+#include "utils.h"
 #include "grfio.h"
 
 #include <stdlib.h>

+ 3 - 3
src/common/malloc.c

@@ -1,9 +1,9 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#include "../common/malloc.h"
-#include "../common/core.h"
-#include "../common/showmsg.h"
+#include "malloc.h"
+#include "core.h"
+#include "showmsg.h"
 
 #include <stdlib.h>
 #include <string.h>

+ 1 - 1
src/common/malloc.h

@@ -4,7 +4,7 @@
 #ifndef _MALLOC_H_
 #define _MALLOC_H_
 
-#include "../common/cbasetypes.h"
+#include "cbasetypes.h"
 
 #define ALC_MARK __FILE__, __LINE__, __func__
 

+ 5 - 5
src/common/mapindex.c

@@ -2,11 +2,11 @@
 // For more information, see LICENCE in the main folder
 
 #include "../config/core.h"
-#include "../common/core.h"
-#include "../common/mapindex.h"
-#include "../common/mmo.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
+#include "core.h"
+#include "mapindex.h"
+#include "mmo.h"
+#include "showmsg.h"
+#include "strlib.h"
 
 #include <stdlib.h>
 

+ 8 - 8
src/common/mempool.c

@@ -15,18 +15,18 @@
 #include <string.h>
 
 #ifdef WIN32
-#include "../common/winapi.h"
+#include "winapi.h"
 #else
 #include <unistd.h>
 #endif
 
-#include "../common/cbasetypes.h"
-#include "../common/showmsg.h"
-#include "../common/mempool.h"
-#include "../common/atomic.h"
-#include "../common/spinlock.h"
-#include "../common/malloc.h"
-#include "../common/mutex.h"
+#include "cbasetypes.h"
+#include "showmsg.h"
+#include "mempool.h"
+#include "atomic.h"
+#include "spinlock.h"
+#include "malloc.h"
+#include "mutex.h"
 
 #define ALIGN16	ra_align(16)
 #define ALIGN_TO(x, a) (x + ( a - ( x % a) ) )

+ 1 - 1
src/common/mempool.h

@@ -1,7 +1,7 @@
 #ifndef _rA_MEMPOOL_H_
 #define _rA_MEMPOOL_H_
 
-#include "../common/cbasetypes.h"
+#include "cbasetypes.h"
 
 typedef struct mempool *mempool;
 

+ 1 - 1
src/common/mmo.h

@@ -5,8 +5,8 @@
 #define	_MMO_H_
 
 #include "cbasetypes.h"
-#include "../common/db.h"
 #include "../config/core.h"
+#include "db.h"
 #include <time.h>
 
 // server->client protocol version

+ 6 - 6
src/common/mutex.c

@@ -2,17 +2,17 @@
 // For more information, see LICENCE in the main folder
 
 #ifdef WIN32
-#include "../common/winapi.h"
+#include "winapi.h"
 #else
 #include <pthread.h>
 
 #endif
 
-#include "../common/cbasetypes.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
-#include "../common/timer.h"
-#include "../common/mutex.h"
+#include "cbasetypes.h"
+#include "malloc.h"
+#include "showmsg.h"
+#include "timer.h"
+#include "mutex.h"
 
 struct ramutex{
 #ifdef WIN32

+ 1 - 1
src/common/netbuffer.h

@@ -4,7 +4,7 @@
 #ifndef _rA_NETBUFFER_H_
 #define _rA_NETBUFFER_H_
 
-#include "../common/cbasetypes.h"
+#include "cbasetypes.h"
 
 typedef struct netbuf{
 	sysint	pool;				// The pool ID this buffer belongs to,

+ 3 - 3
src/common/network.h

@@ -2,9 +2,9 @@
 #define _rA_NETWORK_H_
 
 #include <netinet/in.h>
-#include "../common/cbasetypes.h"
-#include "../common/netbuffer.h" 
-#include "../common/evdp.h"
+#include "cbasetypes.h"
+#include "netbuffer.h" 
+#include "evdp.h"
 
 #ifndef MAXCONN
 #define MAXCONN 16384

+ 1 - 1
src/common/nullpo.c

@@ -5,7 +5,7 @@
 #include <stdarg.h>
 #include <string.h>
 #include "nullpo.h"
-#include "../common/showmsg.h"
+#include "showmsg.h"
 
 static void nullpo_info_core(const char *file, int line, const char *func, const char *fmt, va_list ap);
 static void nullpo_info_core_(const char *file, int line, const char *func);

+ 1 - 1
src/common/nullpo.h

@@ -5,7 +5,7 @@
 #define _NULLPO_H_
 
 
-#include "../common/cbasetypes.h"
+#include "cbasetypes.h"
 
 #define NLP_MARK __FILE__, __LINE__, __func__
 

+ 5 - 5
src/common/raconf.c

@@ -14,12 +14,12 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "../common/cbasetypes.h"
-#include "../common/showmsg.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
+#include "cbasetypes.h"
+#include "showmsg.h"
+#include "db.h"
+#include "malloc.h"
 
-#include "../common/raconf.h"
+#include "raconf.h"
 
 #define SECTION_LEN 32
 #define VARNAME_LEN 64

+ 1 - 1
src/common/raconf.h

@@ -4,7 +4,7 @@
 #ifndef _rA_CONF_H_
 #define _rA_CONF_H_
 
-#include "../common/cbasetypes.h"
+#include "cbasetypes.h"
 
 // rAthena generic configuration file parser
 // 

+ 3 - 3
src/common/random.c

@@ -1,11 +1,11 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#include "../common/showmsg.h"
-#include "../common/timer.h" // gettick
+#include "showmsg.h"
+#include "timer.h" // gettick
 #include "random.h"
 #if defined(WIN32)
-	#include "../common/winapi.h"
+	#include "winapi.h"
 #elif defined(HAVE_GETPID) || defined(HAVE_GETTID)
 	#include <sys/types.h>
 	#include <unistd.h>

+ 1 - 1
src/common/random.h

@@ -4,7 +4,7 @@
 #ifndef _RANDOM_H_
 #define _RANDOM_H_
 
-#include "../common/cbasetypes.h"
+#include "cbasetypes.h"
 
 void rnd_init(void);
 void rnd_seed(uint32);

+ 3 - 3
src/common/showmsg.c

@@ -1,8 +1,8 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#include "../common/cbasetypes.h"
-#include "../common/strlib.h" // StringBuf
+#include "cbasetypes.h"
+#include "strlib.h" // StringBuf
 #include "showmsg.h"
 #include "core.h" //[Ind] - For SERVER_TYPE
 
@@ -10,7 +10,7 @@
 #include <stdlib.h> // atexit
 
 #ifdef WIN32
-	#include "../common/winapi.h"
+	#include "winapi.h"
 
 	#ifdef DEBUGLOGMAP
 		#define DEBUGLOGPATH "log\\map-server.log"

+ 7 - 7
src/common/socket.c

@@ -1,18 +1,18 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#include "../common/cbasetypes.h"
-#include "../common/mmo.h"
-#include "../common/timer.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
+#include "cbasetypes.h"
+#include "mmo.h"
+#include "timer.h"
+#include "malloc.h"
+#include "showmsg.h"
+#include "strlib.h"
 #include "socket.h"
 
 #include <stdlib.h>
 
 #ifdef WIN32
-	#include "../common/winapi.h"
+	#include "winapi.h"
 #else
 	#include <errno.h>
 #include <netinet/tcp.h>

+ 2 - 2
src/common/socket.h

@@ -4,10 +4,10 @@
 #ifndef	_SOCKET_H_
 #define _SOCKET_H_
 
-#include "../common/cbasetypes.h"
+#include "cbasetypes.h"
 
 #ifdef WIN32
-	#include "../common/winapi.h"
+	#include "winapi.h"
 	typedef long in_addr_t;
 #else
 	#include <sys/types.h>

+ 4 - 4
src/common/spinlock.h

@@ -16,12 +16,12 @@
 //
  
 #ifdef WIN32
-#include "../common/winapi.h"
+#include "winapi.h"
 #endif
 
-#include "../common/cbasetypes.h"
-#include "../common/atomic.h"
-#include "../common/thread.h"
+#include "cbasetypes.h"
+#include "atomic.h"
+#include "thread.h"
 
 #ifdef WIN32
 

+ 6 - 6
src/common/sql.c

@@ -1,15 +1,15 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#include "../common/cbasetypes.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
-#include "../common/timer.h"
+#include "cbasetypes.h"
+#include "malloc.h"
+#include "showmsg.h"
+#include "strlib.h"
+#include "timer.h"
 #include "sql.h"
 
 #ifdef WIN32
-#include "../common/winapi.h"
+#include "winapi.h"
 #endif
 #include <mysql.h>
 #include <stdlib.h>// strtoul

+ 1 - 1
src/common/sql.h

@@ -4,7 +4,7 @@
 #ifndef _COMMON_SQL_H_
 #define _COMMON_SQL_H_
 
-#include "../common/cbasetypes.h"
+#include "cbasetypes.h"
 #include <stdarg.h>// va_list
 
 

+ 3 - 3
src/common/strlib.c

@@ -1,9 +1,9 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#include "../common/cbasetypes.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
+#include "cbasetypes.h"
+#include "malloc.h"
+#include "showmsg.h"
 #include "strlib.h"
 
 #include <stdlib.h>

+ 1 - 1
src/common/strlib.h

@@ -4,7 +4,7 @@
 #ifndef _STRLIB_H_
 #define _STRLIB_H_
 
-#include "../common/cbasetypes.h"
+#include "cbasetypes.h"
 #include <stdarg.h>
 
 #define __USE_GNU  // required to enable strnlen on some platforms

+ 1 - 1
src/common/thread.c

@@ -7,7 +7,7 @@
 // For more information, see LICENCE in the main folder
 
 #ifdef WIN32
-#include "../common/winapi.h"
+#include "winapi.h"
 #define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.)
 #define __thread __declspec( thread ) 
 #else

+ 1 - 1
src/common/thread.h

@@ -5,7 +5,7 @@
 #ifndef _rA_THREAD_H_
 #define _rA_THREAD_H_
 
-#include "../common/cbasetypes.h"
+#include "cbasetypes.h"
 
 typedef struct rAthread *rAthread;
 typedef void* (*rAthreadProc)(void*);

+ 7 - 7
src/common/timer.c

@@ -1,19 +1,19 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#include "../common/cbasetypes.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
-#include "../common/utils.h"
-#include "../common/nullpo.h"
+#include "cbasetypes.h"
+#include "db.h"
+#include "malloc.h"
+#include "showmsg.h"
+#include "utils.h"
+#include "nullpo.h"
 #include "timer.h"
 
 #include <stdlib.h>
 #include <string.h>
 
 #ifdef WIN32
-#include "../common/winapi.h" // GetTickCount()
+#include "winapi.h" // GetTickCount()
 #else
 #endif
 

+ 1 - 1
src/common/timer.h

@@ -4,7 +4,7 @@
 #ifndef	_TIMER_H_
 #define	_TIMER_H_
 
-#include "../common/cbasetypes.h"
+#include "cbasetypes.h"
 #include <time.h>
 
 #define DIFF_TICK(a,b) ((int)((a)-(b)))

+ 3 - 3
src/common/utils.c

@@ -1,8 +1,8 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#include "../common/cbasetypes.h"
-#include "../common/showmsg.h"
+#include "cbasetypes.h"
+#include "showmsg.h"
 #include "socket.h"
 #include "utils.h"
 
@@ -11,7 +11,7 @@
 #include <math.h> // floor()
 
 #ifdef WIN32
-	#include "../common/winapi.h"
+	#include "winapi.h"
 	#ifndef F_OK
 		#define F_OK   0x0
 	#endif  /* F_OK */

+ 1 - 1
src/common/utils.h

@@ -4,7 +4,7 @@
 #ifndef _UTILS_H_
 #define _UTILS_H_
 
-#include "../common/cbasetypes.h"
+#include "cbasetypes.h"
 #include <stdio.h> // FILE*
 
 // generate a hex dump of the first 'length' bytes of 'buffer'