Minetestmapper rewritten into C++

User avatar
sfan5
Moderator
 
Posts: 3804
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Fri Mar 27, 2015 22:01

You should be able to hold shift and right click into the explorer windows and start a shell by choosing the "Start command line here" (or similar) option.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)
 

est31
Developer
 
Posts: 173
Joined: Mon Dec 29, 2014 01:49

Re: Minetestmapper rewritten into C++

by est31 » Sat May 30, 2015 06:31

Hi Argos, I have a build failure with the latest commit: https://gist.github.com/anonymous/c894b3737759127fbae4
Adding the following line to the file db.h made it build:

#define __STDC_LIMIT_MACROS

This page gives more explanations why.
Can you add that line?
 

Argos
Member
 
Posts: 40
Joined: Tue Mar 04, 2014 21:47

Re: Minetestmapper rewritten into C++

by Argos » Sat May 30, 2015 19:20

est31 wrote:Hi Argos, I have a build failure with the latest commit: https://gist.github.com/anonymous/c894b3737759127fbae4
Adding the following line to the file db.h made it build:

#define __STDC_LIMIT_MACROS

This page gives more explanations why.
Can you add that line?


Hi est31,

I did some initial investigation, and found this additional information: https://sourceware.org/bugzilla/show_bug.cgi?id=15366 . I don't know if you are compiling according to the standard C++11 (this is reported when running
Code: Select all
cmake .
). If you are, it seems the cause may be a bug in your stdint.h (which is not being compatible with C++11)...

I'll investigate further, and make a patch if necessary. I am quite busy at the moment, but I hope I'll manage somewhere next week - depending on the amount of work involved.

It would be helpful if you could provide some additional information on your environment, so that I can try and reproduce the problem: which distribution and distribution release are you using ? Which compiler and compiler version ? Which version of glibc (or other C library) ? Does cmake report that it is using C++11 or C++0x ?

I also get the impression that a fix for this problem might possibly be for minetestmapper to include 'cstdint' instead of 'stdint.h'. I pushed a quick patch to a new 'stdint' branch. Could you test that, to see whether it solves your problem ?
My mods & tools:
My fork of Minetestmapper - much improved - features, manual, Windows downloads
[MOD] Wrench (rotate:wrench) - improved screwdriver alternative - manual, download
 

est31
Developer
 
Posts: 173
Joined: Mon Dec 29, 2014 01:49

Re: Minetestmapper rewritten into C++

by est31 » Sat May 30, 2015 23:48

Yes, cmake reports C++11 usage. The changes from the stdint make it compile.
 

Argos
Member
 
Posts: 40
Joined: Tue Mar 04, 2014 21:47

Re: Minetestmapper rewritten into C++

by Argos » Sun May 31, 2015 05:18

est31 wrote:Yes, cmake reports C++11 usage. The changes from the stdint make it compile.

Thanks. Made the fix definitive & pushed it to the master branch.

I changed the commit message, so the actual commit is not the same as the previous one from the (now deleted) stdint branch.
My mods & tools:
My fork of Minetestmapper - much improved - features, manual, Windows downloads
[MOD] Wrench (rotate:wrench) - improved screwdriver alternative - manual, download
 

User avatar
AsgardBeast
New member
 
Posts: 4
Joined: Tue Jun 09, 2015 22:41
Location: United States
GitHub: AsgardBeast
IRC: AsgardBeast
In-game: AsgardBeast

Re: Minetestmapper rewritten into C++

by AsgardBeast » Wed Jun 10, 2015 01:40

Alright so I thought I would put these here for those that would like them. After searching for compiled executable for Linux I just decided to build my own. I hate having to build compiled code because of all the "dependencies" that must be installed that I will never use again. I figure there may be others who feel the same way. These were built on Debian 8.1 and may not work on all systems. It will just depend on your particular build. I have also written a script that should make compiling the executable a little easier for those who want the steps automated. Again this script was written on and for Debian based systems. I'm not sure how much use these will be to anyone but since I had them available I thought I would make the accessible to those that want to try them out.

The Build Script : http://minetest.elysianhome.net/files/b ... testmapper
This script should put the binaries in your home directory under a MineTestMapper folder. (assuming it works at all)

32Bit Systems : http://minetest.elysianhome.net/files/m ... x32.tar.gz
This package includes the binary, a tarball with the binary and docs, and a deb package.

