Browse Source

Detect and display missing libtool correction...

and detect kstart5 correctly.
master
poikilos 5 years ago
parent
commit
168d068a74
  1. 27
      install-mts.sh
  2. 2
      minetestenv-in-place.rc
  3. 36
      reset-minetest-install-source.sh

27
install-mts.sh

@ -108,16 +108,30 @@ fi
#pushd "$EXTRACTED_SRC_PATH" || customExit "pushd \"$EXTRACTED_SRC_PATH\" failed in \"`pwd`\"" #pushd "$EXTRACTED_SRC_PATH" || customExit "pushd \"$EXTRACTED_SRC_PATH\" failed in \"`pwd`\""
extra_options="" extra_options=""
server_option="--server"
#enable_client_only=false
custom_src_option=""
PATCH_BUILD=$REPO_PATH/mtcompile-program-local.py
# ^ custom_src_option requires $PATCH_BUILD to exist.
for var in "$@" for var in "$@"
do do
if [ "@$var" = "@--client" ]; then if [[ $var = --minetest* ]]; then
custom_src_option="$var"
elif [ "@$var" = "@--client" ]; then
ENABLE_CLIENT=true ENABLE_CLIENT=true
elif [ "@$var" = "@--clean" ]; then elif [ "@$var" = "@--clean" ]; then
enable_clean=true enable_clean=true
echo "* --clean is deprecated." echo "* --clean is deprecated."
elif [ "@$var" = "@--no-server" ]; then
ENABLE_CLIENT=true
server_option=""
elif [ "@$var" = "@--noclean" ]; then elif [ "@$var" = "@--noclean" ]; then
enable_clean=false enable_clean=false
echo "* --noclean is deprecated." echo "* --noclean is deprecated."
elif [ "@$var" = "@--portable" ]; then
extra_options="$extra_options --portable"
else else
customExit "Invalid argument: $var" customExit "Invalid argument: $var"
fi fi
@ -200,15 +214,20 @@ END
start=`date +%s` start=`date +%s`
cd "$EXTRACTED_SRC_PATH" || customExit "cd \"$EXTRACTED_SRC_PATH\" failed." cd "$EXTRACTED_SRC_PATH" || customExit "cd \"$EXTRACTED_SRC_PATH\" failed."
if [ -f "mtcompile-program.pl" ]; then if [ ! -z "$custom_src_option" ]; then
if [ ! -f "$PATCH_BUILD" ]; then
customExit "$PATCH_BUILD must exist when using the --minetest=<path> (custom local copy of minetest source) option")
fi
$PATCH_BUILD build $server_option $extra_options $custom_src_option >& program.log
elif [ -f "mtcompile-program.pl" ]; then
# perl mtcompile-program.pl build >& program.log # perl mtcompile-program.pl build >& program.log
echo "Compiling via perl (this may take a while--output redirected to `pwd`/program.log)..." echo "Compiling via perl (this may take a while--output redirected to `pwd`/program.log)..."
perl mtcompile-program.pl build --server $extra_options >& program.log perl mtcompile-program.pl build $server_option $extra_options >& program.log
else else
# NOTE: no pl in $EXTRACTED_SRC_NAME, assuming bash: # NOTE: no pl in $EXTRACTED_SRC_NAME, assuming bash:
if [ -f mtcompile-program.sh ]; then if [ -f mtcompile-program.sh ]; then
echo "Compiling via bash (this may take a while--output redirected to `pwd`/program.log)..." echo "Compiling via bash (this may take a while--output redirected to `pwd`/program.log)..."
bash -e mtcompile-program.sh build --server $extra_options >& program.log bash -e mtcompile-program.sh build $server_option $extra_options >& program.log
else else
echo echo
echo "ERROR: Install cannot finish since there is no" echo "ERROR: Install cannot finish since there is no"

2
minetestenv-in-place.rc

