Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 40fc5b2ffe
Fetching contributors…

Cannot retrieve contributors at this time

executable file 111 lines (103 sloc) 2.906 kb
#!/bin/sh
echo "Automated SFML Installer from source..."
platform='unknown' ;
unamestr=`uname` ;
if [ "$unamestr" = 'Linux' ] ; then
platform='linux' ;
elif [ "$unamestr" = 'FreeBSD' ]; then
platform='freebsd' ;
elif [ "$unamestr" = 'Darwin' ]; then
platform='darwin' ;
fi
echo "OS: $platform"
#not used for now
processor='unknown' ;
unamestr=`uname -m`
if [ "$unamestr" = 'i686' ] ; then
processor='x86' ;
elif [ "$unamestr" = 'x86_64' ] ; then
processor='x86_64' ;
fi
echo "PROCESSOR: $processor"
if [ ! -e "./deps" ] ; then
echo "Making deps directory..."
mkdir "deps"
fi
cd deps
if [ "$platform" != 'darwin' ] ; then
#openal
if [ ! -e "./openalsoft" ] ; then
echo "Downloading OpenALSoft source"
`/usr/bin/curl -o "./openalsoft.tar.bz2" "http://kcat.strangesoft.net/openal-releases/openal-soft-1.12.854.tar.bz2"`
`tar -xvf "openalsoft.tar.bz2"`
rm ./*.tar.bz2
mv openal-soft*/ openalsoft
cd openalsoft/build
echo "Making OpenALSoft"
`cmake ..`
`make`
echo "Installing OpenALSoft"
`sudo make install`
cd ../..
else
echo "OpenALSoft already exists, remove directory for a fresh compile"
fi
#libsndfile
if [ ! -e "./libsndfile" ] ; then
echo "Downloading libsndfile source"
`/usr/bin/curl -o "libsndfile.tar.gz" "http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.21.tar.gz"`
`tar -xvf "libsndfile.tar.gz"`
rm ./*.tar.gz
mv libsndfile*/ libsndfile
cd libsndfile
echo "Making libsndfile"
`./configure`
`make`
echo "Installing libsndfile"
`sudo make install`
cd ..
else
echo "libsndfile already exists, remove directory for a fresh compile"
fi
fi
#SFML
if [ ! -e "./sfml" ] ; then
echo "Downloading SFML source"
`/usr/bin/svn checkout "http://sfml.svn.sourceforge.net/svnroot/sfml/tags/1.6" "sfml"`
cd sfml
if [ "$platform" != 'darwin' ] ; then
echo "Installing External Frameworks"
if [ "$processor" = 'x86_64' ] ; then
sudo cp extlibs/bin/x86_64/* /Library/Frameworks
else
sudo cp extlibs/bin/OpenAL.framework /Library/Frameworks
sudo cp extlibs/bin/libsndfile.framework /Library/Frameworks
fi
fi
echo "Making SFML"
`make`
if [ "$platform" = 'darwin' ] ; then
echo "Installing SFML Frameworks"
if [ "$processor" = 'x86_64' ] ; then
sudo cp lib64/* /Library/Frameworks
else
sudo cp lib/* /Library/Frameworks
fi
else
echo "Installing SFML"
`sudo make install`
fi
cd ..
else
echo "sfml already exists, remove directory for a fresh compile"
fi
cd ..
echo "Building node-sfml"
if [ -e "./build" ] ; then
node-waf distclean
fi
node-waf configure build
if [ ! -e "./lib" ] ; then
mkdir lib
fi
cp ./build/default/nodesfml.node ./lib/
Jump to Line
Something went wrong with that request. Please try again.