03-24-2014, 03:12 AM
As a result of STRWarrior's posts on terrain generation I had a look at embedding luaJIT into MCServer. In terms of code it should pose no problems, its API and ABI compatible. However it is much harder to build. They provide a Makefile and a batch script for compiling and form what I've seen rewriting the build system in cmake is not an option.
This leaves me with four possible plans:
1) Detect make and run their makefile, otherwise try to get a windows dev console and use the batch script, otherwise fall-back to lua.
2) Use the luadist CMakeList on x86, otherwise lua.
3) Use the luaDist CMakeList on x86, otherwise as per 1)
4) Ask the user to build luaJIT, otherwise use lua.
Option 1 is the most likely to work but is complicated. We already discussed that the windows dev console wont work in relation to tolua so this would probably be POSIX/mingw only.
Option 2 is the most likely to work on windows and is the simplest automatic option but means we lose luaJIT where we most need it, Android and pis.
Option 3 is the most complicated and will likely be very buggy but covers the most systems automatically.
Option 4 is simplest for write but is hardest for users.
This leaves me with four possible plans:
1) Detect make and run their makefile, otherwise try to get a windows dev console and use the batch script, otherwise fall-back to lua.
2) Use the luadist CMakeList on x86, otherwise lua.
3) Use the luaDist CMakeList on x86, otherwise as per 1)
4) Ask the user to build luaJIT, otherwise use lua.
Option 1 is the most likely to work but is complicated. We already discussed that the windows dev console wont work in relation to tolua so this would probably be POSIX/mingw only.
Option 2 is the most likely to work on windows and is the simplest automatic option but means we lose luaJIT where we most need it, Android and pis.
Option 3 is the most complicated and will likely be very buggy but covers the most systems automatically.
Option 4 is simplest for write but is hardest for users.