Add LGI version number to --version output

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2016-10-29 13:13:34 +02:00
parent e1d05e5209
commit dfa7d44ebd
1 changed files with 8 additions and 3 deletions

View File

@ -46,6 +46,9 @@ eprint_version(void)
else else
lua_pop(L, 1); lua_pop(L, 1);
/* Either push version number or error message onto stack */
(void) luaL_dostring(L, "return require('lgi.version')");
#ifdef WITH_DBUS #ifdef WITH_DBUS
const char *has_dbus = ""; const char *has_dbus = "";
#else #else
@ -66,10 +69,12 @@ eprint_version(void)
" • Compiled against %s (running with %s)\n" " • Compiled against %s (running with %s)\n"
" • D-Bus support: %s\n" " • D-Bus support: %s\n"
" • execinfo support: %s\n" " • execinfo support: %s\n"
" • RandR 1.5 support: %s\n", " • RandR 1.5 support: %s\n"
" • LGI version: %s\n",
AWESOME_VERSION, AWESOME_RELEASE, AWESOME_VERSION, AWESOME_RELEASE,
LUA_RELEASE, lua_tostring(L, -1), LUA_RELEASE, lua_tostring(L, -2),
has_dbus, has_execinfo, has_RandR15); has_dbus, has_execinfo, has_RandR15,
lua_tostring(L, -1));
lua_close(L); lua_close(L);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);