diff --git a/README.md b/README.md index 93af796..de6a693 100644 --- a/README.md +++ b/README.md @@ -163,38 +163,7 @@ sudo cp -R --no-clobber "$HOME/Downloads/minetest-chunkymap/web/images/*" "$MT_M * Install Python 2.7 * Run install-chunkymap-on-windows.bat (which just runs C:\Python27\python install-chunkymap-on-windows.py) - (the installer will automatically download and install numpy and Pillow) - * or OPTIONALLY manual install what the above script does: - * put these files anywhere - * python 2.7.x such as from python.org - * run get_python_architecture.py to make sure you know whether to download the following in 32-bit or 64-bit - Administrator Command Prompt (to find it in Win 10, right-click windows menu) - * update python package system: -``` -C:\python27\python -m pip install --upgrade pip wheel setuptools -``` - * numpy such as can be installed via the easy unofficial installer wheel at - http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy - then: -``` -#cd to the folder where you downloaded the whl file -C:\python27\python -m pip install "numpy-1.10.4+mkl-cp27-cp27m-win32.whl" -``` - (but put your specific downloaded whl file instead) - * Pillow (instead of PIL (Python Imaging Library) which is a pain on Windows): there is a PIL installer wheel for Python such as 2.7 here: - http://www.lfd.uci.edu/~gohlke/pythonlibs/ - as suggested on http://stackoverflow.com/questions/2088304/installing-pil-python-imaging-library-in-win7-64-bits-python-2-6-4 - then: -``` -C:\python27\python -m pip install "Pillow-3.1.1-cp27-none-win32.whl" -``` - (but put your specific downloaded whl file instead, such as Pillow-3.1.1-cp27-none-win_amd64.whl) - * run (or if your python executable does not reside in C:\Python27\ then first edit the file): -``` -chunkymap-regen-loop.bat -``` - (all the batch does is run C:\Python27\python generator.py) - (generator.py will ask for configuration options on first run and ask for your www root) + (the installer will automatically download and install numpy and Pillow -- see also install-on-windows-manually.md) ## Known Issues * webapp: save selected world to a config file (click world on first visit to write initial config) instead of being silently autoselected diff --git a/chunkymap-generator.bat b/chunkymap-generator.bat index 9ece055..ae02713 100644 --- a/chunkymap-generator.bat +++ b/chunkymap-generator.bat @@ -1 +1 @@ -C:\Python27\python.exe chunkymap-regen.py +C:\Python27\python.exe generator.py diff --git a/chunkymap-generator.sh b/chunkymap-generator.sh index 8c65978..a9ef7a9 100644 --- a/chunkymap-generator.sh +++ b/chunkymap-generator.sh @@ -1,9 +1,9 @@ #!/bin/sh echo To reconnect with this screen type: echo -echo sudo screen -r chunkymapregen +echo sudo screen -r chunkymapgen echo # -S names the socket (-t only sets the title) -#FAILS: flock -n /var/run/chunkymap-loop.lockfile -c "screen -S chunkymapregen python /home/owner/minetest/util/chunkymap-regen.py" -#FAILS: screen -S chunkymapregen flock -n /var/run/chunkymap-loop.lockfile -c python /home/owner/minetest/util/chunkymap-regen.py -sudo screen -S chunkymapregen python /home/owner/chunkymap/generator.py +#FAILS: flock -n /var/run/chunkymap-regen.lockfile -c "screen -S chunkymapregen python /home/owner/chunkymap/unused/chunkymap-regen.py" +#FAILS: screen -S chunkymapregen flock -n /var/run/chunkymap-regen.lockfile -c python /home/owner/chunkymap/unused/chunkymap-regen.py +sudo screen -S chunkymapgen python /home/owner/chunkymap/generator.py diff --git a/expertmmregressionsuite.py b/expertmmregressionsuite.py index d593e7d..471e824 100644 --- a/expertmmregressionsuite.py +++ b/expertmmregressionsuite.py @@ -618,7 +618,7 @@ print(" (Ignoring the following independent variables:") print(','.join(independent_list)+")") #verbose_enable = True -check_coord_mismatch("chunkymap-regen.py") +check_coord_mismatch("generator.py") check_coord_mismatch(os.path.join("web","chunkymap.php")) print("Found "+str(issue_count)+" issue(s) in "+str(len(file_list))+" file(s)") if (issue_count>0): diff --git a/generator.py b/generator.py index 42e4eb9..47a6329 100644 --- a/generator.py +++ b/generator.py @@ -2003,5 +2003,5 @@ if __name__ == '__main__': if args.no_loop: mtchunks.run() else: - print("To stop chunkymap-regen loop, save a line '"+stop_line+"' to '"+signal_path+"'") + print("To stop generator.py loop, save a line '"+stop_line+"' to '"+signal_path+"'") mtchunks.run_loop() diff --git a/install-chunkymap-on-ubuntu.sh b/install-chunkymap-on-ubuntu.sh index eb4044c..70360c1 100644 --- a/install-chunkymap-on-ubuntu.sh +++ b/install-chunkymap-on-ubuntu.sh @@ -36,8 +36,8 @@ rm "$CHUNKYMAP_DEST/install-chunkymap-on-windows.py" -#cp -f "$CHUNKYMAP_INSTALLER_PATH/chunkymap-regen.py" "$CHUNKYMAP_DEST/" -#chmod +x "$CHUNKYMAP_DEST/chunkymap-regen.py" +#cp -f "$CHUNKYMAP_INSTALLER_PATH/generator.py" "$CHUNKYMAP_DEST/" +#chmod +x "$CHUNKYMAP_DEST/generator.py" #cp -f "$CHUNKYMAP_INSTALLER_PATH/README.md" "$CHUNKYMAP_DEST/" #remove files place in dest by old version of installer script: @@ -91,7 +91,7 @@ cp -f "$HOME/chunkymap/update-chunkymap-on-ubuntu-from-web.sh" "$HOME/" sudo apt-get install python-numpy python-pil python-leveldb echo "" -echo "To see what needs to be in your $MT_MY_WEBSITE_PATH directory (if you don't use that directory, modify chunkymap-regen.py to use your directory):" +echo "To see what needs to be in your website directory (first run minetestinfo.py, generator.py, or singleimage.py to confirms your website directory for automated copying from web folder below):" echo "cd $CHUNKYMAP_DEST/web" echo "" echo "To view helpful scripts:" diff --git a/install-chunkymap-on-windows.py b/install-chunkymap-on-windows.py index df73bde..fe230e8 100644 --- a/install-chunkymap-on-windows.py +++ b/install-chunkymap-on-windows.py @@ -181,7 +181,7 @@ if python_folder_name.lower()[:7]!="python3": if os.path.isdir(installed_pillow_path): downloaded_chunkymap_name="chunkymap.zip" downloaded_chunkymap_path=os.path.join(downloads_path,downloaded_chunkymap_name) - run_py_path="chunkymap-regen.py" + run_py_path="generator.py" remote_chunkymap_path="https://github.com/expertmm/minetest-chunkymap/archive/master.zip" if not os.path.isfile(run_py_path): if not os.path.isfile(downloaded_chunkymap_path): @@ -189,12 +189,12 @@ if python_folder_name.lower()[:7]!="python3": if os.path.isfile(downloaded_chunkymap_path): print("Successfully downloaded "+downloaded_chunkymap_name) else: - print("Failed to download or detect chunkymap-regen.py -- please download "+remote_chunkymap_path) + print("Failed to download or detect "+run_py_path+" -- please download "+remote_chunkymap_path) print("(You must right-click on "+downloaded_chunkymap_path+" then click Extract All, then you can run this file from that folder to redetect a compatible python and write that python to "+run_bat_path) else: print("Now you can run "+run_py_path+" using: ") print(" "+sys.executable+" "+run_py_path) - run_bat_path="chunkymap-regen-loop.bat" + run_bat_path="chunkymap-generator.bat" if os.path.isfile(run_bat_path): os.remove(run_bat_path) outs = open(run_bat_path, 'w') diff --git a/install-on-windows-manually.md b/install-on-windows-manually.md new file mode 100644 index 0000000..d35a79b --- /dev/null +++ b/install-on-windows-manually.md @@ -0,0 +1,33 @@ +# Chunkymap Installation +### OPTIONALLY manual install +(install-chunkymap-on-windows.py does all of required steps in this file automatically) + * put these files anywhere + * python 2.7.x such as from python.org + * run get_python_architecture.py to make sure you know whether to download the following in 32-bit or 64-bit + Administrator Command Prompt (to find it in Win 10, right-click windows menu) + * update python package system: +``` +C:\python27\python -m pip install --upgrade pip wheel setuptools +``` + * numpy such as can be installed via the easy unofficial installer wheel at + http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy + then: +``` +#cd to the folder where you downloaded the whl file +C:\python27\python -m pip install "numpy-1.10.4+mkl-cp27-cp27m-win32.whl" +``` + (but put your specific downloaded whl file instead) + * Pillow (instead of PIL (Python Imaging Library) which is a pain on Windows): there is a PIL installer wheel for Python such as 2.7 here: + http://www.lfd.uci.edu/~gohlke/pythonlibs/ + as suggested on http://stackoverflow.com/questions/2088304/installing-pil-python-imaging-library-in-win7-64-bits-python-2-6-4 + then: +``` +C:\python27\python -m pip install "Pillow-3.1.1-cp27-none-win32.whl" +``` + (but put your specific downloaded whl file instead, such as Pillow-3.1.1-cp27-none-win_amd64.whl) + * run (or if your python executable does not reside in C:\Python27\ then first edit the file): +``` +chunkymap-generator.bat +``` + (all the batch does is run C:\Python27\python generator.py) + (generator.py will ask for configuration options on first run and ask for your www root) \ No newline at end of file diff --git a/minetestinfo.py b/minetestinfo.py index 0a3576f..17698b3 100644 --- a/minetestinfo.py +++ b/minetestinfo.py @@ -1,7 +1,7 @@ import os from expertmm import * -#variables to eliminate from chunkymap-regen (and manage here instead): +#variables to eliminate from generator.py (and managed here centrally instead, so configuration is shared across minetest helper programs): #os_name #self.config (use minetestinfo.get_val instead) #config_name diff --git a/unused/chunkymap-regen-players.bat b/unused/chunkymap-regen-players.bat index ab77cae..75d9683 100644 --- a/unused/chunkymap-regen-players.bat +++ b/unused/chunkymap-regen-players.bat @@ -1,5 +1,5 @@ -C:\Python27\python.exe chunkymap-regen.py --skip-map true --no-loop true -REM C:\Python27\python.exe chunkymap-regen.py --skip-players=true --skip-map=true +C:\Python27\python.exe generator.py --skip-map true --no-loop true +REM C:\Python27\python.exe generator.py --skip-players=true --skip-map=true pause diff --git a/unused/chunkymap-regen-players.sh b/unused/chunkymap-regen-players.sh index 37f2093..62e9379 100644 --- a/unused/chunkymap-regen-players.sh +++ b/unused/chunkymap-regen-players.sh @@ -1,4 +1,4 @@ #!/bin/sh # NOTE: only works since all scripts in /etc/cron.*/ or crontab run as root -python $HOME/chunkymap/chunkymap-regen.py --skip-map true --noloop true +python $HOME/chunkymap/generator.py --skip-map true --noloop true diff --git a/unused/chunkymap-regen.sh b/unused/chunkymap-regen.sh index e70c1b2..da42a7e 100644 --- a/unused/chunkymap-regen.sh +++ b/unused/chunkymap-regen.sh @@ -1,5 +1,5 @@ #!/bin/sh # NOTE: only works since all scripts in /etc/cron.*/ or crontab run as root -python $HOME/chunkymap/chunkymap-regen.py --no-loop true +python $HOME/chunkymap/generator.py --no-loop true