Browse Source

fix logic for installing confs, disable_classic_sneak = true

resolves #96 (disable_classic_sneak is false by default, for backward
compatibility with worlds that have glitch elevators)
master
poikilos 6 years ago
committed by Jacob Gustafson
parent
commit
601545c1a8
  1. 1
      .gitignore
  2. 36
      README.md
  3. 5
      patches/subgame/minetest.server-example.conf
  4. 90
      webapp/install-mts.sh

1
.gitignore

@ -7,3 +7,4 @@
/webapp/screenshots /webapp/screenshots
/webapp/program.log /webapp/program.log
/webapp/WIP /webapp/WIP
/webapp/debug.txt

36
README.md

@ -28,9 +28,13 @@ There are several improvements I may implement in new or existing mods. See the
* Any script code related to redis has not been successfully tested. * Any script code related to redis has not been successfully tested.
* Make sure you convert your world to leveldb and place it in your server's worlds folder $HOME/.minetest/worlds/, as this set of scripts hasn't been tested with any other database nor worlds folder location, and nightly backup scripts cater to leveldb. * Make sure you convert your world to leveldb and place it in your server's worlds folder $HOME/.minetest/worlds/, as this set of scripts hasn't been tested with any other database nor worlds folder location, and nightly backup scripts cater to leveldb.
## How to use:
### Windows Client: ## Install
## How to use
### Windows Client
Click "Releases" for the installer, which has the singleplayer and multiplayer client for ENLIVEN. Click "Releases" for the installer, which has the singleplayer and multiplayer client for ENLIVEN.
* alternate download site is [expertmultimedia.com](http://www.expertmultimedia.com/index.php?htmlref=tutoring.html "Expert Multimedia") * alternate download site is [expertmultimedia.com](http://www.expertmultimedia.com/index.php?htmlref=tutoring.html "Expert Multimedia")
* you must install to C:\Games\ENLIVEN (or possibly other path without spaces, as long as you don't move the launcher) in order for ENLIVEN to run. * you must install to C:\Games\ENLIVEN (or possibly other path without spaces, as long as you don't move the launcher) in order for ENLIVEN to run.
@ -42,6 +46,30 @@ The ENLIVEN client runs Minetest, which can be used as a client for other Minete
### Server ### Server
#### Install on linux server
* open terminal (root NOT recommended)
* IF you are a decicated server, first run `touch $HOME/i_am_dedicated_minetest_server` then run:
```bash
if [ ! -d webapp ]; then
echo "ERROR: this will only work from the extracted or cloned EnlivenMinetest directory"
echo "Press Ctrl C, or this terminal will exit..."
sleep 1
echo "3..."
sleep 1
echo "2..."
sleep 1
echo "1..."
sleep 1
exit 1
fi
cd webapp
bash reset-minetest.sh
bash install-mts.sh
# If you want to install the client, you should instead run
# bash install-mts.sh --client
# (defaults to client if $HOME/Desktop/org.minetest.minetest.desktop file exists)
```
### mtanalyze ### mtanalyze
(not maintained, kept for legacy use--if you fix anything, please submit a pull request) (not maintained, kept for legacy use--if you fix anything, please submit a pull request)
* mtanalyze is a set of tools including a live map for Minetest servers and singleplayer if using LevelDB * mtanalyze is a set of tools including a live map for Minetest servers and singleplayer if using LevelDB
@ -53,8 +81,8 @@ The ENLIVEN client runs Minetest, which can be used as a client for other Minete
* If you have a dedicated server, the value server_dedicated = false should be changed to server_dedicated = true in your SERVER's minetest.conf in the ENLIVEN folder that the installer creates. * If you have a dedicated server, the value server_dedicated = false should be changed to server_dedicated = true in your SERVER's minetest.conf in the ENLIVEN folder that the installer creates.
#### Security and Performance Notes #### Security and Performance Notes
* The installer script changes owner and group for ENLIVEN's world.mt and world.mt.1st if present to $USER * The root installer script (deprecated) changes owner and group for ENLIVEN's world.mt and world.mt.1st if present to $USER
* The included minetest.conf recommended for your clients includes the line enable_local_map_saving = true, which will cache the world locally on their machines. You can feel free to change that according to your preference. * The included minetest.conf recommended for your clients (patches/subgame/minetest.*client.conf) includes the line enable_local_map_saving = true, which will cache the world locally on their machines. You can feel free to change that according to your preference.
## Naming conventions: ## Naming conventions:
* The filenames without extensions * The filenames without extensions

5
patches/subgame/minetest.server-example.conf

@ -43,3 +43,8 @@ enable_bones_chat_msg = true
# DEPRECATED? see Bucket_Game/mods/codercore/fallback_spawn # DEPRECATED? see Bucket_Game/mods/codercore/fallback_spawn
static_spawnpoint = 0, 11, 0 static_spawnpoint = 0, 11, 0
# only in minetest.org releases:
disable_classic_sneak = true

90
webapp/install-mts.sh

@ -22,6 +22,7 @@ flag_icon="$HOME/Desktop/org.minetest.minetest.desktop"
flag_file="minetest/bin/minetestserver" flag_file="minetest/bin/minetestserver"
if [ -f "$flag_icon" ]; then if [ -f "$flag_icon" ]; then
extra_options="--client" extra_options="--client"
enable_client=true
echo "automatically adding --client to compile since detected" echo "automatically adding --client to compile since detected"
echo "'$flag_icon'--press Ctrl C to cancel..." echo "'$flag_icon'--press Ctrl C to cancel..."
flag_file="minetest/bin/minetest" flag_file="minetest/bin/minetest"
@ -132,13 +133,88 @@ echo "updating '$HOME/minetest/games/ENLIVEN/menu'..."
rsync -rt "patches/subgame/menu/" "$HOME/minetest/games/ENLIVEN/menu" rsync -rt "patches/subgame/menu/" "$HOME/minetest/games/ENLIVEN/menu"
echo "updating '$HOME/minetest/games/ENLIVEN'..." echo "updating '$HOME/minetest/games/ENLIVEN'..."
rsync -rt "patches/Bucket_Game-patched/" "$HOME/minetest/games/ENLIVEN" rsync -rt "patches/Bucket_Game-patched/" "$HOME/minetest/games/ENLIVEN"
if [ ! -f "$HOME/minetest/minetest.Bucket_Game-example.conf" ]; then # Bucket_Game doesn't come with a minetest.conf, only minetest.conf.example* files
cp -f "$HOME/minetest/minetest.conf" "$HOME/minetest/minetest.Bucket_Game-example.conf" # if [ ! -f "$HOME/minetest/minetest.Bucket_Game-example.conf" ]; then
# cp -f "$HOME/minetest/minetest.conf" "$HOME/minetest/minetest.Bucket_Game-example.conf"
# fi
client_example_dest="$HOME/minetest/minetest.ENLIVEN.client-example.conf"
# client conf writing only ever happens once, unless you manually delete $client_example_dest file:
if [ ! -f "$client_example_dest" ]; then
if [ -f "$HOME/minetest/minetest.conf" ]; then
if [ ! -f "$HOME/minetest/minetest.conf.1st" ]; then
cp -f "$HOME/minetest/minetest.conf" "$HOME/minetest/minetest.conf.1st"
else
cp -f "$HOME/minetest/minetest.conf" "$HOME/minetest/minetest.conf.bak"
fi
fi
cp -f "patches/subgame/minetest.client-example.conf" "$HOME/minetest/minetest.conf"
cp -f "patches/subgame/minetest.LAN-client-example.conf" "$HOME/minetest/minetest.ENLIVEN.LAN-client-example.conf"
cp -f "patches/subgame/minetest.server-example.conf" "$HOME/minetest/minetest.ENLIVEN.server-example.conf"
cp -f "patches/subgame/minetest.client-example.conf" "$client_example_dest"
fi fi
cp -f "patches/subgame/minetest.client-example.conf" "$HOME/minetest/minetest.conf" server_minetest_conf_dest="$HOME/minetest/games/ENLIVEN/minetest.conf"
cp -f "patches/subgame/minetest.server-example.conf" "$HOME/minetest/games/ENLIVEN/minetest.conf" if [ -f "$server_minetest_conf_dest" ]; then
if [ -f "/home/owner/i_am_dedicated_minetest_server" ]; then echo
echo "server_dedicated = true" >> "$HOME/minetest/games/ENLIVEN/minetest.conf" echo "NOTE: $server_minetest_conf_dest will be overwritten (minetest.org releases allow you to put a world.conf file in your world, so that should be customized instead)..."
echo
fi
cp -f "patches/subgame/minetest.server-example.conf" "$server_minetest_conf_dest"
if [ -f "$HOME/i_am_dedicated_minetest_server" ]; then
echo "server_dedicated = true" >> "$server_minetest_conf_dest"
else else
echo "server_dedicated = false" >> "$HOME/minetest/games/ENLIVEN/minetest.conf" echo "server_dedicated = false" >> "$server_minetest_conf_dest"
fi fi
enable_clear_icon_cache=false
if [ "@$enable_client" = "@true" ]; then
dest_icons=$HOME/.local/share/applications
dest_icon=$dest_icons/org.minetest.minetest.desktop
# if [ -f "$dest_icon" ]; then
# comment since never fixes broken icon anyway
# TODO: fixed bad cache even if icon was rewritten properly after written improperly
# * not tried yet:
# * rm $HOME/.kde/share/config/kdeglobals
# enable_clear_icon_cache=true
# fi
echo "Writing icon '$dest_icon'..."
cat "patches/deploy-patched/misc/org.minetest.minetest.desktop" | grep -v Icon | grep -v Path | grep -v Exec > "$dest_icon"
# Icon must be an absolute path (other variables use $HOME in
# desktop file above), so exclude it above and rewrite it below:
echo "Icon=$HOME/minetest/misc/minetest-xorg-icon-128.png" >> "$dest_icon"
echo "Path=$HOME/minetest/bin" >> "$dest_icon"
echo "Exec=$HOME/minetest/bin/minetest" >> "$dest_icon"
if [ "@$enable_clear_icon_cache" = "@true" ]; then
if [ -f "`command -v gnome-shell`" ]; then
echo "Refreshing Gnome icons..."
gnome-shell --replace & disown
sleep 10
fi
if [ -f "$HOME/.cache/icon-cache.kcache" ]; then
echo "clearing $HOME/.cache/icon-cache.kcache..."
rm $HOME/.cache/icon-cache.kcache
fi
if [ -f "`command -v kquitapp5`" ]; then
echo "Refreshing KDE icons..."
if [ "`command -v kstart5`" ]; then
kquitapp5 plasmashell && kstart5 plasmashell
else
kquitapp5 plasmashell && kstart plasmashell
fi
sleep 15
fi
if [ -f "`command -v xfce4-panel`" ]; then
echo "Refreshing Xfce icons..."
xfce4-panel -r && xfwm4 --replace
sleep 5
fi
if [ -f "`command -v lxpanelctl`" ]; then
echo "Refreshing LXDE icons..."
lxpanelctl restart && openbox --restart
sleep 5
fi
fi
fi
echo "Done."
echo
echo

Loading…
Cancel
Save