-
Notifications
You must be signed in to change notification settings - Fork 7
/
install
executable file
·110 lines (103 loc) · 2.84 KB
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/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/