diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f2827e2f..1278d8543 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,6 +96,11 @@ option(WITH_DEVKEYS "Include various extra keybindings for dev functions" ON) option(USE_SYSTEM_LIBGLEW "Use the system's libglew" OFF) option(USE_SYSTEM_LIBLUA "Use the system's liblua" OFF) option(PROFILER_ENABLED "Build pioneer with profiling support built-in." OFF) +option(REMOTE_LUA_REPL "Enable remote LUA console" OFF) + +if (REMOTE_LUA_REPL) + set(REMOTE_LUA_REPL_PORT 12345 CACHE STRING "TCP port for remote LUA console") +endif (REMOTE_LUA_REPL) list(APPEND SRC_FOLDERS src/ diff --git a/buildopts.h.cmakein b/buildopts.h.cmakein index f7976f4ad..850b26f65 100644 --- a/buildopts.h.cmakein +++ b/buildopts.h.cmakein @@ -4,9 +4,11 @@ #define PIONEER_EXTRAVERSION "@PROJECT_VERSION_GIT@" #define PIONEER_VERSION "@PROJECT_VERSION@" #define PIONEER_DATA_DIR "@_PIONEER_DATA_DIR@" +#define REMOTE_LUA_REPL_PORT @REMOTE_LUA_REPL_PORT@ #cmakedefine01 WITH_OBJECTVIEWER #cmakedefine01 WITH_DEVKEYS #cmakedefine01 HAS_FPE_OPS +#cmakedefine REMOTE_LUA_REPL #endif /* BUILDOPTS_H */ diff --git a/src/lua/LuaConsole.cpp b/src/lua/LuaConsole.cpp index 1dad2b0ea..237d96392 100644 --- a/src/lua/LuaConsole.cpp +++ b/src/lua/LuaConsole.cpp @@ -1,9 +1,11 @@ // Copyright © 2008-2020 Pioneer Developers. See AUTHORS.txt for details // Licensed under the terms of the GPL v3. See licenses/GPL-3.txt -#include "LuaConsole.h" +#include "buildopts.h" + #include "FileSystem.h" #include "KeyBindings.h" +#include "LuaConsole.h" #include "LuaManager.h" #include "LuaUtils.h" #include "Pi.h"