366 Commits

Author SHA1 Message Date
adrido
90dccf571c Add required packages via NuGet 2016-05-31 21:37:58 +02:00
adrido
506d7bbcc2 Setup VisualStudio project files 2016-05-31 21:37:58 +02:00
Rogier
38c0ee9962 Add date of generation and generator to build_config.h
In preparation for MSVC compilation support
2016-05-31 21:37:58 +02:00
Rogier
db11689b36 Improve comment in build_config.h / build_config.h.in
In preparation for MSVC compilation support
2016-05-31 21:37:58 +02:00
Rogier
82ba727a2d Rename cmake_config.h to build_config.h, and don't make it optional
In preparation for MSVC compilation support
2016-05-31 21:37:58 +02:00
Rogier
984a4e3a97 Rename the file 'version' to 'base-version'
This better reflects its purpose

Also removed a redundant check for existence of the file in CMakeLists.txt

In preparation for MSVC compilation support
2016-05-31 21:37:58 +02:00
addi
797d671980 Fix cpp '#warning', which is not recognised on windows
In preparation for MSVC compilation support
2016-05-31 21:37:58 +02:00
adrido
925e355715 Standard C++ fopen instead of POSIX open
This is required to be able to build on Windows.
open() is not a standard ANSI C/C++ function and only available on POSIX systems.
Using fopen() provides better portability.
2016-05-31 21:37:58 +02:00
adrido
c897c75463 Correct include of BlockPos.h 2016-05-31 21:37:57 +02:00
adrido
5761f103e1 Add porting.h
In preparation for MSVC compilation support
2016-05-31 21:37:57 +02:00
Rogier
e2b5dce3e3 Update Changelog 2016-05-31 21:37:57 +02:00
Rogier
80a4e4b665 Fix blocks not found while minetest is running, using SQLite3 backend
If mapping while minetest is running and modifying blocks, modified
blocks queried by RowID, would not be found by SQLite3. Querying
by I64 exclusively did not cause such behavior.
2016-05-30 13:09:29 +02:00
Rogier
dbec678f6b Close database when done
This prevents messages 'Connection reset by peer' in the postgresql log file.

It might have benefits for other databases as well ?
2016-05-23 12:46:25 +02:00
Rogier
ba9166fd79 Add support for the official postgresql backend implementation
The connection strings and database structure of the previous unofficial
versions (by Shadowninja and johhnyjoy) are also still supported, but
support will be removed in a future version of minetestmapper.
2016-05-22 23:43:36 +02:00
proller
3ffda4ab57 Final std::ws skipping not needed when parsing block coordinates, and it makes is.fail() == true 2016-05-17 16:17:41 +02:00
Rogier
22384eb9db Disable some unused code to avoid the resulting compiler warning 2016-01-18 18:57:58 +01:00
Rogier
f54afcbd99 Remove spurious postgresql include
THis prevents building when postgresql is not installed.
2016-01-18 18:53:53 +01:00
Rogier
56af6644fb Improve parsing of heightmap colors file
Error detection was not entirely correct
2016-01-17 10:37:52 +01:00
Rogier
f908282a16 Improve parsing of textual block ID (i64 or axyz)
- Accept trailing spaces
- Fix error detection (use 'fail()' instead of 'bad()')
2016-01-17 10:37:52 +01:00
Rogier
570ed84fd2 Convert text drawn on the map to ISO8859-2 (which is what libgd uses)
Using non-ISO8859-2 encoded text (e.g. utf-8), or anything else,
may result in garbage characters.
2016-01-17 10:37:52 +01:00
Rogier
e47e3bcd3a Add iconv cmake module
Needed to make the libgd draw characters correctly.

Obtained from
c361a45cfb/cmake/Modules/FindIconv.cmake
2016-01-17 10:37:51 +01:00
Rogier
304d0ef564 Fix to parsing of geometry flags - the last flag could be overlooked. 2016-01-17 10:37:51 +01:00
Rogier
1ad247ddc4 Add an option to draw 'ignore' nodes.
This does require a color definition to be added to the colors file.