64Bit Systems : http://minetest.elysianhome.net/files/m ... x64.tar.gz
This package includes the binary, a tarball with the binary and docs, and a deb package.
"If you wish to solve the mysteries of the universe. You must think in terms of energy, frequency, and vibration." - Nikola Tesla
 

Ivà
Member
 
Posts: 115
Joined: Sun Feb 22, 2015 07:11
Location: Catalonia
GitHub: melzua
IRC: melzua
In-game: melzua
 

User avatar
paramat
Developer
 
Posts: 3414
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Re: Minetestmapper rewritten into C++

by paramat » Sun Jun 21, 2015 03:08

When i run the following command or add any colour option the mapper fails and the error message below appears.

$ ./minetestmapper -i ~/minetestf/gitmods/minetest/worlds/m2/ -o ~/m2map.png --bgcolor #000000

./minetestmapper: option '--bgcolor' requires an argument
 

User avatar
AsgardBeast
New member
 
Posts: 4
Joined: Tue Jun 09, 2015 22:41
Location: United States
GitHub: AsgardBeast
IRC: AsgardBeast
In-game: AsgardBeast

Re: Minetestmapper rewritten into C++

by AsgardBeast » Sun Jun 21, 2015 04:05

paramat wrote:When i run the following command or add any colour option the mapper fails and the error message below appears.

$ ./minetestmapper -i ~/minetestf/gitmods/minetest/worlds/m2/ -o ~/m2map.png --bgcolor #000000

./minetestmapper: option '--bgcolor' requires an argument


Try this instead;

./minetestmapper -i ~/minetestf/gitmods/minetest/worlds/m2/ -o ~/m2map.png --bgcolor '#000000'

Hashtags on the command line don't work very well when left out in the open. Quote the #COLORS and you should be fine.
"If you wish to solve the mysteries of the universe. You must think in terms of energy, frequency, and vibration." - Nikola Tesla
 

User avatar
paramat
Developer
 
Posts: 3414
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat
 

Argos
Member
 
Posts: 40
Joined: Tue Mar 04, 2014 21:47

Re: Minetestmapper rewritten into C++

by Argos » Tue Jun 30, 2015 16:20

A note to those who haven't seen it yet: @addi created a nice GUI for minetestmapper. See this page.
My mods & tools:
My fork of Minetestmapper - much improved - features, manual, Windows downloads
[MOD] Wrench (rotate:wrench) - improved screwdriver alternative - manual, download
 

User avatar
Sergey
Member
 
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Re: Minetestmapper rewritten into C++

by Sergey » Fri Jan 13, 2017 15:26

I can't install minetestmapper from AUR: https://aur.archlinux.org/packages/minetestmapper-git/

I start the process with
Code: Select all
yaourt -S minetestmapper-git


Then some dependencies are suggested to install from repo first: gperftools, libuv, snappy, cmake, gd, leveldb.

All of this seems to be installed correctly.

Then configuring of minetestmapper starts. And finishes like this:
Code: Select all
-- The CXX compiler identification is GNU 6.2.1
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- libgd library: /usr/lib64/libgd.so
-- libgd headers: /usr/include
-- zlib library: /usr/lib64/libz.so
-- zlib headers: /usr/include
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- sqlite3 library: /usr/lib64/libsqlite3.so
-- sqlite3 headers: /usr/include
-- Could NOT find PostgreSQL (missing:  PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR)
-- PostgreSQL not found!
-- LevelDB library: /usr/lib64/libleveldb.so
-- LevelDB headers: /usr/include/leveldb
-- LevelDB backend enabled
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
POSTGRESQL_LIBRARY
    linked by target "minetestmapper" in directory /tmp/yaourt-tmp-sergey/aur-minetestmapper-git/src/minetestmapper

-- Configuring incomplete, errors occurred!
See also "/tmp/yaourt-tmp-sergey/aur-minetestmapper-git/src/minetestmapper/CMakeFiles/CMakeOutput.log".


Any ideas what is wrong?
 

User avatar
sfan5
Moderator
 
Posts: 3804
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Sat Jan 14, 2017 14:36

Fixed that here: https://github.com/minetest/minetestmap ... ee1dcdf560

Also the PKGBUILD could use some updates, minetestmapper supports proper share paths and colors.txt no longer needs to be in current directory.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Sergey
Member
 
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Re: Minetestmapper rewritten into C++

