Browse Source

fix use of renamed files

master
poikilos 9 years ago
committed by Jacob Gustafson
parent
commit
4508a49469
  1. 33
      README.md
  2. 2
      chunkymap-generator.bat
  3. 8
      chunkymap-generator.sh
  4. 2
      expertmmregressionsuite.py
  5. 2
      generator.py
  6. 6
      install-chunkymap-on-ubuntu.sh
  7. 6
      install-chunkymap-on-windows.py
  8. 33
      install-on-windows-manually.md
  9. 2
      minetestinfo.py
  10. 4
      unused/chunkymap-regen-players.bat
  11. 2
      unused/chunkymap-regen-players.sh
  12. 2
      unused/chunkymap-regen.sh

33
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

2
chunkymap-generator.bat

@ -1 +1 @@
C:\Python27\python.exe chunkymap-regen.py
C:\Python27\python.exe generator.py

8
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

2
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):

2
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()

6
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:"

6
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')

33
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)

2
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

4
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

2
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

2
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

Loading…
Cancel
Save