Pigmap

From MineOS
Jump to: navigation, search

Pigmap is an alternative Google Maps renderer for Minecraft: https://github.com/equalpants/pigmap

Currently, the pigmap profile is referencing a fork of this project, https://github.com/akudeukie/pigmap

The following steps only work on MineOS CRUX, which is deprecated. Installing Pigmap should be done following the instructions provided by pigmap developers

Create a pigmap profile

Pigmap can be installed as a profile, which has the benefit of being able to do the setup entirely as mc, mostly in in the web-ui.

  1. Create a new profile from the Overview page
    New profile.png
  2. Enter in the pigmap details:
    * Profile name: "pigmap" (must be all lower case, spelled like this)
    * Choose "Runnable Shell Script - .sh"
    * Type in the scripts URL: http://minecraft.codeemo.com/crux/mineos-scripts/profiles/pigmap.sh
  3. Click "Create Profile"
  4. From the Overview Page, click Update to the download the most recent pigmap.sh
  5. As user 'mc' in SSH, change to the /usr/games/minecraft/pigmap directory and execute ./pigmap.sh to compile.
  6. Pigmap will now be downloaded, compiled and ready to use from SSH:

Using pigmap from mineos_console.py

The pigmap renderings will then appear in the following structure:

  • /var/www/hiawatha/pigmap/servername
  • /var/www/hiawatha/pigmap/servername/world
  • /var/www/hiawatha/pigmap/servername/world_nether
  • /var/www/hiawatha/pigmap/servername/world/pigmap-default.html

pigmap-default.html can be opened through your browser to view the map renderings.

The path /var/www/hiawatha/pigmap is derived from a new value in /usr/games/minecraft/mineos.config.

Issues on MineOS CRUX

Over time, pigmap has changed it's build requirements to include libjpeg, a package not included on the MineOS CRUX iso. When following this procedure, you may run into make errors, which can be overcome by installing libjpeg from ports.

mc:pigmap/ $ make
[snipped]
g++ -c rgba.cpp -Wall -O3 -DNDEBUG
rgba.cpp:19:21: fatal error: jpeglib.h: No such file or directory
compilation terminated.
make: *** [rgba.o] Error 1
mc:pigmap/ $ su -
Password:
root:~/ $ cd /usr/ports/opt/libjpeg/
root:libjpeg/ $ pkgmk -d -i
[snipped]
=======> Building '/usr/ports/opt/libjpeg/libjpeg#8d-1.pkg.tar.gz' succeeded.
=======> Installing '/usr/ports/opt/libjpeg/libjpeg#8d-1.pkg.tar.gz'.
pkgadd /usr/ports/opt/libjpeg/libjpeg#8d-1.pkg.tar.gz
=======> Installing '/usr/ports/opt/libjpeg/libjpeg#8d-1.pkg.tar.gz' succeeded.
root:libjpeg/ $ exit
logout
mc:pigmap/ $ make
g++ -c rgba.cpp -Wall -O3 -DNDEBUG
g++ -c tables.cpp -Wall -O3 -DNDEBUG
g++ -c utils.cpp -Wall -O3 -DNDEBUG
g++ -c world.cpp -Wall -O3 -DNDEBUG
g++ pigmap.o blockimages.o chunk.o map.o render.o region.o rgba.o tables.o utils.o world.o -o pigmap -l z -l png -l jpeg -l pthread -Wall -O3 -DNDEBUG
mc:pigmap/ $