Implemented as a generic option to draw or ignore types of nodes
(i.e. 'air', 'ignore'). Ignoring specific named nodes from the
command-line is not (yet??) supported.
2016-01-17 10:37:51 +01:00
Rogier
61fa760af5 Document 'air' and 'ignore' flags in colors.txt 2016-01-17 10:37:51 +01:00
Rogier
ca66635176 Add a colors.txt node flag for air-type nodes (nodes will be treated as air)
This means that they are only drawn if the option '--drawair'
is specified on the command-line. Else they are ignored.
2016-01-17 10:37:51 +01:00
Rogier
b3019c1804 Add a colors.txt node flag for ignore-type nodes (nodes will be ignored)
Ignoring a node is more efficient than drawing it with full transparency.
This is noticeable when there are a large number of such nodes.
2016-01-17 10:37:51 +01:00
Rogier
5660f71175 Add support for setting flags for nodes in the colors.txt file.
These will allow special treatement for such nodes.
See subsequent commits
2016-01-17 10:37:51 +01:00
Rogier
99b3134810 Add option to draw arrows on the map 2016-01-17 10:37:51 +01:00
Rogier
00920947af Add a geometry syntax using angle and length (2D only)
Draw a line with an angle of 30 degrees and a lenght of 200:
	--drawline <x>,<y>@30+200
2016-01-17 10:37:51 +01:00
Rogier
a09819285a Fix end-of-string detection for some options 2016-01-17 10:37:51 +01:00
Rogier
e6d52279ac Make sure all options are case-agnostic for their parameters
I.e. the following are now equivalent:
	'--backend leveldb'
	'--backend LEVELDB'
	'--backend LevelDB'
2016-01-17 10:37:51 +01:00
Rogier
326d609675 Use strlower() instead of tolower() and strcasecmp() where possible. 2016-01-17 10:37:51 +01:00
Rogier
df9a03f416 Create strlower() function to convert std::string to lowercase. 2016-01-17 10:37:51 +01:00
Rogier
333eded9f3 Mention that postgresql is not an official minetest backend in the manual 2016-01-17 10:37:51 +01:00
Rogier
8288c85ca2 Fix build when only postgresql is enabled
Build would fail, requesting that a database be configured...
2016-01-17 10:37:51 +01:00
Rogier
03926420d0 Implement bounded block-list query for postgresql
i.e. allow minetestmapper to query the database for a list of
blocks in a specific range (corresponding to the requested geometry),
instead of always obtaining a full list off all blocks.

As postgresql is the only database which supports this efficiently,
this option is only effective for postgresql.
2016-01-17 10:37:51 +01:00
Rogier
2ec0988e32 Abstract & improve some stream operations, and make them idempotent.
<stream>.eof() may require the stream to be read (peeked) before giving the
correct result. But it can't be peeked if already at EOF - see below.

<stream>.peek() is not idempotent:
If the stream is at EOF, but not known to be, it sets eofbit.
However, if the stream is known to be at EOF, it sets the failbit :-(
2016-01-17 10:37:51 +01:00
Rogier
8f6c9d7557 Improve an error message 2016-01-17 10:37:51 +01:00
Rogier
4041993672 Fix incorrect handling of some options when backend==auto 2016-01-17 10:37:50 +01:00
Rogier
23dad0dbf4 Miscellaneous improvements to the manual 2016-01-17 10:37:50 +01:00
Rogier
3d24b6216f Improve syntax for code blocks in manual
Use:
	<some text>::

		<some code>

Instead of:
	<some text>:

		``<some code>``
2016-01-17 10:37:50 +01:00
Rogier
74d4553229 Add information about minetestmappergui to manual 2016-01-17 10:37:50 +01:00
Rogier
346f8ef24e Document the different reported world statistics (geometries) in manual.
(these are reported with --verbose and --verbose=2)
2016-01-17 10:37:50 +01:00
Rogier
c71aca51de Make sure no HTML documentation is generated when conversion causes warnings
Previously, the HTML documentation would be generated even if there were
warnings, and a subsequent build would consider the documentation
up-to-date.

It seems like CMake has no option to remove a (possibly partially generated!)
target if the command exits with a non-zero status...
2016-01-17 10:37:50 +01:00
Rogier
64b04d18dc Document concurrent minetest & minetestmapper use in the manual.
Bottom-line:
	leveldb: impossible
	sqlite: OK when running a recent minetest
	postgresql and redis: OK
2016-01-17 10:37:50 +01:00
Rogier
7c43e42ea9 Fix parsing of config file where '=' is not preceded by space 2015-12-16 19:16:22 +01:00
Rogier
919595c614 Add postgresql support
Supports both ShadowNinja's implementation:
  https://github.com/ShadowNinja/minetest/tree/PostgreSQL
and johnnyjoy's implementation:
  https://forum.minetest.net/viewtopic.php?f=3&t=12851
  4d537fe53a
2015-12-16 15:40:45 +01:00
Rogier
4e8441d322 Use Settings class to obtain world chunksize 2015-12-16 15:40:45 +01:00
Rogier
fcedce3e13 Use Settings class in redis backend 2015-12-16 15:17:54 +01:00
Rogier
c08b218f71 Add Settings class for reading config files 2015-12-16 15:17:54 +01:00