Browse Source

use preset dir for build-MultiCraft.sh and improve dependency script output

master
poikilos 5 years ago
committed by Jacob Gustafson
parent
commit
ccbe0f3a75
  1. 16
      build-MultiCraft.sh
  2. 15
      install-minetest-build-deps.sh

16
build-MultiCraft.sh

@ -13,14 +13,19 @@ customDie() {
echo
exit 1
}
if [ ! -d "$HOME/Downloads/git/MultiCraft" ]; then
mkdir -p "$HOME/Downloads/git/MultiCraft"
fi
cd $HOME/Downloads/git/MultiCraft || customDie "cd $HOME/Downloads/git/MultiCraft FAILED"
goodFlagFile=MultiCraft/CMakeLists.txt
if [ -f "`which git`" ]; then
echo "In `pwd`..."
if [ ! -d MultiCraft ]; then
git clone https://github.com/MultiCraft/MultiCraft.git || customDie "Cannot clone MultiCraft from `pwd`"
cd MultiCraft || customDie "Cannot cd MultiCraft from `pwd`"
else
cd MultiCraft || customDie "Cannot cd MultiCraft from `pwd`"
git pull || customDie "Cannot pull MultiCraft from `pwd`"
git pull || echo "WARNING: Cannot pull MultiCraft from `pwd`"
fi
else
if [ ! -f "$goodFlagFile" ]; then
@ -33,8 +38,13 @@ srcPath=.
flag1="-DOpenGL_GL_PREFERENCE=GLVND"
echo
echo "Running cmake srcPath..."
cmake $srcPath $flag1 || customDie "cmake failed. See any messages above for more information."
cmake $srcPath $flag1 -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1 || customDie "cmake failed. See any messages above for more information. Run ./install-minetest-build-deps.sh if you did not."
echo
echo "Running make..."
make
make -j$(nproc) || customDie "make failed. See any messages above for more information. Run ./install-minetest-build-deps.sh if you did not."
if [ -f "`pwd`/bin/MultiCraft" ]; then
echo "`pwd`/bin/MultiCraft"
else
echo "`pwd`"
fi
echo "Done."

15
install-minetest-build-deps.sh

@ -40,10 +40,11 @@ else
fi
if [ ! -z "$this_apt" ]; then
echo "Using $this_apt..."
# sudo $this_apt -y remove minetest-server
# sudo $this_apt -y remove minetest
sudo $this_apt update
sudo $this_apt -y install \
sudo $this_apt update
sudo $this_apt -y install \
autoconf automake autopoint autotools-dev \
bash binutils bison bzip2 \
cmake coreutils e2fsprogs expat \
@ -61,7 +62,7 @@ sudo $this_apt -y install \
python-dev rake ruby sed \
tar tcl unzip util-linux \
wget xz-utils zip \
\
\
libcurl4-openssl-dev \
libfreetype6-dev \
libgdk-pixbuf2.0-dev \
@ -69,7 +70,7 @@ sudo $this_apt -y install \
libxml-parser-perl \
xserver-xorg-dev
#libcurl4-openssl-dev: for announce to work
#libcurl4-openssl-dev: for announce to work
if [ "$enable_redis" = "true" ]; then
@ -85,9 +86,10 @@ sudo $this_apt -y install \
elif [ -f "`command -v pacman`" ]; then
echo "Using pacman..."
# sudo pacman -R --noconfirm minetest-server
# sudo pacman -R --noconfirm minetest
sudo pacman -Syu --noconfirm \
sudo pacman -Syu --noconfirm \
autoconf automake bzip2 cmake \
curl expat flex freetype2 \
gcc git gmp libedit \
@ -108,9 +110,10 @@ sudo pacman -Syu --noconfirm \
fi
elif [ ! -z "$this_dnf" ]; then
echo "Using $this_dnf..."
# sudo $this_dnf -y remove minetest-server
# sudo $this_dnf -y remove minetest
sudo $this_dnf -y install \
sudo $this_dnf -y install \
autoconf automake bzip2 \
bzip2-devel cmake expat-devel \
flex fontconfig-devel freetype-devel \

Loading…
Cancel
Save