diff options
| -rw-r--r-- | .gitmodules | 12 | ||||
| -rw-r--r-- | Makefile | 57 | ||||
| -rw-r--r-- | README.md | 6 | ||||
| m--------- | lib/irrlicht | 0 | ||||
| m--------- | lib/nng | 0 | ||||
| m--------- | lib/tinyobjloader-c | 0 | ||||
| -rw-r--r-- | src/client/lua_api/gui/iguielement.cpp | 2 | ||||
| -rw-r--r-- | src/shared/lua_api/load_net.cpp | 2 |
8 files changed, 55 insertions, 24 deletions
diff --git a/.gitmodules b/.gitmodules index 450740d..9e74966 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,10 +1,16 @@ [submodule "lib/bullet"] path = lib/bullet - url = https://gitlab.com/bbblitz/bullet3/ + url = http://cogarr.net/source/cgit.cgi/bullet/ branch = master [submodule "lib/irrlicht"] path = lib/irrlicht - url = https://gitlab.com/bbblitz/irrlicht/ + url = http://cogarr.net/source/cgit.cgi/irrlicht/ [submodule "lib/luajit"] path = lib/luajit - url = https://gitlab.com/bbblitz/luajit/ + url = http://cogarr.net/source/cgit.cgi/luajit/ +[submodule "lib/tinyobjloader-c"] + path = lib/tinyobjloader-c + url = http://cogarr.net/source/cgit.cgi/tinyobjloader-c/ +[submodule "lib/nng"] + path = lib/nng + url = http://cogarr.net/source/cgit.cgi/nng/ @@ -214,27 +214,29 @@ $(LIBLUA) : $(ILUADIR)/Makefile IRRMAKEFLAGS= IRRMADELIB= -ifeq ($(DEBUG),true) - IRRMAKEFLAGS+=NDEBUG=1 -endif ifeq ($(UNAME), Windows) ifeq ($(DEBUG),true) - IRRMAKEFLAGS+=dynamiclib_win32 + IRRMAKEFLAGS=sharedlib_win32 IRRMADELIB=$(LIRRDIR)/bin/Win32-gcc else IRRMAKEFLAGS=staticlib_win32 IRRMADELIB=$(LIRRDIR)/lib/Win32-gcc endif - IRRMAKEFLAGS+=-DNO_IRR_COMPILE_WITH_DIRECT3D_9_ else IRRMADELIB=$(LIRRDIR)/lib/Linux endif +ifeq ($(DEBUG),true) +else + IRRMAKEFLAGS+=NDEBUG=1 +endif + # Library - Irrlicht $(LIB_S_IRR) : $(IRRMADELIB)/libIrrlicht.a $(CP) $^ $@ $(IRRMADELIB)/libIrrlicht.a : $(LIRRDIR)/source/Irrlicht/Makefile + sed --in-place=OLD '107s/ -ld3dx9d//' lib/irrlicht/source/Irrlicht/Makefile cd $(LIRRDIR)/source/Irrlicht && $(MAKE) $(IRRMAKEFLAGS) $(LIB_D_IRR) : $(IRRMADELIB)/Irrlicht$(DYN_LIB_EXT) @@ -244,9 +246,16 @@ $(LIB_D_IRR) : $(IRRMADELIB)/Irrlicht$(DYN_LIB_EXT) $(BIN_DIR)/$(CLIENTNAME)/bin/Irrlicht$(DYN_LIB_EXT) : $(IRRMADELIB)/Irrlicht$(DYN_LIB_EXT) $(CP) $^ $@ -$(IRRMADELIB)/lib/Irrlicht$(DYN_LIB_EXT) : $(LIRRDIR)/source/Irrlicht/Makefile +$(IRRMADELIB)/Irrlicht$(DYN_LIB_EXT) : $(LIRRDIR)/source/Irrlicht/Makefile + sed --in-place=OLD '107s/ -ld3dx9d//' lib/irrlicht/source/Irrlicht/Makefile cd $(LIRRDIR)/source/Irrlicht && $(MAKE) $(IRRMAKEFLAGS) +ifeq ($(UNAME),Windows) + LUAJIT_ARGS:= TARGET_SYS=Windows +else + LUAJIT_ARGS:= +endif + # Library - Lua # Client $(BIN_DIR)/$(CLIENTNAME)/bin/lua51$(DYN_LIB_EXT) : $(LIB_D_LUA) @@ -257,26 +266,30 @@ $(BIN_DIR)/$(SERVERNAME)/bin/lua51$(DYN_LIB_EXT) : $(LIB_D_LUA) $(CP) $^ $@ $(LLUADIR)/src/libluajit$(STA_LIB_EXT) : $(LLUADIR)/src/Makefile +<<<<<<< HEAD $(CP) $(LLUADIR)/src && make "BUILDMODE= static" +======= + cd $(LLUADIR)/src && $(MAKE) $(LUAJIT_ARGS) "BUILDMODE= static" +>>>>>>> 3623bc70af309d1823c664a8129956da6c0e9c4a $(LIB_S_LUA) : $(LLUADIR)/src/libluajit$(STA_LIB_EXT) $(CP) $^ $@ $(LLUADIR)/src/lua51$(DYN_LIB_EXT) : $(LLUADIR)/src/Makefile - cd $(LLUADIR)/src && make "BUILDMODE= dynamic" + cd $(LLUADIR)/src && $(MAKE) $(LUAJIT_ARGS) "BUILDMODE= dynamic" $(LIB_D_LUA) : $(LLUADIR)/src/lua51$(DYN_LIB_EXT) $(CP) $^ $@ # Library - Bullet $(LBULDIR)/lib/libBulletCollision.a : $(LBULDIR)/Makefile - cd $(LBULDIR) && make BulletCollision + cd $(LBULDIR) && $(MAKE) BulletCollision $(LBULDIR)/lib/libBulletDynamics.a : $(LBULDIR)/Makefile - cd $(LBULDIR) && make BulletDynamics + cd $(LBULDIR) && $(MAKE) BulletDynamics $(LBULDIR)/lib/libLinearMath.a : $(LBULDIR)/Makefile - cd $(LBULDIR) && make LinearMath + cd $(LBULDIR) && $(MAKE) LinearMath $(LIB_D_BCO) : $(LBULDIR)/lib/libBulletCollision.a $(CP) $^ $@ @@ -292,23 +305,29 @@ $(LBULDIR)/Makefile : $(LBULDIR)/CMakeLists.txt # Library - NNG NNGFLAGS= -ifeq ($(DEBUG),true) - NNGCMAKEFLAGS += -DBUILD_SHARED_LIBS="TRUE" -endif $(BIN_DIR)/$(CLIENTNAME)/bin/libnng$(DYN_LIB_EXT) : $(LIB_D_NNG) $(CP) $^ $@ $(BIN_DIR)/$(SERVERNAME)/bin/libnng$(DYN_LIB_EXT) : $(LIB_D_NNG) $(CP) $^ $@ -$(LIB_S_NNG) : $(LNNGDIR)/libnng.a - $(CP) $^ $@ +$(LNNGDIR)/dynamic : $(LNNGDIR)/CMakeLists.txt + mkdir $@ -$(LIB_D_NNG) : $(LNNGDIR)/libnng$(DYN_LIB_EXT) - $(CP) $^ $@ +$(LNNGDIR)/dynamic/Makefile : $(LNNGDIR)/dynamic + cd $< && cmake $(CMAKE_FLAGS) -DBUILD_SHARED_LIBS="TRUE" ../ + +$(LIB_S_NNG) : $(LNNGDIR)/static/libnng$(STA_LIB_EXT) $(LNNGDIR)/static + cp $< $@ + +$(LIB_D_NNG) : $(LNNGDIR)/dynamic/libnng$(DYN_LIB_EXT) $(LNNGDIR)/dynamic + cp $< $@ + +$(LNNGDIR)/static/libnng$(STA_LIB_EXT) : $(LNNGDIR)/static $(LNNGDIR)/static/Makefile + cd $(LNNGDIR)/static && $(MAKE) nng -$(LNNGDIR)/libnng$(DYN_LIB_EXT) : $(LNNGDIR)/Makefile - cd $(LNNGDIR) && $(MAKE) nng +$(LNNGDIR)/dynamic/libnng$(DYN_LIB_EXT) : $(LNNGDIR)/dynamic $(LNNGDIR)/dynamic/Makefile + cd $(LNNGDIR)/dynamic && $(MAKE) nng $(LNNGDIR)/Makefile : $(LNNGDIR)/CMakeLists.txt @echo "LIB_OBJS were $(LIB_OBJS)" @@ -19,6 +19,12 @@ Documentation is built using [ldoc](https://github.com/stevedonovan/LDoc), just ## Misc. This project is under very heavy development. Expect lots of code churn for the foreseeable future. +#### Msys2 +Under msys2, I had to install the w32api headers `pacman -Syu msys/msys2-w32api-headers` +Then comment out the closeing curly brace at line 1128 of `/usr/include/w32api/tchar.h` +Then use the mingw64 shell in C:/msys2/mingw64.exe (make sure `gcc -dumpmachine` outputs `x86_64-w64-mingw32` or something and not `x86_64-pc-msys`) to `make DEBUG=true` +Then install the mingw64 version of make, and use it to create the makefile for lib/bullet + ### Roadmap 0. <del>Lua-defined textures</del> diff --git a/lib/irrlicht b/lib/irrlicht -Subproject 8945a2cdc781f29de7eb455bec053ef2fd7c99c +Subproject 2872c144ae57ee00679d526f1dc13212454be1b diff --git a/lib/nng b/lib/nng new file mode 160000 +Subproject ccc24a8e508131a2226474642a038baaa2cbcc8 diff --git a/lib/tinyobjloader-c b/lib/tinyobjloader-c new file mode 160000 +Subproject 226ea087b7ba5d699ab3c396ddd4ae4829a706d diff --git a/src/client/lua_api/gui/iguielement.cpp b/src/client/lua_api/gui/iguielement.cpp index f1a83b8..5c51c15 100644 --- a/src/client/lua_api/gui/iguielement.cpp +++ b/src/client/lua_api/gui/iguielement.cpp @@ -177,7 +177,7 @@ int getiguitext(lua_State* L){ lua_pop(L,2);// const wchar_t *t = el->getText(); size_t cstrlen = wcslen(t); - printf("In gui get text, cstrlen is %zu\n",cstrlen); + //printf("In gui get text, cstrlen is %zu\n",cstrlen); char output[cstrlen + 1];//+1 for \0 wcstombs(output,t,cstrlen); output[cstrlen] = '\0'; diff --git a/src/shared/lua_api/load_net.cpp b/src/shared/lua_api/load_net.cpp index 677f1d1..4b8475f 100644 --- a/src/shared/lua_api/load_net.cpp +++ b/src/shared/lua_api/load_net.cpp @@ -313,7 +313,7 @@ void gameloop_net(lua_State* L){ luaL_getmetatable(L,"net.stream");//func,{data=stream} lua_setmetatable(L,-2);//func,{stream} lua_call(L,1,0);// - printf("Finished calling gameloop, buf is %p, size is %zu\n",buf,size); + //printf("Finished calling gameloop, buf is %p, size is %zu\n",buf,size); nng_msg_free(msgp); printf("called nn_freemsg\n"); free(stream);//We manually set stream->data so free_stream would crash here |
