Go to file
Rogier a270c6077b Add an option to prevent keeping sqlite3 database locked for too long
While prescanning a large database, minetestmapper may keep the database
locked for too long, causing minetest to complain, and even bail out
sometimes. Minetest will print warnings like:

	SQLite3 database has been locked for <duration>

The new option --sqlite3-limit-prescan-query-size limits the number
of records queried from the database in a single query, thus limiting
the duration of the lock.

If minetest kept the database locked for 1 second or more, *and* if
the database was modified in that time, minetestmapper will issue a warning,
and suggest using --sqlite3-limit-prescan-query-size.
2016-08-03 12:14:42 +02:00
MSVC Add a function to obtain relative millisecond-timestamps 2016-08-03 11:31:38 +02:00
cmake Detect libstdc++ ABI incompatibility to allow compiling using clang again. 2016-06-28 11:44:09 +02:00
doc Add an option to prevent keeping sqlite3 database locked for too long 2016-08-03 12:14:42 +02:00
dumpnodes Explicitly set the color of xpanes:bar_* only when computing it failed 2015-11-26 12:00:12 +01:00
.gitattributes Setup VisualStudio project files 2016-05-31 21:37:58 +02:00
.gitignore Add Batch script to update versioninfo.h file 2016-05-31 21:37:58 +02:00
AUTHORS Document and (attempt to) clarify licensing situation 2014-03-26 11:04:29 +01:00
BlockPos.cpp Remove some old debug code 2016-07-18 10:17:47 +02:00
BlockPos.h Remove some old debug code 2016-07-18 10:17:47 +02:00
CMakeCPackLists.txt Make cpack fail if the current git commit id does not match the one at cmake time. 2016-08-03 11:05:12 +02:00
CMakeLists.txt Make cpack fail if the current git commit id does not match the one at cmake time. 2016-08-03 11:05:12 +02:00
COPYING Document and (attempt to) clarify licensing situation 2014-03-26 11:04:29 +01:00
Changelog Add an option to prevent keeping sqlite3 database locked for too long 2016-08-03 12:14:42 +02:00
CharEncodingConverter.cpp Rename cmake_config.h to build_config.h, and don't make it optional 2016-05-31 21:37:58 +02:00
CharEncodingConverter.h Convert text drawn on the map to ISO8859-2 (which is what libgd uses) 2016-01-17 10:37:52 +01:00
CharEncodingConverterIConv.cpp Fix compilation failure on FreeBSD using gcc4.x 2016-07-18 10:17:54 +02:00
CharEncodingConverterIConv.h Convert text drawn on the map to ISO8859-2 (which is what libgd uses) 2016-01-17 10:37:52 +01:00
Color.cpp Use strlower() instead of tolower() and strcasecmp() where possible. 2016-01-17 10:37:51 +01:00
Color.h Add a colors.txt node flag for air-type nodes (nodes will be treated as air) 2016-01-17 10:37:51 +01:00
LICENSE Document and (attempt to) clarify licensing situation 2014-03-26 11:04:29 +01:00
LICENSE.BSD-2clause Document and (attempt to) clarify licensing situation 2014-03-26 11:04:29 +01:00
LICENSE.LGPLv2.1 Document and (attempt to) clarify licensing situation 2014-03-26 11:04:29 +01:00
PixelAttributes.cpp When using transparency, don't compute new value when pixel is already fully opaque 2015-11-13 12:29:42 +01:00
PixelAttributes.h Use cstdint instead of stdint.h to (hopefully) fix any problems caused by C/C++ mismatches 2015-05-31 07:08:25 +02:00
PlayerAttributes.cpp Player attributes moved to separate class. 2012-09-01 16:40:18 +02:00
PlayerAttributes.h Player attributes moved to separate class. 2012-09-01 16:40:18 +02:00
README.rst Small update to README.rst 2016-06-18 18:25:52 +02:00
Settings.cpp Fix parsing of config file where '=' is not preceded by space 2015-12-16 19:16:22 +01:00
Settings.h Add Settings class for reading config files 2015-12-16 15:17:54 +01:00
TileGenerator.cpp Fix various compiler warnings on MSVC 2016-06-18 11:45:02 +02:00
TileGenerator.h Fix --prescan-world=disabled-force does not work 2016-06-14 04:32:36 +02:00
ZlibDecompressor.cpp Fix various compiler warnings on MSVC 2016-06-18 11:45:02 +02:00
ZlibDecompressor.h Improve error messages for zlib decompression errors 2014-05-22 10:41:12 +02:00
base-version Create new release (20160531) 2016-05-31 22:02:43 +02:00
build_config.h.in Detect libstdc++ ABI incompatibility to allow compiling using clang again. 2016-06-28 11:44:09 +02:00
colors-average-alpha.txt Update color files for added nodes in default minetest game 2015-11-25 01:31:54 +01:00
colors-cumulative-alpha.txt Update color files for added nodes in default minetest game 2015-11-25 01:31:54 +01:00
colors.txt Update color files for added nodes in default minetest game 2015-11-25 01:31:54 +01:00
config.h Rename cmake_config.h to build_config.h, and don't make it optional 2016-05-31 21:37:58 +02:00
db-leveldb.cpp Detect libstdc++ ABI incompatibility to allow compiling using clang again. 2016-06-28 11:44:09 +02:00
db-leveldb.h Implement bounded block-list query for postgresql 2016-01-17 10:37:51 +01:00
db-postgresql.cpp Add support for the official postgresql backend implementation 2016-05-22 23:43:36 +02:00
db-postgresql.h Make minetestmapper compile on fedora 2016-06-18 00:31:02 +02:00
db-redis.cpp Disable some unused code to avoid the resulting compiler warning 2016-01-18 18:57:58 +01:00
db-redis.h Implement bounded block-list query for postgresql 2016-01-17 10:37:51 +01:00
db-sqlite3.cpp Add an option to prevent keeping sqlite3 database locked for too long 2016-08-03 12:14:42 +02:00
db-sqlite3.h Add an option to prevent keeping sqlite3 database locked for too long 2016-08-03 12:14:42 +02:00
db.h Close database when done 2016-05-23 12:46:25 +02:00
heightmap-colors-rainbow.txt Add rainbow colors configuration file for heightmap 2015-02-20 13:10:09 +01:00
heightmap-colors.txt Allow reading heightmap colors from file, and use separate option for nodes file 2015-02-20 13:10:09 +01:00
heightmap-nodes.txt Update color files for added nodes in default minetest game 2015-11-25 01:31:54 +01:00
mapper.cpp Add an option to prevent keeping sqlite3 database locked for too long 2016-08-03 12:14:42 +02:00
minetest-database.h Fix various compiler warnings on MSVC 2016-06-18 11:45:02 +02:00
minetestmapper.sln Setup VisualStudio project files 2016-05-31 21:37:58 +02:00
package-description.txt Add postgresql support 2015-12-16 15:40:45 +01:00
porting.h Add a function to obtain relative millisecond-timestamps 2016-08-03 11:31:38 +02:00
porting_posix.h Add a function to obtain relative millisecond-timestamps 2016-08-03 11:31:38 +02:00
porting_win32.h Add a function to obtain relative millisecond-timestamps 2016-08-03 11:31:38 +02:00
types.h Use a common ustring type definition instead of different custom versions 2014-05-22 10:12:03 +02:00
util.h Fix various compiler warnings on MSVC 2016-06-18 11:45:02 +02:00