@ -142,7 +142,7 @@ install_shortcut(){
fi fi
if [ -f "`command -v kquitapp5`" ]; then if [ -f "`command -v kquitapp5`" ]; then
echo "Refreshing KDE icons..." echo "Refreshing KDE icons..."
if [ "`command -v kstart5`" ]; then if [ -f "`command -v kstart5`" ]; then
kquitapp5 plasmashell && kstart5 plasmashell kquitapp5 plasmashell && kstart5 plasmashell
else else
kquitapp5 plasmashell && kstart plasmashell kquitapp5 plasmashell && kstart plasmashell

36
reset-minetest-install-source.sh

@ -253,8 +253,42 @@ if [ ! -f "`command -v patch`" ]; then
fi fi
bash -e mtcompile-libraries.sh build >& libraries.log bash -e mtcompile-libraries.sh build >& libraries.log
mtLibrariesCompileResult=$? mtLibrariesCompileResult=$?
if [ -z "$DEPS" ]; then
DEPS=
fi
if [ -z "$DEPS_INSTALL" ]; then
DEPS_INSTALL=
fi
FEDORA_DEPS="gcc-c++ irrlicht-devel gettext freetype cmake bzip2-devel libpng libjpeg-turbo libXxf86vm mesa-libGLU libsqlite3x-devel libogg-devel libvorbis-devel openal-devel curl-devel luajit-devel lua-devel leveldb-devel ncurses-devel redis hiredis-devel gmp-devel libtool"
FEDORA_DEPS_INSTALL="sudo dnf install -y $FEDORA_DEPS"
UBUNTU_DEPS="libncurses5-dev libgettextpo-dev doxygen libspatialindex-dev libpq-dev postgresql-server-dev-all git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev"
UBUNTU_DEPS_INSTALL="sudo apt-get update && sudo apt-get install -y $UBUNTU_DEPS"
DEPS_INSTALL_MSG="something like $UBUNTU_DEPS_INSTALL #or $FEDORA_DEPS_INSTALL"
if [ ! -f "`command -v dnf`" ]; then
DEPS_INSTALL="$FEDORA_DEPS_INSTALL"
elif [ -f "`command -v yum`" ]; then
FEDORA_DEPS_INSTALL="sudo yum install -y $FEDORA_DEPS"
DEPS_INSTALL="$FEDORA_DEPS_INSTALL"
elif [ -f "`command -v apt`" ]; then
UBUNTU_DEPS_INSTALL="sudo apt update && sudo apt install -y $UBUNTU_DEPS"
DEPS_INSTALL="$UBUNTU_DEPS_INSTALL"
elif [ -f "`command -v apt-get`" ]; then
DEPS_INSTALL="$UBUNTU_DEPS_INSTALL"
fi
if [ ! -z "$DEPS_INSTALL" ]; then
DEPS_INSTALL_MSG="$DEPS_INSTALL"
fi
if [ $mtLibrariesCompileResult -ne 0 ]; then if [ $mtLibrariesCompileResult -ne 0 ]; then
customExit "ERROR: Compiling libraries failed (code $mtLibrariesCompileResult). See $extracted_path/libraries.log" $mtLibrariesCompileResult cat "$extracted_path/libraries.log"
echo
INSTALL_SOURCE_LOG=$HOME/EnlivenMinetest-install-source.log
echo "Try running" > $INSTALL_SOURCE_LOG
echo " $DEPS_INSTALL_MSG" >> $INSTALL_SOURCE_LOG
echo "Make sure you have installed the dependencies (listed in $INSTALL_SOURCE_LOG)."
if [ ! -z "`grep "libtoolize is needed" $extracted_path/libraries.log`" ]; then
echo "You need to install the libtool package to compile the libraries."
fi
customExit "Compiling libraries failed (code $mtLibrariesCompileResult). See the contents of $extracted_path/libraries.log shown above." $mtLibrariesCompileResult
fi fi
end=`date +%s` end=`date +%s`
compile_time=$((end-start)) compile_time=$((end-start))

Loading…
Cancel
Save