-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquick_install.sh
executable file
·53 lines (37 loc) · 1.29 KB
/
quick_install.sh
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
#!/bin/bash
####################
## ENV ##
####################
function export_env {
echo "Exporting env variables"
export INSTALL_DIR=`pwd`
export LOG_PATH="`pwd`/errors.logs"
export PATH="$INSTALL_DIR/bin:$PATH"
}
function export_env_bash
{
echo "export PATH=\"${INSTALL_DIR}/bin:${PATH}\"" >> ~/.bashrc
echo "export LD_LIBRARY_PATH=\"${INSTALL_DIR}/lib\"" >> ~/.bashrc
}
function build_irrlicht {
echo "Building Irrlicht"
unzip -o Irrlicht.zip 2>> ${LOG_PATH} 1> /dev/null
sed -e "s@#define _IRR_LINUX_X11_VIDMODE_@//#define _IRR_LINUX_X11_VIDMODE_@g" -i irrlicht-1.8.4/include/IrrCompileConfig.h # disable full screeen capability
cd irrlicht-1.8.4/source/Irrlicht
make CXXINCS="-I../../include -Izlib -Ijpeglib -Ilibpng -I${INSTALL_DIR}/include" LDFLAGS="-L${INSTALL_DIR}lib" sharedlib
make CXXINCS="-I../../include -Izlib -Ijpeglib -Ilibpng -I${INSTALL_DIR}/include" LDFLAGS="-L${INSTALL_DIR}lib"
make CXXINCS="-I../../include -Izlib -Ijpeglib -Ilibpng -I${INSTALL_DIR}/include" LDFLAGS="-L${INSTALL_DIR}lib" INSTALL_DIR=${INSTALL_DIR}/lib install
cd ../../..
}
####################
## EXECUTION ##
####################
mkdir -p install
cd install
cp ../Irrlicht.zip .
export_env
# Stop script on error
set -e
build_irrlicht
export_env_bash
echo "SUCCESS"