get engine information * * Returns a table with engine information. * * @name sys.get_engine_info * @return engine_info [type:table] table with engine information in the following fields: * * `version` * : [type:string] The current Defold engine version, i.e. "1.2.96" * * `version_sha1` * : [type:string] The SHA1 for the current engine build,
| 881 | * ``` |
| 882 | */ |
| 883 | static int Sys_GetEngineInfo(lua_State* L) |
| 884 | { |
| 885 | int top = lua_gettop(L); |
| 886 | |
| 887 | dmSys::EngineInfo info; |
| 888 | dmSys::GetEngineInfo(&info); |
| 889 | |
| 890 | lua_newtable(L); |
| 891 | lua_pushliteral(L, "version"); |
| 892 | lua_pushstring(L, info.m_Version); |
| 893 | lua_rawset(L, -3); |
| 894 | lua_pushliteral(L, "version_sha1"); |
| 895 | lua_pushstring(L, info.m_VersionSHA1); |
| 896 | lua_rawset(L, -3); |
| 897 | lua_pushliteral(L, "is_debug"); |
| 898 | lua_pushboolean(L, info.m_IsDebug); |
| 899 | lua_rawset(L, -3); |
| 900 | |
| 901 | assert(top + 1 == lua_gettop(L)); |
| 902 | return 1; |
| 903 | } |
| 904 | |
| 905 | /*# get application information |
| 906 | * |
nothing calls this directly
no test coverage detected