Last active
April 27, 2017 18:58
-
-
Save dmcyk/13d6888970c1cb0c470ca6f3107a8740 to your computer and use it in GitHub Desktop.
MSIwG_setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
errLogPath=".err.log" | |
exec 3>&1 | |
exec > /dev/null 2> $errLogPath | |
echo "" > $errLogPath | |
function echoStd { | |
while (( "$#" )); do | |
echo $1 >&3 | |
shift | |
done | |
} | |
function close { | |
exec 3>&- | |
} | |
function checkExit { | |
if [[ $? != 0 ]]; then | |
echoStd "installation error" | |
exit $?; | |
fi | |
} | |
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
checkExit | |
export DEBIAN_FRONTEND=noninteractive | |
echoStd "Installing dependencies, this might take a while..." | |
sudo apt-get update | |
sudo apt-get -y install vim git | |
runDir=$PWD | |
echoStd "Instaliing at $runDir" | |
git clone https://github.com/BP6-14-15/MSIwG MSIwG | |
checkExit | |
cd MSIwG/engine | |
./clangSetup.sh $runDir >&3 | |
checkExit | |
cd example | |
echo "CXX=clang++-4.0 cmake ./ -DLIBCXXPATH=$runDir" > buildScript.sh | |
echo "make" >> buildScript.sh | |
chmod +x buildScript.sh | |
cp buildScript.sh ../source/ | |
cd .. | |
echoStd "Installing engine dependencies..." | |
./engineDependencies.sh | |
echoStd "Generating conf files..." | |
cd source | |
echo "#!/bin/bash" > run.sh | |
echo "export LD_LIBRARY_PATH=\"$runDir/LLVM/build/lib\" | |
./GameEngine | |
#./GameEngine --fpLibPath=../example/libclientA.so --fpFcnName=updatePlayer | |
" >> run.sh | |
chmod +x run.sh | |
echoStd "Done" | |
close |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment