aboutsummaryrefslogtreecommitdiff
path: root/misc
Commit message (Collapse)AuthorAge
* Add content_rating tag to appdata (#8538)Carles Pastor Badosa2019-05-18
| | | This tag allows software stores (KDE discover, etc) to filter and know whether applications are suitable for young users.
* Bump version to 5.0.0sfan52019-03-04
|
* Add a basic kubernetes deployment file (#7979)Loïc Blot2018-12-15
| | | | * Add a basic kubernetes deployment file
* Windows: Cpack wix installer (#6153)adrido2018-10-26
| | | | | | Create CPack WIX msi Installer for RUN_IN_PLACE=0 builds Correct paths on Windows for RUN_IN_PLACE=0 Install only required font files Games have their own components, and "minimal" is optional
* Add release information to appdata file (#7771)Carles Pastor Badosa2018-10-16
|
* Fix msvc annoyances (#5963)adrido2017-06-27
| | | | | | | | | | | | | | | | | | | | * MSVC: Fix '/std:c++11' is not a valid compiler option * MSVC/MINGW: Define 'WIN32_LEAN_AND_MEAN' for the whole project In some obscure cases 'Windows.h" got includet before that definition, which leaded to compilation warnings+errors * MSVC: '/arch:SSE' is only available for x86 * MSVC: Fix float conversation * MSVC/MINGW: use winthreads on Windows * MSVC: 'USE_CMAKE_CONFIG' might be already definied by CMake build system * MSVC: Use all available cpu cores for compiling * Add missing include ctime and use std::time_t
* Gitlab-CI enhancements (#5629)Loïc Blot2017-04-21
|
* Update .appdata and .desktop filesJuhani Numminen2017-03-05
|
* Windows: Add manifest file and set "High DPI Aware" trueadrido2016-11-07
| | | | | This resolves washy font and incorrect mouse handling on Windows if a screen with high DPI is used.
* Update AppData file with more URLs and keywordssfan52016-08-12
|
* Add simulation categoryRémi Verschelde2016-08-10
|
* Finally set a window icon on X11est312016-07-05
| | | | | | | | | | Since the creation of minetest, it had no window icon on X11. Now we have one. The misc/minetest-xorg-icon-128.png file is a rendering of the misc/minetest.svg file with inkscape, created with something like: inkscape -z -e misc/minetest-xorg-icon-128.png -w 128 -h 128 misc/minetest.svg
* Fix screenshot links in AppData filesfan52016-01-09
|
* Rename minetest-icon.svg to minetest.svg - Fixes #1564HEXcube2015-09-03
| | | | | | -Complies with the Linux standard freedesktop icon naming specs: http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html#guidelines -Ensures compatibility with icon themes -Edit minetest.desktop, CMakeLists.txt and README.md to reflect this change
* Add Japanese translation of desktop fileRui2015-08-19
|
* Add Russian comment translation to minetest.desktopmich12015-04-27
|
* Revert the upper-case PROJECT_NAME nonsense that was part of #2402sfan52015-04-27
|
* Add Spanish comment translation to minetest.desktopngosang2015-04-12
|
* Clean up and tweak build systemShadowNinja2015-03-27
| | | | | | | | | | | | | | | | * Combine client and server man pages. * Update unit test options and available databases in man page. * Add `--worldname` to man page. * Fix a bunch of places where `"Minetest"` was used directly instead of `PROJECT_NAME`. * Disable server build by default on all operating systems. * Make `ENABLE_FREETYPE` not fail if FreeType isn't found. * Enable LevelDB, Redis, and FreeType detection by default. * Remove the `VERSION_PATCH_ORIG` hack. * Add option to search for and use system JSONCPP. * Remove broken LuaJIT version detection. * Rename `DISABLE_LUAJIT` to `ENABLE_LUAJIT`. * Rename `minetest_*` variables in `version.{h,cpp}` to `g_*`. * Clean up style of CMake files.
* Standalone bundle for OSX (w/ dependencies!)Pavel Puchkin2015-03-17
|
* Add Turkish comment translation to minetest.desktopMahmut Elmas2015-03-07
|
* Add german and french translation for minetest.desktopLoic Blot2015-02-12
| | | | This fixes #1573
* Improve desktop fileMarkus Koschany2015-01-20
|
* Fix OSX packaging finallyPavel Puchkin2014-12-16
| | | | Signed-off-by: Craig Robbins <kde.psych@gmail.com>
* Revert the icon name in minetest.desktopShadowNinja2014-09-21
| | | | | This reverts commit 7993696fc4b59354974059e1f8d6b3063d316411, which broke the icon on most distributions.
* Fix wrong Icon name in minetest.desktopsapier2014-08-22
|
* Add AppData fileDavid Gumberg2014-06-13
|
* Improved win32 file version informationsapier2014-03-02
|
* Compress texturesDavid Gumberg2013-06-18
|
* Fix things for cross-compiling using mingwPerttu Ahola2012-04-02
|
* Move icon files to misc/Perttu Ahola2012-03-20
|
* Include the freedesktop.org-standard .desktop file in misc/ to aid package ↵Perttu Ahola2011-12-01
| | | | makers
* Remove old stuff from misc/Perttu Ahola2011-12-01
|
* Moved the temporary mapgen test files and added a modified map.cpp too... ↵Perttu Ahola2011-05-19
These are probably useful in the next mapgen update and shouldn't be lost. --HG-- rename : src/noise.cpp.new => misc/noise.cpp rename : src/noise.h.new => misc/noise.h
ate *L, const std::vector<Area *> &areas, bool borders, bool data) { lua_newtable(L); size_t cnt = areas.size(); for (size_t i = 0; i < cnt; i++) { lua_pushnumber(L, areas[i]->id); push_area(L, areas[i], borders, data); lua_settable(L, -3); } } // Deserializes value and handles errors static int deserialization_helper(lua_State *L, AreaStore *as, std::istream &is) { try { as->deserialize(is); } catch (const SerializationError &e) { lua_pushboolean(L, false); lua_pushstring(L, e.what()); return 2; } lua_pushboolean(L, true); return 1; } // garbage collector int LuaAreaStore::gc_object(lua_State *L) { LuaAreaStore *o = *(LuaAreaStore **)(lua_touserdata(L, 1)); delete o; return 0; } // get_area(id, include_borders, include_data) int LuaAreaStore::l_get_area(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); AreaStore *ast = o->as; u32 id = luaL_checknumber(L, 2); bool include_borders = true; bool include_data = false; get_data_and_border_flags(L, 3, &include_borders, &include_data); const Area *res; res = ast->getArea(id); if (!res) return 0; push_area(L, res, include_borders, include_data); return 1; } // get_areas_for_pos(pos, include_borders, include_data) int LuaAreaStore::l_get_areas_for_pos(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); AreaStore *ast = o->as; v3s16 pos = check_v3s16(L, 2); bool include_borders = true; bool include_data = false; get_data_and_border_flags(L, 3, &include_borders, &include_data); std::vector<Area *> res; ast->getAreasForPos(&res, pos); push_areas(L, res, include_borders, include_data); return 1; } // get_areas_in_area(edge1, edge2, accept_overlap, include_borders, include_data) int LuaAreaStore::l_get_areas_in_area(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); AreaStore *ast = o->as; v3s16 minedge = check_v3s16(L, 2); v3s16 maxedge = check_v3s16(L, 3); bool include_borders = true; bool include_data = false; bool accept_overlap = false; if (lua_isboolean(L, 4)) { accept_overlap = lua_toboolean(L, 4); get_data_and_border_flags(L, 5, &include_borders, &include_data); } std::vector<Area *> res; ast->getAreasInArea(&res, minedge, maxedge, accept_overlap); push_areas(L, res, include_borders, include_data); return 1; } // insert_area(edge1, edge2, data, id) int LuaAreaStore::l_insert_area(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); AreaStore *ast = o->as; Area a(check_v3s16(L, 2), check_v3s16(L, 3)); size_t d_len; const char *data = luaL_checklstring(L, 4, &d_len); a.data = std::string(data, d_len); if (lua_isnumber(L, 5)) a.id = lua_tonumber(L, 5); if (!ast->insertArea(&a)) return 0; lua_pushnumber(L, a.id); return 1; } // reserve(count) int LuaAreaStore::l_reserve(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); AreaStore *ast = o->as; size_t count = luaL_checknumber(L, 2); ast->reserve(count); return 0; } // remove_area(id) int LuaAreaStore::l_remove_area(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); AreaStore *ast = o->as; u32 id = luaL_checknumber(L, 2); bool success = ast->removeArea(id); lua_pushboolean(L, success); return 1; } // set_cache_params(params) int LuaAreaStore::l_set_cache_params(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); AreaStore *ast = o->as; luaL_checktype(L, 2, LUA_TTABLE); bool enabled = getboolfield_default(L, 2, "enabled", true); u8 block_radius = getintfield_default(L, 2, "block_radius", 64); size_t limit = getintfield_default(L, 2, "block_radius", 1000); ast->setCacheParams(enabled, block_radius, limit); return 0; } // to_string() int LuaAreaStore::l_to_string(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); std::ostringstream os(std::ios_base::binary); o->as->serialize(os); std::string str = os.str(); lua_pushlstring(L, str.c_str(), str.length()); return 1; } // to_file(filename) int LuaAreaStore::l_to_file(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); AreaStore *ast = o->as; const char *filename = luaL_checkstring(L, 2); CHECK_SECURE_PATH(L, filename, true); std::ostringstream os(std::ios_base::binary); ast->serialize(os); lua_pushboolean(L, fs::safeWriteToFile(filename, os.str())); return 1; } // from_string(str) int LuaAreaStore::l_from_string(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); size_t len; const char *str = luaL_checklstring(L, 2, &len); std::istringstream is(std::string(str, len), std::ios::binary); return deserialization_helper(L, o->as, is); } // from_file(filename) int LuaAreaStore::l_from_file(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = checkobject(L, 1); const char *filename = luaL_checkstring(L, 2); CHECK_SECURE_PATH(L, filename, false); std::ifstream is(filename, std::ios::binary); return deserialization_helper(L, o->as, is); } LuaAreaStore::LuaAreaStore() : as(AreaStore::getOptimalImplementation()) { } LuaAreaStore::LuaAreaStore(const std::string &type) { #if USE_SPATIAL if (type == "LibSpatial") { as = new SpatialAreaStore(); } else #endif { as = new VectorAreaStore(); } } LuaAreaStore::~LuaAreaStore() { delete as; } // LuaAreaStore() // Creates an LuaAreaStore and leaves it on top of stack int LuaAreaStore::create_object(lua_State *L) { NO_MAP_LOCK_REQUIRED; LuaAreaStore *o = (lua_isstring(L, 1)) ? new LuaAreaStore(lua_tostring(L, 1)) : new LuaAreaStore(); *(void **)(lua_newuserdata(L, sizeof(void *))) = o; luaL_getmetatable(L, className); lua_setmetatable(L, -2); return 1; } LuaAreaStore *LuaAreaStore::checkobject(lua_State *L, int narg) { NO_MAP_LOCK_REQUIRED; luaL_checktype(L, narg, LUA_TUSERDATA); void *ud = luaL_checkudata(L, narg, className); if (!ud) luaL_typerror(L, narg, className); return *(LuaAreaStore **)ud; // unbox pointer } void LuaAreaStore::Register(lua_State *L) { lua_newtable(L); int methodtable = lua_gettop(L); luaL_newmetatable(L, className); int metatable = lua_gettop(L); lua_pushliteral(L, "__metatable"); lua_pushvalue(L, methodtable); lua_settable(L, metatable); // hide metatable from Lua getmetatable() lua_pushliteral(L, "__index"); lua_pushvalue(L, methodtable); lua_settable(L, metatable); lua_pushliteral(L, "__gc"); lua_pushcfunction(L, gc_object); lua_settable(L, metatable); lua_pop(L, 1); // drop metatable luaL_openlib(L, 0, methods, 0); // fill methodtable lua_pop(L, 1); // drop methodtable // Can be created from Lua (AreaStore()) lua_register(L, className, create_object); } const char LuaAreaStore::className[] = "AreaStore"; const luaL_Reg LuaAreaStore::methods[] = { luamethod(LuaAreaStore, get_area), luamethod(LuaAreaStore, get_areas_for_pos), luamethod(LuaAreaStore, get_areas_in_area), luamethod(LuaAreaStore, insert_area), luamethod(LuaAreaStore, reserve), luamethod(LuaAreaStore, remove_area), luamethod(LuaAreaStore, set_cache_params), luamethod(LuaAreaStore, to_string), luamethod(LuaAreaStore, to_file), luamethod(LuaAreaStore, from_string), luamethod(LuaAreaStore, from_file), {0,0} };