0

Merge branch 'master' into smooth-lighting

This commit is contained in:
Aaron Griffith
2011-10-28 13:07:01 -04:00
12 changed files with 140 additions and 45 deletions

View File

@@ -2,21 +2,30 @@
Building the Overviewer from Source Building the Overviewer from Source
=================================== ===================================
These instructions are for building the C extension for Overviewer. Also note These instructions are for building the C extension for Overviewer. Once you
that pre-built Windows and Debian executables are available in the `Downloads have finished with these instructions, head to :doc:`running`.
<https://github.com/overviewer/Minecraft-Overviewer/downloads>`_ section. These
kits already contain the compiled extension and require no further setup (so you .. note::
can skip to the :doc:`Running <running>` section of the docs).
Pre-built Windows and Debian executables are available on the
:doc:`installing` page. These kits already contain the compiled code and
require no further setup, so you can skip to the next section of the docs:
:doc:`running`.
Get The Source Get The Source
============== ==============
First step: download the source! Either clone with Git or download the most recent snapshot
* URL to clone: ``git://github.com/overviewer/Minecraft-Overviewer.git`` First step: download the platform-independent source! Either clone with Git
(recommended if you know Git) or download the most recent snapshot
* Git URL to clone: ``git://github.com/overviewer/Minecraft-Overviewer.git``
* `Download most recent tar archive <https://github.com/overviewer/Minecraft-Overviewer/tarball/master>`_ * `Download most recent tar archive <https://github.com/overviewer/Minecraft-Overviewer/tarball/master>`_
* `Download most recent zip archive <https://github.com/overviewer/Minecraft-Overviewer/zipball/master>`_ * `Download most recent zip archive <https://github.com/overviewer/Minecraft-Overviewer/zipball/master>`_
Once you have the source, see below for instructions on building for your
system.
Build Instructions For Various Operating Systems Build Instructions For Various Operating Systems
================================================ ================================================
@@ -157,5 +166,10 @@ regular user.
Installing the Compiled Code Installing the Compiled Code
---------------------------- ----------------------------
You can run the ``overviewer.py`` script from the build directory just fine. If
you'd like to install, run ``python setup.py install`` You can run the ``overviewer.py`` script from the build directory just fine;
installation is unnecessary. If you'd like to install, run
::
python setup.py install

View File

@@ -2,22 +2,53 @@
Frequently Asked Questions Frequently Asked Questions
========================== ==========================
**The full map doesn't display even when fully zoomed out!** .. contents::
Are you using the :option:`-z` or :option:`--zoom <-z>` option on your commandline or :local:
in settings.py? If so, try removing it, or increasing the value you set.
It's quite likely you don't need it at all. See the documentation for the
:option:`zoom <-z>` option.
**You've added a few feature, but it's not showing up on my map!** General Questions
Some new features will only show up in newly-rendered areas. Use the =================
:option:`--forcerender` option to update the entire map.
**How do I use this on CentOS 5?** The full map doesn't display even when fully zoomed out!
CentOS 5 comes with Python 2.4, but the Overviewer needs 2.6 or higher. See --------------------------------------------------------
the special instructions at :ref:`centos`
**The background color of the map is black, and I don't like it!** Are you using the :option:`-z` or :option:`--zoom <-z>` option on your
You can change this by using the :option:`--bg-color` command line option, or commandline or in settings.py? If so, try removing it, or increasing the value
``bg_color`` in settings.py. See the :doc:`options` page for more you set. It's quite likely you don't need it at all. See the documentation for
details. the :option:`zoom <-z>` option.
You've added a few feature, but it's not showing up on my map!
--------------------------------------------------------------
Some new features will only show up in newly-rendered areas. Use the
:option:`--forcerender` option to update the entire map.
How do I use this on CentOS 5?
------------------------------
CentOS 5 comes with Python 2.4, but the Overviewer needs 2.6 or higher. See the
special instructions at :ref:`centos`
The background color of the map is black, and I don't like it!
--------------------------------------------------------------
You can change this by using the :option:`--bg-color` command line option, or
``bg_color`` in settings.py. See the :doc:`options` page for more details.
I downloaded the Windows version but when I double-click it, the window closes real fast.
-----------------------------------------------------------------------------------------
The Overviewer is a command line program and must be run from a command line. It
is necessary to become at least a little familiar with a command line to run The
Overviewer (if you have no interest in this, perhaps this isn't the mapping
program for you).
Unfortunately, A full tutorial of the Windows command line is out of scope for this
documentation; consult the almighty Google for tutorials and information on
the Windows command line. (If you would like to contribute a short tutorial to
these docs, please do!)
Batch files are another easy way to run the Overviewer without messing with
command lines, but information on how to do this has also not been written.
On a related note, we also welcome contributions for a graphical interface for
the Overviewer.

View File

@@ -6,6 +6,10 @@
The Minecraft Overviewer The Minecraft Overviewer
======================== ========================
See also the `Github Homepage`_
.. _Github Homepage: https://github.com/overviewer/Minecraft-Overviewer
Introduction Introduction
============ ============
The Minecraft Overviewer is a command-line tool for rendering high-resolution The Minecraft Overviewer is a command-line tool for rendering high-resolution
@@ -54,8 +58,9 @@ Windows, Mac, and Linux as long as you have these software packages installed:
* Either a Minecraft Client installed or a terrain.png for the textures. * Either a Minecraft Client installed or a terrain.png for the textures.
There are additional requirements for compiling it. More details are available The first three are included in the Windows download. Also, there are additional
in either the :doc:`Building <building>` or :doc:`Installing <installing>` pages. requirements for compiling it (like a compiler). More details are available in
either the :doc:`Building <building>` or :doc:`Installing <installing>` pages.
Getting Started Getting Started
=============== ===============
@@ -71,7 +76,9 @@ packages and don't want to have to compile anything yourself**, head to the
**If you would like to build the Overviewer from source yourself (it's not that **If you would like to build the Overviewer from source yourself (it's not that
bad)**, head to the :doc:`Building <building>` page. bad)**, head to the :doc:`Building <building>` page.
.. _Github Homepage: https://github.com/overviewer/Minecraft-Overviewer **For all other platforms** you will need to build it yourself.
:doc:`building`.
Help Help
==== ====
@@ -92,8 +99,8 @@ Documentation Contents
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
building
installing installing
building
running running
options options
faq faq

View File

@@ -3,8 +3,9 @@ Installing
========== ==========
This page is for installing the pre-compiled binary versions of the Overviewer. This page is for installing the pre-compiled binary versions of the Overviewer.
If you have built the Overviewer from source yourself, head back to If you want to build the Overviewer from source yourself, head to :doc:`Building
:doc:`Building <building>`. <building>`. If you have already built The Overviewer, proceed to
:doc:`running`.
Windows Windows
@@ -18,8 +19,7 @@ right place!
For 64 bit, you'll want these instead: `VC++ 2008 <http://www.microsoft.com/downloads/en/details.aspx?familyid=bd2a6171-e2d6-4230-b809-9a8d7548c1b6>`_ and `VC++ 2010 <http://www.microsoft.com/download/en/details.aspx?id=14632>`_ For 64 bit, you'll want these instead: `VC++ 2008 <http://www.microsoft.com/downloads/en/details.aspx?familyid=bd2a6171-e2d6-4230-b809-9a8d7548c1b6>`_ and `VC++ 2010 <http://www.microsoft.com/download/en/details.aspx?id=14632>`_
3. That's it! Proceed with instructions on :doc:`Running <running>` the 3. That's it! Proceed with instructions on :doc:`running`.
Overviewer.
Debian / Ubuntu Debian / Ubuntu
=============== ===============

View File