README.rst

Minetest Mapper
###############

A tool to generate maps of minetest and freeminer worlds.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Quick links (functional on github. Elsewhere possibly not):

:All features:		`<doc/features.rst>`_
:User manual:		`<doc/manual.rst>`_
:Changelog:		`<Changelog>`_
:Building:		`<doc/build-instructions.rst>`_
:Github:		`<https://github.com/Rogier-5/minetest-mapper-cpp>`_
:Submitting bugs:	`<https://github.com/Rogier-5/minetest-mapper-cpp/issues>`_
:Binary downloads:	`<https://github.com/Rogier-5/minetest-mapper-cpp/wiki/Downloads>`_
:Generating colors.txt: `<dumpnodes/README.dumpnodes>`_

Features (short list)
=====================

Map Generation Features
-----------------------

* Support for both minetest and freeminer worlds
* Support for sqlite3, postgresql, leveldb and redis map databases
* Generate a subsection of the map, or a full map
  (but note that the size of generated images is limited)
* Generate regular maps or height-maps
* All colors for regular or height maps are configurable
* Draw player positions
* Draw different geometric figures, or text on the map
* Draw the map at a reduced scale. E.g. 1:4.
* Draw a scale on the left and/or top side of the map,
  and/or a height scale (for height maps) on the bottom.
* Optionally draw some nodes transparently (e.g. water)
* Includes User Manual
* Includes scripts to aid in generating a color definition file.

Build Features
--------------
* Supports both the gcc and clang compiler suites
* Supports MSVC building on Windows (with SQLite3 and LevelDB)

  * With automatic downloading of all but one of the required libraries.

* Build rpm, deb and/or tar.gz installation
  packages. Or simply type 'make install'.

Quick Start
===========

Windows
-------

Check the download page to obtain a compiled version:
`<https://github.com/Rogier-5/minetest-mapper-cpp/wiki/Downloads>`_

Or check the building instructions for compiling using MSVC:
`<doc/build-instructions.rst>`_.

Install Dependencies
--------------------

Make sure development versions of the following packages are installed.
For more detailed instructions, see `<doc/build-instructions.rst>`_.

**Libraries:**

* zlib
* libgd
* sqlite3 (not mandatory. See `<doc/build-instructions.rst>`_.
* postgresql (if postgresql support is desired)
* leveldb (if leveldb support is desired)
* hiredis (if redis support is desired)

**Build environment:**

* C++ compiler suite (clang or gcc)
* cmake
* make

**Other:**

* python-docutils (if documentation in html format is desired)

Compile
-------

Plain:

::

    cmake .
    make

With levelDB and Redis support:

::

    cmake -DENABLE_LEVELDB=true -DENABLE_REDIS=true .
    make

Generate a Map
----------------

After compilation, and optional installation, minetestmapper is started as follows:

('\\' is a continuation character - the command-line continues
on the next line. Type return only after the line that does
not end with the continuation character)


::

    minetestmapper \
	--input <world-directory> \
	--output <image-file-name.png>

If the world is not too large, and if minetestmapper is installed in
a  system directory, it will most likely work as expected.

Possibly, minetestmapper will not be able to find a colors.txt file. If that happens,
the colors.txt file can be specified on the command-line:

::

    minetestmapper \
	--input <world-directory> \
	--output <image-file-name.png> \
	--colors <filename>

Or the colors.txt file must be installed in a location where minetestmapper will find it.
A colors.txt file (named ``colors.txt``, in lowercase) in the world's directory will certainly
be found. Depending on the system and the configuration, other locations are available. Use the
following command to find out which:

::

    minetestmapper \
	--input <world-directory> \
	--output <image-file-name.png> \
	--verbose-search-colors=2

Manual
======

For more elaborate compilation and installation documentation, please consult
the build manual: `<doc/build-instructions.rst>`_.

For more elaborate usage instruction, please consult the user manual: `<doc/manual.rst>`_.