Added unix compatability
This commit is contained in:
@@ -49,7 +49,11 @@ void ClientApplication::Init(int argc, char* argv[]) {
|
||||
|
||||
//load the prerequisites
|
||||
ConfigUtility& config = ConfigUtility::GetSingleton();
|
||||
#ifdef __unix__
|
||||
config.Load("rsc/config.cfg", argc, argv);
|
||||
#else
|
||||
config.Load("rsc\\config.cfg", argc, argv);
|
||||
#endif
|
||||
|
||||
//-------------------------
|
||||
//Initialize the APIs
|
||||
|
||||
+6
-1
@@ -1,6 +1,11 @@
|
||||
#config
|
||||
INCLUDES+=. client_utilities renderable scenes ../common/debugging ../common/gameplay ../common/graphics ../common/map ../common/network ../common/network/packet_types ../common/ui ../common/utilities
|
||||
LIBS+=client.a ../libcommon.a -lSDL_net -lwsock32 -liphlpapi -lmingw32 -lSDLmain -lSDL -llua
|
||||
|
||||
LIBS+=client.a ../libcommon.a -lSDL_net -lSDLmain -lSDL -llua
|
||||
ifeq ($(OS),Windows_NT )
|
||||
LIBS+=-lwsock32 -liphlpapi -lmingw32
|
||||
endif
|
||||
|
||||
CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES))
|
||||
|
||||
#source
|
||||
|
||||
@@ -29,7 +29,7 @@ $(OUTDIR):
|
||||
mkdir $(OUTDIR)
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $< -llua
|
||||
|
||||
clean:
|
||||
$(RM) *.o *.a *.exe
|
||||
|
||||
@@ -22,7 +22,11 @@
|
||||
#ifndef REGIONAPI_HPP_
|
||||
#define REGIONAPI_HPP_
|
||||
|
||||
#ifdef __unix__
|
||||
#include "lua.hpp"
|
||||
#else
|
||||
#include "lua/lua.hpp"
|
||||
#endif
|
||||
|
||||
#define TORTUGA_REGION_NAME "Region"
|
||||
LUAMOD_API int openRegionAPI(lua_State* L);
|
||||
|
||||
@@ -22,7 +22,11 @@
|
||||
#ifndef REGIONPAGERAPI_HPP_
|
||||
#define REGIONPAGERAPI_HPP_
|
||||
|
||||
#ifdef __unix__
|
||||
#include "lua.hpp"
|
||||
#else
|
||||
#include "lua/lua.hpp"
|
||||
#endif
|
||||
|
||||
#define TORTUGA_REGION_PAGER_NAME "RegionPager"
|
||||
LUAMOD_API int openRegionPagerAPI(lua_State* L);
|
||||
|
||||
@@ -24,7 +24,11 @@
|
||||
|
||||
#include "region_pager_base.hpp"
|
||||
|
||||
#ifdef __unix__
|
||||
#include "lua.hpp"
|
||||
#else
|
||||
#include "lua/lua.hpp"
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -22,7 +22,12 @@
|
||||
#ifndef TILESHEETAPI_HPP_
|
||||
#define TILESHEETAPI_HPP_
|
||||
|
||||
#ifdef __unix__
|
||||
#include "lua.hpp"
|
||||
#else
|
||||
#include "lua/lua.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
#define TORTUGA_TILE_SHEET_NAME "TileSheet"
|
||||
LUAMOD_API int openTileSheetAPI(lua_State* L);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -21,7 +21,11 @@
|
||||
*/
|
||||
#include "character_manager.hpp"
|
||||
|
||||
#ifdef __unix__
|
||||
#include "sqlite3.h"
|
||||
#else
|
||||
#include "sqlite3/sqlite3.h"
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <stdexcept>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
+6
-1
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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>,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -22,7 +22,11 @@
|
||||
#ifndef SERVERUTILITY_HPP_
|
||||
#define SERVERUTILITY_HPP_
|
||||
|
||||
#ifdef __unix__
|
||||
#include "sqlite3.h"
|
||||
#else
|
||||
#include "sqlite3/sqlite3.h"
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user