Skip to content

Instantly share code, notes, and snippets.

@sixman9
Created November 28, 2012 17:08
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sixman9/4162581 to your computer and use it in GitHub Desktop.
Save sixman9/4162581 to your computer and use it in GitHub Desktop.
Build Unofficial Moai Lua game development on Linux
#!/bin/bash
#moaiLinuxUnoffical.sh
#Determine the OS architecture (32/64bit) using 'uname -m', then run the required commands (see http://stackoverflow.com/a/106416/304330)
ourArch=$(uname -m)
#Linux-friendly version of Moai
#see also git://github.com/shadowmint/moai-dev.git
githubRepoOwner="spacepluk"
gitRepoName="moai-dev"
gitRepoDir="$gitRepoName.$githubRepoOwner"
gitLinuxBranchName="linux-cmake"
cmakeTopDir="../cmake"
# Install the dependencies:
sudo aptitude install freeglut3-dev libglew-dev libglu1-mesa-dev libxmu-dev libxi-dev chipmunk-dev libjpeg8-dev libpng-dev libfreetype6-dev liblua5.1-0-dev libjansson-dev libtinyxml-dev libcurl4-openssl-dev zlib1g-dev libexpat1-dev cmake build-essential libasound2-dev libvorbis-dev libpulse-dev
if [ ! -d "./$gitRepoDir" ]; then
#Clone a Linux-capable version of Moai and check-out the Linux git branch
git clone -b $gitLinuxBranchName https://github.com/$githubRepoOwner/$gitRepoName.git $gitRepoDir
fi
#Change to repo dir
cd "$gitRepoDir"
#Create out of source build dir
mkdir build
#Change to build dir, clear out the director, then run CMake
cd build
rm -fr ../build/*
cmake $cmakeTopDir
make -j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment