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.
This commit is contained in:
lighta 2015-10-21 01:16:01 -04:00
parent edafd267d8
commit b480cb3d47
43 changed files with 117 additions and 116 deletions

1
.gitignore vendored
View File

@ -135,3 +135,4 @@ Thumbs.db
/.idea/vcs.xml /.idea/vcs.xml
/.idea/workspace.xml /.idea/workspace.xml
/build/ /build/

View File

@ -40,19 +40,19 @@ xml=yes
xml-user-comment= xml-user-comment=
[valkyrie] [valkyrie]
binary=/home/lighta/Documents/Myscript/RO/Servs/ragit/char-server binary=./char-server
binary-flags=--run-once binary-flags=--run-once
browser=/usr/bin/perl browser=/usr/bin/perl
default-logdir=/tmp/valkyrie_lighta/ default-logdir=./tmp
font-gen-sys=true font-gen-sys=true
font-gen-user="Luxi Sans,10,-1,5,50,0,0,0,0,0" 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" 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-butt-text=false
show-tooltips=true show-tooltips=true
src-editor=gvim src-editor=/bin/geany
src-lines=2 src-lines=2
use-vk-palette=true use-vk-palette=true
vg-exec=valgrind vg-exec=/bin/valgrind
view-log= view-log=
working-dir=/home/lighta/Documents/Myscript/RO/Servs/ragit working-dir=../

View File

@ -48,7 +48,7 @@ GOTO RESTART_NT
:DIRECT :DIRECT
ECHO Do not run this file directly. It is used by logserv.bat, charserv.bat, 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 GOTO END
:NOTFOUND :NOTFOUND

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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