27 Star 72 Fork 48

kytooooo / NoahGameFrame

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
install4cmake.sh 2.31 KB
一键复制 编辑 原始数据 按行查看 历史
ketoo 提交于 2020-12-15 22:03 . tips
# make sure cmake is installed
cmake --version
if [ $? -ne 0 ]; then
echo "[ERROR] Please install cmake first."
echo "[ubuntu] apt-get -y install cmake or [centos] yum -y install cmake or [mac] brew install cmake"
exit 1
fi
unzip -v
if [ $? -ne 0 ]; then
echo "[ERROR] Please install unzip first."
echo "[ubuntu] sudo apt-get -y install curl zip unzip tar or [centos] yum -y install unzip or [mac] brew install unzip"
exit 1
fi
automake --version
if [ $? -ne 0 ]; then
echo "[ERROR] Please install automake first."
echo "[ubuntu] sudo apt-get -y install automake or [centos] yum -y install automake or [mac] brew install automake"
exit 1
fi
if grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
DISTRO='CentOS'
elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
DISTRO='Ubuntu'
else
DISTRO='unknow'
fi
sysOS=`uname -s`
if [ $sysOS == "Darwin" ];then
gcc --version
if [ $? -ne 0 ]; then
echo "[ERROR] Please install gcc first."
echo "[mac] brew install gcc"
#exit 1
fi
elif [ $sysOS == "Linux" ];then
if [ $DISTRO == "Ubuntu" ]; then
g++ --version
if [ $? -ne 0 ]; then
echo "[ERROR] Please install g++ first."
echo "[Ubuntu] sudo apt-get -y install g++"
exit 1
fi
elif [ $DISTRO == "CentOS" ]; then
g++ --version
if [ $? -ne 0 ]; then
echo "[ERROR] Install g++ first, minimum version is 7.0.0"
echo "[CentOS Step 1] yum install centos-release-scl -y"
echo "[CentOS Step 2] yum install devtoolset-7 -y"
echo "[CentOS Step 3] scl enable devtoolset-7 bash"
exit 1
fi
currentver="$(gcc -dumpfullversion -dumpversion)"
requiredver="7.0.0"
if [ ! "$(printf '%s\n' "$requiredver" "$currentver" | sort -V | head -n1)" = "$requiredver" ]; then
echo "[ERROR] Upgrate g++ first, minimum version is 7.0.0"
echo "[CentOS Step 1] yum install centos-release-scl -y"
echo "[CentOS Step 2] yum install devtoolset-7 -y"
echo "[CentOS Step 3] scl enable devtoolset-7 bash"
exit 1
fi
fi
fi
#g++ sudo apt-get -y install g++
#unzip sudo apt-get -y install unzip
#compile dep libraries
rm -rf ./_Out/Debug
rm -rf ./_Out/Release
cd ./Dependencies
chmod -R 755 build_dep.sh
./build_dep.sh
cd ../
./buildServer.sh
#pwd
C++
1
https://gitee.com/kytoo/NoahGameFrame.git
git@gitee.com:kytoo/NoahGameFrame.git
kytoo
NoahGameFrame
NoahGameFrame
master

搜索帮助