diff --git a/.gitignore b/.gitignore index aa82ac2..bc45daf 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /webapp/screenshots /webapp/program.log /webapp/WIP +/webapp/debug.txt diff --git a/README.md b/README.md index 5ffd8ae..cd79e03 100644 --- a/README.md +++ b/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. * 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. * 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. @@ -42,6 +46,30 @@ The ENLIVEN client runs Minetest, which can be used as a client for other Minete ### 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 (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 @@ -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. #### 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 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 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 (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: * The filenames without extensions diff --git a/patches/subgame/minetest.server-example.conf b/patches/subgame/minetest.server-example.conf index 9bd1a70..1bc41e7 100644 --- a/patches/subgame/minetest.server-example.conf +++ b/patches/subgame/minetest.server-example.conf @@ -43,3 +43,8 @@ enable_bones_chat_msg = true # DEPRECATED? see Bucket_Game/mods/codercore/fallback_spawn static_spawnpoint = 0, 11, 0 + +# only in minetest.org releases: +disable_classic_sneak = true + + diff --git a/webapp/install-mts.sh b/webapp/install-mts.sh index 2a730c0..20962f9 100755 --- a/webapp/install-mts.sh +++ b/webapp/install-mts.sh @@ -22,6 +22,7 @@ flag_icon="$HOME/Desktop/org.minetest.minetest.desktop" flag_file="minetest/bin/minetestserver" if [ -f "$flag_icon" ]; then extra_options="--client" + enable_client=true echo "automatically adding --client to compile since detected" echo "'$flag_icon'--press Ctrl C to cancel..." 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" echo "updating '$HOME/minetest/games/ENLIVEN'..." rsync -rt "patches/Bucket_Game-patched/" "$HOME/minetest/games/ENLIVEN" -if [ ! -f "$HOME/minetest/minetest.Bucket_Game-example.conf" ]; then - cp -f "$HOME/minetest/minetest.conf" "$HOME/minetest/minetest.Bucket_Game-example.conf" +# Bucket_Game doesn't come with a minetest.conf, only minetest.conf.example* files +# 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 -cp -f "patches/subgame/minetest.client-example.conf" "$HOME/minetest/minetest.conf" -cp -f "patches/subgame/minetest.server-example.conf" "$HOME/minetest/games/ENLIVEN/minetest.conf" -if [ -f "/home/owner/i_am_dedicated_minetest_server" ]; then - echo "server_dedicated = true" >> "$HOME/minetest/games/ENLIVEN/minetest.conf" +server_minetest_conf_dest="$HOME/minetest/games/ENLIVEN/minetest.conf" +if [ -f "$server_minetest_conf_dest" ]; then + echo + 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 - echo "server_dedicated = false" >> "$HOME/minetest/games/ENLIVEN/minetest.conf" + echo "server_dedicated = false" >> "$server_minetest_conf_dest" 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 +