axmol/build/install-deps-linux.sh

57 lines
1.3 KiB
Bash
Raw Normal View History

#!/bin/bash
2013-09-17 18:05:10 +08:00
# Change directory to the location of this script
cd $(dirname ${BASH_SOURCE[0]})
if [ ! $(command -v apt-get) ]; then
echo "Not a .deb package system. Please install dependencies manually"
exit 0
fi
2015-01-14 14:22:08 +08:00
#install g++-4.9
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
2015-01-14 14:43:01 +08:00
#try to remove glfw2
sudo apt-get remove libglfw2
DEPENDS='libx11-dev'
DEPENDS+=' libxmu-dev'
DEPENDS+=' libglu1-mesa-dev'
DEPENDS+=' libgl2ps-dev'
DEPENDS+=' libxi-dev'
2015-01-14 14:22:08 +08:00
DEPENDS+=' g++-4.9'
DEPENDS+=' libzip-dev'
DEPENDS+=' libpng12-dev'
DEPENDS+=' libcurl4-gnutls-dev'
DEPENDS+=' libfontconfig1-dev'
DEPENDS+=' libsqlite3-dev'
2015-01-14 14:22:08 +08:00
DEPENDS+=' libglew-dev'
2014-02-13 10:08:03 +08:00
DEPENDS+=' libssl-dev'
MISSING=
echo "Checking for missing packages ..."
for i in $DEPENDS; do
if ! dpkg-query -W --showformat='${Status}\n' $i | grep "install ok installed" > /dev/null; then
MISSING+="$i "
fi
done
2015-01-14 14:22:08 +08:00
if [ -f /usr/bin/g++ ];then
sudo rm /usr/bin/g++
echo "remove old g++"
fi
sudo ln -s /usr/bin/g++-4.9 /usr/bin/g++
if [ -n "$MISSING" ]; then
TXTCOLOR_DEFAULT="\033[0;m"
TXTCOLOR_GREEN="\033[0;32m"
echo -e $TXTCOLOR_GREEN"Missing packages: $MISSING.\nYou may be asked for your password for package installation."$TXTCOLOR_DEFAULT
sudo apt-get --force-yes --yes install $MISSING
fi
2013-09-17 16:04:44 +08:00
# install glfw
2013-10-22 18:01:56 +08:00
../tools/travis-scripts/install_glfw.sh
2013-09-17 16:04:44 +08:00