From cb9a825cc50cb2be2f6851fd8af92aba706a3286 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sun, 16 Oct 2011 00:22:10 +0200 Subject: Exefying scripts added and README renamed. --- README | 56 ------------------------------------------------------- README.markdown | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ animalfix.py | 0 exefying.bat | 18 ++++++++++++++++++ mkexe.py | 26 ++++++++++++++++++++++++++ 5 files changed, 102 insertions(+), 56 deletions(-) delete mode 100644 README create mode 100644 README.markdown mode change 100644 => 100755 animalfix.py create mode 100644 exefying.bat create mode 100644 mkexe.py diff --git a/README b/README deleted file mode 100644 index e2ef448..0000000 --- a/README +++ /dev/null @@ -1,56 +0,0 @@ -mcanimalfix -=========== - -This tool will place animals in your Minecraft map, if there are no animals existing. -This can happen to old maps after upgrading to Minecraft >= Beta 1.8. - -It tries to simulate the standard Minecraft animal spawning mechanism. -Spawning wolves is a bit problematic, they only spawn in forest biomes, but it is -(IMHO) not possible to read out the used biome for a chunk. So this tool tries to figure out -where a forest could be (where are many trees?). - -WARNING! --------- - -Before you do this, PLEASE backup your Map. I could not see any problems, but just in case... - -Requirements ------------- - -* Python 2.x () -* pymclevel (. Just place the pymclevel into the root directory of this tool) -* numpy (Needed by pymclevel. ) -* wxPython (. Make sure you use an Unicode-enabled version!) - -Usage ------ - -Launch `animalfix.py`, select the directory of your Minecraft map and click "Lets do it!". -Then you have to wait quite a long time. My map is ~ 50 MiB large and it took about 15 minutes to fix it (running on Fedora 14 with an Phenom II X4 965). - -Todo / Wishlist ---------------- - -* An "exefied" (you can not call this compiling for Python scripts IMHO...) version for Windows to make it easier for Windows users. - -License -------- - -NOTE: pymclevel is not my work. It was originally witten by codewarrior0. See for pymclevel's license. - -Now mcanimalfix' license: - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - -Copyright (C) 2004 Sam Hocevar - 14 rue de Plaisance, 75014 Paris, France -Everyone is permitted to copy and distribute verbatim or modified -copies of this license document, and changing it is allowed as long -as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. - diff --git a/README.markdown b/README.markdown new file mode 100644 index 0000000..59e4694 --- /dev/null +++ b/README.markdown @@ -0,0 +1,58 @@ +mcanimalfix +=========== + +This tool will place animals in your Minecraft map, if there are no animals existing. +This can happen to old maps after upgrading to Minecraft >= Beta 1.8. + +It tries to simulate the standard Minecraft animal spawning mechanism. +Spawning wolves is a bit problematic, they only spawn in forest biomes, but it is +(IMHO) not possible to read out the used biome for a chunk. So this tool tries to figure out +where a forest could be (where are many trees?). + +WARNING! +-------- + +Before you do this, PLEASE backup your Map. I could not see any problems, but just in case... + +Requirements +------------ + +* Python 2.x () +* pymclevel (. Just place the pymclevel into the root directory of this tool) +* numpy (Needed by pymclevel. ) +* wxPython (. Make sure you use an Unicode-enabled version!) + +Usage +----- + +Launch `animalfix.py`, select the directory of your Minecraft map and click "Lets do it!". +Then you have to wait quite a long time. My map is ~ 50 MiB large and it took about 15 minutes to fix it (running on Fedora 14 with an Phenom II X4 965). + +EXE version for Windows +----------------------- + +There is an EXE file for Windows (32-bit, should also work on 64-bit), so you do not have to download Python and tons of other software. +Just unzip the archive and execute mcanimalfix.exe. +Download: + +License +------- + +NOTE: pymclevel is not my work. It was originally witten by codewarrior0. See for pymclevel's license. + +Now mcanimalfix' license: + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + +Copyright (C) 2004 Sam Hocevar + 14 rue de Plaisance, 75014 Paris, France +Everyone is permitted to copy and distribute verbatim or modified +copies of this license document, and changing it is allowed as long +as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + diff --git a/animalfix.py b/animalfix.py old mode 100644 new mode 100755 diff --git a/exefying.bat b/exefying.bat new file mode 100644 index 0000000..2e84720 --- /dev/null +++ b/exefying.bat @@ -0,0 +1,18 @@ +@echo off +REM Exefying the script... + +python.exe -OO mkexe.py py2exe + +REM Uncomment next line, if you do not want to compress... +REM goto end + +REM recompress the library +cd dist\ +7z.exe -aoa x library.zip -olibrary\ +cd library\ +7z.exe a -tzip -mx9 ..\library.zip -r +cd .. +rd library /s /q + +:end +echo Done diff --git a/mkexe.py b/mkexe.py new file mode 100644 index 0000000..a4bdc00 --- /dev/null +++ b/mkexe.py @@ -0,0 +1,26 @@ +from distutils.core import setup +import py2exe + +setup( + name="mcanimalfix", + version="1", + description="Place animals on your Minecraft map after they got lost during the 1.8 update.", + windows=[ + { + "script": "animalfix.py" + } + ], + data_files=[("", ["README.markdown"])], + options={ + "py2exe": { + "optimize": 2, + "excludes": ["pywin", "pywin.debugger", "pywin.debugger.dbgcon", + "pywin.dialogs", "pywin.dialogs.list", + "Tkconstants","Tkinter","tcl", "_ssl", "doctest", "pdb", "inspect", "wave", "email" + ], + "includes": ["zlib"], # So the resulting program is able tu unpack the library, even after recompressing. + "dll_excludes": ["MSVCP90.dll"], + "bundle_files": 2 + } + } +) -- cgit v1.2.3-70-g09d2