@@ -137,3 +137,23 @@ modification times intact, use ``cp -p``. For people who render from backups,
GNU ``tar`` automatically handles modification times correctly. ``rsync -a`` GNU ``tar`` automatically handles modification times correctly. ``rsync -a``
will handle this correctly as well. If you use some other tool, you'll have to will handle this correctly as well. If you use some other tool, you'll have to
figure out how to do this yourself. figure out how to do this yourself.
Biome Support
=============
Minecraft Overviewer has support for using the biome info from the `Minecraft
Biome Extractor`_. If you run the biome extractor on your world, during the
next run Overviewer will automatically recognize the biome info and use it to
colorize your grass and leaves appropriately. This will only appear on updated
chunks, though; to colorize the entire world you will need to re-render from
scratch by using :option:`--forcerender`
.. note::
as of Minecraft 1.8, you currently need to use a patched Biome Extractor
that can be found `here
<http://www.minecraftforum.net/topic/76063-minecraft-biome-extractor-add-biome-support-to-your-mapper/page__st__140__gopid__8431028#entry8431028>`_,
or `here on GitHub
<https://github.com/overviewer/minecraft-biome-extractor>`_.
.. _Minecraft Biome Extractor: http://www.minecraftforum.net/viewtopic.php?f=25&t=80902

View File

@@ -15,7 +15,25 @@
# You should have received a copy of the GNU General Public License along # You should have received a copy of the GNU General Public License along
# with the Overviewer. If not, see <http://www.gnu.org/licenses/>. # with the Overviewer. If not, see <http://www.gnu.org/licenses/>.
import platform
import sys import sys
if platform.system() == 'Windows':
try:
import ctypes
GetConsoleProcessList = ctypes.windll.kernel32.GetConsoleProcessList
num = GetConsoleProcessList(ctypes.byref(ctypes.c_int(0)), ctypes.c_int(1))
if (num == 1):
print "The Overviewer is a console program. Please open a Windows command prompt"
print "first and run Overviewer from there. Further documentation is available at"
print "http://docs.overviewer.org/\n"
print "Press [Enter] to close this window."
raw_input()
sys.exit(1)
except Exception:
pass
if not (sys.version_info[0] == 2 and sys.version_info[1] >= 6): if not (sys.version_info[0] == 2 and sys.version_info[1] >= 6):
print "Sorry, the Overviewer requires at least Python 2.6 to run" print "Sorry, the Overviewer requires at least Python 2.6 to run"
if sys.version_info[0] >= 3: if sys.version_info[0] >= 3:
@@ -29,7 +47,6 @@ import subprocess
import multiprocessing import multiprocessing
import time import time
import logging import logging
import platform
from overviewer_core import util from overviewer_core import util
logging.basicConfig(level=logging.INFO,format="%(asctime)s [%(levelname)s] %(message)s") logging.basicConfig(level=logging.INFO,format="%(asctime)s [%(levelname)s] %(message)s")
@@ -157,7 +174,7 @@ def main():
print "Git commit: %s" % overviewer_version.HASH print "Git commit: %s" % overviewer_version.HASH
print "built on %s" % overviewer_version.BUILD_DATE print "built on %s" % overviewer_version.BUILD_DATE
print "Build machine: %s %s" % (overviewer_version.BUILD_PLATFORM, overviewer_version.BUILD_OS) print "Build machine: %s %s" % (overviewer_version.BUILD_PLATFORM, overviewer_version.BUILD_OS)
except: except Exception:
print "version info not found" print "version info not found"
pass pass
sys.exit(0) sys.exit(0)

View File

@@ -266,6 +266,9 @@ var overviewer = {
google.maps.event.addListener(overviewer.map, 'zoom_changed', function() { google.maps.event.addListener(overviewer.map, 'zoom_changed', function() {
overviewer.util.updateHash(); overviewer.util.updateHash();
}); });
google.maps.event.addListener(overviewer.map, 'dblclick', function() {
overviewer.util.updateHash();
});
// Make the link again whenever the map changes // Make the link again whenever the map changes
google.maps.event.addListener(overviewer.map, 'maptypeid_changed', function() { google.maps.event.addListener(overviewer.map, 'maptypeid_changed', function() {

View File

@@ -439,9 +439,12 @@ class QuadtreeGen(object):
needs_rerender = True needs_rerender = True
break break
# check region file mtime first. # check region file mtime first.
if regionMtime <= tile_mtime: # on windows (and possibly elsewhere) minecraft won't update
continue # the region file mtime until after shutdown.
# for servers this is unacceptable, so skip this check.
#if regionMtime <= tile_mtime:
# continue
# checking chunk mtime # checking chunk mtime
if region.get_chunk_timestamp(chunkx, chunky) > tile_mtime: if region.get_chunk_timestamp(chunkx, chunky) > tile_mtime:

View File

@@ -193,7 +193,7 @@ generate_pseudo_data(RenderState *state, unsigned char ancilData) {
unsigned char above_level_data = 0, same_level_data = 0, below_level_data = 0, possibly_connected = 0, final_data = 0; unsigned char above_level_data = 0, same_level_data = 0, below_level_data = 0, possibly_connected = 0, final_data = 0;
/* check for air in z+1, no air = no connection with upper level */ /* check for air in z+1, no air = no connection with upper level */
if ((z != 127) && (getArrayByte3D(state->left_blocks, x, y, z) == 0)) { if ((z != 127) && (getArrayByte3D(state->blocks, x, y, z + 1) == 0)) {
above_level_data = check_adjacent_blocks(state, x, y, z + 1, state->block); above_level_data = check_adjacent_blocks(state, x, y, z + 1, state->block);
} /* else above_level_data = 0 */ } /* else above_level_data = 0 */

View File

@@ -2255,7 +2255,7 @@ def prepareBiomeData(worlddir):
try: try:
grasscolor = list(Image.open(os.path.join(biomeDir,"grasscolor.png")).getdata()) grasscolor = list(Image.open(os.path.join(biomeDir,"grasscolor.png")).getdata())
foliagecolor = list(Image.open(os.path.join(biomeDir,"foliagecolor.png")).getdata()) foliagecolor = list(Image.open(os.path.join(biomeDir,"foliagecolor.png")).getdata())
except: except Exception:
# clear anything that managed to get set # clear anything that managed to get set
grasscolor = None grasscolor = None
foliagecolor = None foliagecolor = None
@@ -2316,7 +2316,7 @@ def loadLightColor():
lightcolor_checked = True lightcolor_checked = True
try: try:
lightcolor = list(_load_image("light_normal.png").getdata()) lightcolor = list(_load_image("light_normal.png").getdata())
except: except Exception:
logging.warning("Light color image could not be found.") logging.warning("Light color image could not be found.")
lightcolor = None lightcolor = None
return lightcolor return lightcolor

View File

@@ -52,7 +52,7 @@ def findGitHash():
try: try:
import overviewer_version import overviewer_version
return overviewer_version.HASH return overviewer_version.HASH
except: except Exception:
return "unknown" return "unknown"
def findGitVersion(): def findGitVersion():
@@ -68,9 +68,9 @@ def findGitVersion():
# and 0.1.3 into 0.1.3 # and 0.1.3 into 0.1.3
line = '-'.join(line.split('-', 2)[:2]) line = '-'.join(line.split('-', 2)[:2])
return line.strip() return line.strip()
except: except Exception:
try: try:
import overviewer_version import overviewer_version
return overviewer_version.VERSION return overviewer_version.VERSION
except: except Exception:
return "unknown" return "unknown"

View File

@@ -142,7 +142,7 @@ except AttributeError:
try: try:
pil_include = os.environ['PIL_INCLUDE_DIR'].split(os.pathsep) pil_include = os.environ['PIL_INCLUDE_DIR'].split(os.pathsep)
except: except Exception:
pil_include = [ os.path.join(get_python_inc(plat_specific=1), 'Imaging') ] pil_include = [ os.path.join(get_python_inc(plat_specific=1), 'Imaging') ]
if not os.path.exists(pil_include[0]): if not os.path.exists(pil_include[0]):
pil_include = [ ] pil_include = [ ]
@@ -221,7 +221,7 @@ def generate_version_py():
f = open("overviewer_core/overviewer_version.py", "w") f = open("overviewer_core/overviewer_version.py", "w")
f.write(outstr) f.write(outstr)
f.close() f.close()
except: except Exception:
print "WARNING: failed to build overviewer_version file" print "WARNING: failed to build overviewer_version file"
class CustomSDist(sdist): class CustomSDist(sdist):