Added unix compatability

This commit is contained in:
fro_ozen
2014-10-18 20:10:17 +02:00
parent 12cc970bf1
commit de7167e830
18 changed files with 80 additions and 7 deletions
+4
View File
@@ -26,7 +26,11 @@
#include "singleton.hpp"
#include "manager_interface.hpp"
#ifdef __unix__
#include "sqlite3.h"
#else
#include "sqlite3/sqlite3.h"
#endif
#include <functional>
#include <map>
+5 -1
View File
@@ -21,7 +21,11 @@
*/
#include "character_manager.hpp"
#ifdef __unix__
#include "sqlite3.h"
#else
#include "sqlite3/sqlite3.h"
#endif
#include <algorithm>
#include <stdexcept>
@@ -282,4 +286,4 @@ sqlite3* CharacterManager::SetDatabase(sqlite3* db) {
sqlite3* CharacterManager::GetDatabase() {
return database;
}
}
+4
View File
@@ -26,7 +26,11 @@
#include "singleton.hpp"
#include "manager_interface.hpp"
#ifdef __unix__
#include "sqlite3.h"
#else
#include "sqlite3/sqlite3.h"
#endif
#include <functional>
#include <map>
+5 -1
View File
@@ -34,7 +34,11 @@
#define linit_c
#define LUA_LIB
#ifdef __unix__
#include "lua.hpp"
#else
#include "lua/lua.hpp"
#endif
#include "region_api.hpp"
#include "region_pager_api.hpp"
@@ -86,4 +90,4 @@ LUALIB_API void luaL_openlibs (lua_State *L) {
lua_setfield(L, -2, lib->name);
}
lua_pop(L, 1); //remove _PRELOAD table
}
}
+6 -1
View File
@@ -1,6 +1,11 @@
#config
INCLUDES+=. accounts characters rooms server_utilities ../common/debugging ../common/gameplay ../common/map ../common/network ../common/network/packet_types ../common/utilities
LIBS+=server.a ../libcommon.a -lSDL_net -lwsock32 -liphlpapi -lmingw32 -lSDLmain -lSDL -llua -lsqlite3
LIBS+=server.a ../libcommon.a -lSDL_net -lSDLmain -lSDL -llua -lsqlite3
ifeq ($(OS),Windows_NT)
LIBS+=-lwsock32 -liphlpapi -lmingw32
endif
CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES))
#source
+4
View File
@@ -22,7 +22,11 @@
#ifndef ROOMAPI_HPP_
#define ROOMAPI_HPP_
#ifdef __unix__
#include "lua.hpp"
#else
#include "lua/lua.hpp"
#endif
#define TORTUGA_ROOM_NAME "Room"
LUAMOD_API int openRoomAPI(lua_State* L);
+5 -1
View File
@@ -26,7 +26,11 @@
#include "singleton.hpp"
#include "manager_interface.hpp"
#ifdef __unix__
#include "lua.hpp"
#else
#include "lua/lua.hpp"
#endif
class RoomManager:
public Singleton<RoomManager>,
@@ -63,4 +67,4 @@ private:
int counter = 0;
};
#endif
#endif
+4
View File
@@ -22,7 +22,11 @@
#ifndef ROOMMANAGERAPI_HPP_
#define ROOMMANAGERAPI_HPP_
#ifdef __unix__
#include "lua.hpp"
#else
#include "lua/lua.hpp"
#endif
#define TORTUGA_ROOM_MANAGER_NAME "RoomManager"
LUAMOD_API int openRoomManagerAPI(lua_State* L);
+6
View File
@@ -35,8 +35,14 @@
#include "singleton.hpp"
//APIs
#if __unix__
#include "lua.hpp"
#include "sqlite3.h"
#else
#include "lua/lua.hpp"
#include "sqlite3/sqlite3.h"
#endif
#include "SDL/SDL.h"
//STL
+5 -1
View File
@@ -40,7 +40,11 @@ void ServerApplication::Init(int argc, char* argv[]) {
std::cout << "Beginning " << argv[0] << std::endl;
//load the prerequisites
#ifdef __unix__
config.Load("rsc/config.cfg", argc, argv);
#else
config.Load("rsc\\config.cfg", argc, argv);
#endif
//-------------------------
//Initialize the APIs
@@ -260,4 +264,4 @@ void ServerApplication::HandlePacket(SerialPacket* const argPacket) {
}
break;
}
}
}
+4
View File
@@ -22,7 +22,11 @@
#ifndef SERVERUTILITY_HPP_
#define SERVERUTILITY_HPP_
#ifdef __unix__
#include "sqlite3.h"
#else
#include "sqlite3/sqlite3.h"
#endif
#include <string>