by Sergey » Sat Jan 14, 2017 16:24

Thank you very much! I just compiled the program.

But I still have one little question. I tried to test the example from wiki [http://wiki.minetest.net/Minetestmapper].

Code: Select all
minetestmapper --geometry -10000:-10000+20000+20000 --drawscale -i ~/.minetest/worlds/my_world/ -o my_world.png


And the output is:
Code: Select all
Warning: Falling back to using colors.txt from current directory.
Exception: Specified colors file could not be found

You just said there is no need for colors.txt file.
 

User avatar
Sergey
Member
 
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Re: Minetestmapper rewritten into C++

by Sergey » Sat Jan 14, 2017 16:55

And the second question.

I, however, downloaded colors.txt file from the URL mentioned in wiki [http://wiki.minetest.net/Minetestmapper]. By the way, that URL is wrong. That URL is http://digitalaudioconcepts.com/vanessa/hobbies/minetest/colors.txt but correct is http://daconcepts.com/vanessa/hobbies/minetest/colors.txt

I put that colors.txt in folder, cd to it, launched the command above, and I got image with white gaps like in attached screenshot [http://imageup.ru/s2654441]

Why is that?
 

User avatar
sfan5
Moderator
 
Posts: 3804
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Sun Jan 15, 2017 10:39

That's perfectly normal, the white gaps happen in places where the world was not generated yet.
Since the world is only generated when a player walks near the area this happens often.

Also there is a colors.txt that comes with minetestmapper, VanessaE's colors file is useful only if you have mods in your world.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Sergey
Member
 
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Re: Minetestmapper rewritten into C++

by Sergey » Sun Jan 15, 2017 14:22

sfan5 wrote:That's perfectly normal, the white gaps happen in places where the world was not generated yet.
Since the world is only generated when a player walks near the area this happens often.

Also there is a colors.txt that comes with minetestmapper, VanessaE's colors file is useful only if you have mods in your world.

But as I said minetestmapper protests when there is no colors.txt in current directory.
Last edited by Sergey on Sun Jan 15, 2017 22:10, edited 1 time in total.
 

User avatar
sfan5
Moderator
 
Posts: 3804
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Sun Jan 15, 2017 19:53

Sergey wrote:
sfan5 wrote:That's perfectly normal, the white gaps happen in places where the world was not generated yet.
Since the world is only generated when a player walks near the area this happens often.

Also there is a colors.txt that comes with minetestmapper, VanessaE's colors file is useful only if you have mods in your world.

But as I said minetestmapper protests when there is no colors.txt in current dicrectory.

There should be a colors.txt that comes with minetestmapper as you can see here: https://github.com/minetest/minetestmap ... colors.txt
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
AsgardBeast
New member
 
Posts: 4
Joined: Tue Jun 09, 2015 22:41
Location: United States
GitHub: AsgardBeast
IRC: AsgardBeast
In-game: AsgardBeast

Re: Minetestmapper rewritten into C++

by AsgardBeast » Sun Jan 15, 2017 22:10

Sergey wrote:
sfan5 wrote:That's perfectly normal, the white gaps happen in places where the world was not generated yet.
Since the world is only generated when a player walks near the area this happens often.

Also there is a colors.txt that comes with minetestmapper, VanessaE's colors file is useful only if you have mods in your world.

But as I said minetestmapper protests when there is no colors.txt in current dicrectory.


The minetestmapper DOES need a colors.txt, it just doesn't require it to be in the same directory. You can use the
Code: Select all
--colors /path/to/location/colors.txt

to tell it where the colors.txt is located.

As well the "white" sections of the map you created are "unexplored" territory. The original minetestmapper had these areas "black" in color but that was changed in the C++ build at some point to default to "white". If you want to change the color of the "unexplored" territory you can use the
Code: Select all
--bgcolor '#000000'

to change it.
"If you wish to solve the mysteries of the universe. You must think in terms of energy, frequency, and vibration." - Nikola Tesla
 

User avatar
Sergey
Member
 
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Re: Minetestmapper rewritten into C++

by Sergey » Sun Jan 15, 2017 22:58

OK. I created new directory, cd to it, launch the command
Code: Select all
$ minetestmapper --geometry -100:-100+200+200 --drawscale --draworigin --drawalpha -i ~/.minetest/worlds/my_world/ -o my_world.png


Output:
Code: Select all
Warning: Falling back to using colors.txt from current directory.
Exception: Specified colors file could not be found


How can you explain this?
 

User avatar
AsgardBeast
New member
 
Posts: 4
Joined: Tue Jun 09, 2015 22:41
Location: United States
GitHub: AsgardBeast
IRC: AsgardBeast
In-game: AsgardBeast

Re: Minetestmapper rewritten into C++

by AsgardBeast » Mon Jan 16, 2017 03:45

Sergey wrote:OK. I created new directory, cd to it, launch the command
Code: Select all
$ minetestmapper --geometry -100:-100+200+200 --drawscale --draworigin --drawalpha -i ~/.minetest/worlds/my_world/ -o my_world.png


Output:
Code: Select all
Warning: Falling back to using colors.txt from current directory.
Exception: Specified colors file could not be found


How can you explain this?


Was the minetestmapper executable AND the colors.txt file in the same directory you created and were in when you ran the minetestmapper executable located within THAT directory?

Just having the colors.txt file in the directory you are executing the minetestmapper command from doesn't tell minetestmapper WHERE the colors.txt file is located. Unless you specifically tell it otherwise, minetestmapper is going to fall back the located colors.txt file.

Here is an example;

Code: Select all
minetestmapper --geometry -100:-100+200+200 --drawscale --draworigin --drawalpha -i ~/.minetest/worlds/my_world/ -o my_world.png --colors /location/of/your/colors.txt


If you do not know the location of your colors.txt file then find the one that should have come with the minetestmapper files that you downloaded or complied from.

It would appear from your previous posts that you have successfully created an image with the utility so I have to ask why this is even an issue?
"If you wish to solve the mysteries of the universe. You must think in terms of energy, frequency, and vibration." - Nikola Tesla
 

User avatar
Sergey
Member
 
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Re: Minetestmapper rewritten into C++

by Sergey » Mon Jan 16, 2017 09:04

Of course, minetestmapper IS EXECUTABLE. We are talking about C++ program, not about python script (which may or may not be executable).

As I said, I created new directory. So, it is empty after creation. And therefore there is no colors.txt in it.

My actions (in order for you to understand):
Code: Select all
$ mkdir dir1
$ cd dir1
$ minetestmapper --geometry -100:-100+200+200 --drawscale --draworigin --drawalpha -i ~/.minetest/worlds/my_world/ -o my_world.png

Warning: Falling back to using colors.txt from current directory.
Exception: Specified colors file could not be found


From what sfan5 said I understand that if there is no colors.txt in current directory and you don't specify path to it explicitly with --colors switch, then minetestmapper should use its own default colors.txt installed with it.

But it doesn't. That's the problem.
 

User avatar
sfan5
Moderator
 
Posts: 3804
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Mon Jan 16, 2017 15:01

How did you install minetestmapper and which version did you install?
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Sergey
Member
 
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Re: Minetestmapper rewritten into C++

by Sergey » Mon Jan 16, 2017 17:38

sfan5 wrote:How did you install minetestmapper and which version did you install?


I installed minetestmapper from AUR [https://aur.archlinux.org/packages/minetestmapper-git/] this standard way.

Code: Select all
yaourt -S minetestmapper-git


That's it.

P.S. I have Manjaro Linux, it is ArchLinux based distro.
 

User avatar
taikedz
Member
 
Posts: 692
Joined: Sun May 15, 2016 11:11
Location: Scotland, UK
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: Minetestmapper rewritten into C++

by taikedz » Mon Jan 16, 2017 20:50

Sergey wrote:My actions (in order for you to understand):
Code: Select all
$ mkdir dir1
$ cd dir1
$ minetestmapper --geometry -100:-100+200+200 --drawscale --draworigin --drawalpha -i ~/.minetest/worlds/my_world/ -o my_world.png

Warning: Falling back to using colors.txt from current directory.
Exception: Specified colors file could not be found



you did "mkdir dir1; cd dir1"

There is no colors.txt in that dir1. An executable "that uses files in the current/local directory" uses the current dir in which you run the command, not the data from the dir in which it resides.

You want to execute
Code: Select all
minetestmapper --colors $PATH_TO_COLOURS_TXT <and the rest of your stuff>
 

PreviousNext

Return to Minetest-related projects



Who is online

Users browsing this forum: No registered users and 4 guests