Minetestmapper rewritten into C++
-
- Moderator
- Posts: 4094
- Joined: Wed Aug 24, 2011 09:44
- GitHub: sfan5
- IRC: sfan5
- Location: Germany
Re: Minetestmapper rewritten into C++
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.
Re: Minetestmapper rewritten into C++
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?
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?
Re: Minetestmapper rewritten into C++
Hi est31,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?
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 .
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
My fork of Minetestmapper - much improved - features, manual, Windows downloads
[MOD] Wrench (rotate:wrench) - improved screwdriver alternative - manual, download
Re: Minetestmapper rewritten into C++
Yes, cmake reports C++11 usage. The changes from the stdint make it compile.
Re: Minetestmapper rewritten into C++
Thanks. Made the fix definitive & pushed it to the master branch.est31 wrote:Yes, cmake reports C++11 usage. The changes from the stdint make it compile.
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
My fork of Minetestmapper - much improved - features, manual, Windows downloads
[MOD] Wrench (rotate:wrench) - improved screwdriver alternative - manual, download
-
- New member
- Posts: 4
- Joined: Tue Jun 09, 2015 22:41
- GitHub: AsgardBeast
- IRC: AsgardBeast
- In-game: AsgardBeast
- Location: United States
- Contact:
Re: Minetestmapper rewritten into C++
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.
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
-
- Member
- Posts: 115
- Joined: Sun Feb 22, 2015 07:11
- GitHub: melzua
- IRC: melzua
- In-game: melzua
- Location: Catalonia
Re: Minetestmapper rewritten into C++
Thankyou @AsgardBeast
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Minetestmapper rewritten into C++
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
$ ./minetestmapper -i ~/minetestf/gitmods/minetest/worlds/m2/ -o ~/m2map.png --bgcolor #000000
./minetestmapper: option '--bgcolor' requires an argument
-
- New member
- Posts: 4
- Joined: Tue Jun 09, 2015 22:41
- GitHub: AsgardBeast
- IRC: AsgardBeast
- In-game: AsgardBeast
- Location: United States
- Contact:
Re: Minetestmapper rewritten into C++
Try this instead;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
./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
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Minetestmapper rewritten into C++
Thanks it works now.
Re: Minetestmapper rewritten into C++
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
My fork of Minetestmapper - much improved - features, manual, Windows downloads
[MOD] Wrench (rotate:wrench) - improved screwdriver alternative - manual, download
Re: Minetestmapper rewritten into C++
I can't install minetestmapper from AUR: https://aur.archlinux.org/packages/minetestmapper-git/
I start the process with
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:
Any ideas what is wrong?
I start the process with
Code: Select all
yaourt -S minetestmapper-git
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".
-
- Moderator
- Posts: 4094
- Joined: Wed Aug 24, 2011 09:44
- GitHub: sfan5
- IRC: sfan5
- Location: Germany
Re: Minetestmapper rewritten into C++
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.
Also the PKGBUILD could use some updates, minetestmapper supports proper share paths and colors.txt no longer needs to be in current directory.
Re: Minetestmapper rewritten into C++
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].
And the output is:
You just said there is no need for colors.txt file.
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
Code: Select all
Warning: Falling back to using colors.txt from current directory.
Exception: Specified colors file could not be found
Re: Minetestmapper rewritten into C++
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 ... colors.txt but correct is http://daconcepts.com/vanessa/hobbies/m ... 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?
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 ... colors.txt but correct is http://daconcepts.com/vanessa/hobbies/m ... 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?
-
- Moderator
- Posts: 4094
- Joined: Wed Aug 24, 2011 09:44
- GitHub: sfan5
- IRC: sfan5
- Location: Germany
Re: Minetestmapper rewritten into C++
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.
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.
Re: Minetestmapper rewritten into C++
But as I said minetestmapper protests when there is no colors.txt in current directory.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.
Last edited by Sergey on Sun Jan 15, 2017 22:10, edited 1 time in total.
-
- Moderator
- Posts: 4094
- Joined: Wed Aug 24, 2011 09:44
- GitHub: sfan5
- IRC: sfan5
- Location: Germany
Re: Minetestmapper rewritten into C++
There should be a colors.txt that comes with minetestmapper as you can see here: https://github.com/minetest/minetestmap ... colors.txtSergey wrote:But as I said minetestmapper protests when there is no colors.txt in current dicrectory.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.
-
- New member
- Posts: 4
- Joined: Tue Jun 09, 2015 22:41
- GitHub: AsgardBeast
- IRC: AsgardBeast
- In-game: AsgardBeast
- Location: United States
- Contact:
Re: Minetestmapper rewritten into C++
The minetestmapper DOES need a colors.txt, it just doesn't require it to be in the same directory. You can use theSergey wrote:But as I said minetestmapper protests when there is no colors.txt in current dicrectory.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.
Code: Select all
--colors /path/to/location/colors.txt
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'
"If you wish to solve the mysteries of the universe. You must think in terms of energy, frequency, and vibration." - Nikola Tesla
Re: Minetestmapper rewritten into C++
OK. I created new directory, cd to it, launch the command
Output:
How can you explain this?
Code: Select all
$ minetestmapper --geometry -100:-100+200+200 --drawscale --draworigin --drawalpha -i ~/.minetest/worlds/my_world/ -o my_world.png
Code: Select all
Warning: Falling back to using colors.txt from current directory.
Exception: Specified colors file could not be found
-
- New member
- Posts: 4
- Joined: Tue Jun 09, 2015 22:41
- GitHub: AsgardBeast
- IRC: AsgardBeast
- In-game: AsgardBeast
- Location: United States
- Contact:
Re: Minetestmapper rewritten into C++
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?Sergey wrote:OK. I created new directory, cd to it, launch the commandOutput:Code: Select all
$ minetestmapper --geometry -100:-100+200+200 --drawscale --draworigin --drawalpha -i ~/.minetest/worlds/my_world/ -o my_world.png
How can you explain this?Code: Select all
Warning: Falling back to using colors.txt from current directory. Exception: Specified colors file could not be found
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
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
Re: Minetestmapper rewritten into C++
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):
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.
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
But it doesn't. That's the problem.
-
- Moderator
- Posts: 4094
- Joined: Wed Aug 24, 2011 09:44
- GitHub: sfan5
- IRC: sfan5
- Location: Germany
Re: Minetestmapper rewritten into C++
How did you install minetestmapper and which version did you install?
Re: Minetestmapper rewritten into C++
I installed minetestmapper from AUR [https://aur.archlinux.org/packages/minetestmapper-git/] this standard way.sfan5 wrote:How did you install minetestmapper and which version did you install?
Code: Select all
yaourt -S minetestmapper-git
P.S. I have Manjaro Linux, it is ArchLinux based distro.
- taikedz
- Member
- Posts: 698
- Joined: Sun May 15, 2016 11:11
- GitHub: taikedz
- IRC: DuCake
- In-game: DuCake
- Location: Scotland, UK
- Contact:
Re: Minetestmapper rewritten into C++
you did "mkdir dir1; cd dir1"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
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>
Who is online
Users browsing this forum: No registered users and 7 guests