diff options
author | sfan5 <sfan5@live.de> | 2021-01-20 15:01:48 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2021-01-21 00:52:31 +0100 |
commit | d92da47697a2520f50c1324fcff11617770deb32 (patch) | |
tree | d3d557f92499cd62947e3290eeffc9417c79ae5b | |
parent | 7f25823bd4f1a822449eb783ee555651a89ce9de (diff) | |
download | minetest-d92da47697a2520f50c1324fcff11617770deb32.tar.gz minetest-d92da47697a2520f50c1324fcff11617770deb32.tar.bz2 minetest-d92da47697a2520f50c1324fcff11617770deb32.zip |
Improve --version output to include Lua(JIT) version
-rw-r--r-- | src/main.cpp | 15 | ||||
-rw-r--r-- | src/version.cpp | 5 |
2 files changed, 17 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index af6d307dc..f7238176b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -47,11 +47,19 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "gui/guiEngine.h" #include "gui/mainmenumanager.h" #endif - #ifdef HAVE_TOUCHSCREENGUI #include "gui/touchscreengui.h" #endif +// for version information only +extern "C" { +#if USE_LUAJIT + #include <luajit.h> +#else + #include <lua.h> +#endif +} + #if !defined(SERVER) && \ (IRRLICHT_VERSION_MAJOR == 1) && \ (IRRLICHT_VERSION_MINOR == 8) && \ @@ -351,6 +359,11 @@ static void print_version() #ifndef SERVER std::cout << "Using Irrlicht " IRRLICHT_SDK_VERSION << std::endl; #endif +#if USE_LUAJIT + std::cout << "Using " << LUAJIT_VERSION << std::endl; +#else + std::cout << "Using " << LUA_RELEASE << std::endl; +#endif std::cout << g_build_info << std::endl; } diff --git a/src/version.cpp b/src/version.cpp index 241228a6a..c555f30af 100644 --- a/src/version.cpp +++ b/src/version.cpp @@ -33,11 +33,12 @@ const char *g_version_hash = VERSION_GITHASH; const char *g_build_info = "BUILD_TYPE=" BUILD_TYPE "\n" "RUN_IN_PLACE=" STR(RUN_IN_PLACE) "\n" + "USE_CURL=" STR(USE_CURL) "\n" +#ifndef SERVER "USE_GETTEXT=" STR(USE_GETTEXT) "\n" "USE_SOUND=" STR(USE_SOUND) "\n" - "USE_CURL=" STR(USE_CURL) "\n" "USE_FREETYPE=" STR(USE_FREETYPE) "\n" - "USE_LUAJIT=" STR(USE_LUAJIT) "\n" +#endif "STATIC_SHAREDIR=" STR(STATIC_SHAREDIR) #if USE_GETTEXT && defined(STATIC_LOCALEDIR) "\n" "STATIC_LOCALEDIR=" STR(STATIC_LOCALEDIR) |