-
Notifications
You must be signed in to change notification settings - Fork 8
/
_install_linux_X.sh
148 lines (113 loc) · 3.46 KB
/
_install_linux_X.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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#! /bin/bash
sudo apt-get --yes --force-yes install git
cd
rm -Rf ToxBlinkenwall/.git # remove previous install
rm -Rf tmp/
git clone https://github.com/zoff99/ToxBlinkenwall tmp
mkdir -p ToxBlinkenwall/
cp -a tmp/* ToxBlinkenwall/
cp -a tmp/.gitignore ToxBlinkenwall/
cp -a tmp/.git ToxBlinkenwall/
rm -Rf tmp/
cd
export _HOME_=$(pwd)
echo $_HOME_
cd $_HOME_/ToxBlinkenwall/toxblinkenwall/
./initscript.sh stop
# ------------- install packages -------------
sudo apt-get --yes --force-yes install libjpeg-dev libpng-dev imagemagick htop mc fbset cmake qrencode
sudo apt-get --yes --force-yes install libqrencode-dev vim nano wget git make
sudo apt-get --yes --force-yes install autotools-dev libtool bc libv4l-dev libv4lconvert0 v4l-conf v4l-utils
sudo apt-get --yes --force-yes install libopus-dev libvpx-dev pkg-config libjpeg-dev libpulse-dev libconfig-dev
sudo apt-get --yes --force-yes install automake checkinstall check yasm
sudo apt-get --yes --force-yes install libao-dev libasound2-dev
sudo apt-get --yes --force-yes install libgles2-mesa-dev
sudo apt-get --yes --force-yes install imagemagick qrencode
export _SRC_=$_HOME_/src/
export _INST_=$_HOME_/inst/
export CF2=" -O3 -g -ftree-vectorize "
export CF3=" -funsafe-math-optimizations "
export VV1=" VERBOSE=1 V=1 "
rm -Rf $_SRC_
rm -Rf $_INST_
mkdir -p $_SRC_
mkdir -p $_INST_
export LD_LIBRARY_PATH=$_INST_/lib/
cd $_SRC_
git clone --depth=1 --branch=1.0.13 https://github.com/jedisct1/libsodium.git
cd libsodium
./autogen.sh
export CFLAGS=" $CF2 "
./configure --prefix=$_INST_ --disable-shared --disable-soname-versions
make -j 4
make install
cd $_SRC_
git clone --depth=1 --branch=v1.7.0 https://github.com/webmproject/libvpx.git
cd libvpx
make clean
export CFLAGS=" $CF2 $CF3 "
export CXXFLAGS=" $CF2 $CF3 "
./configure --prefix=$_INST_ --disable-examples \
--disable-unit-tests --enable-shared \
--size-limit=16384x16384 \
--enable-onthefly-bitpacking \
--enable-error-concealment \
--enable-runtime-cpu-detect \
--enable-multi-res-encoding \
--enable-postproc \
--enable-vp9-postproc \
--enable-temporal-denoising \
--enable-vp9-temporal-denoising
# --enable-better-hw-compatibility \
make -j 4
make install
cd $_SRC_
git clone --depth=1 --branch=v1.2.1 https://github.com/xiph/opus.git
cd opus
./autogen.sh
export CFLAGS=" $CF2 $CF3 "
export CXXFLAGS=" $CF2 $CF3 "
./configure --prefix=$_INST_ --disable-shared
make -j 4
make install
cd $_SRC_
# git clone https://github.com/TokTok/c-toxcore
git clone https://github.com/zoff99/c-toxcore
cd c-toxcore
git checkout "zoff99/_0.1.10_2017_video_fix_10p"
./autogen.sh
make clean
export CFLAGS=" $CF2 -D_GNU_SOURCE -I$_INST_/include/ -O3 -g -fstack-protector-all "
export LDFLAGS=-L$_INST_/lib
./configure \
--prefix=$_INST_ \
--disable-soname-versions --disable-testing --disable-shared
make -j 4
make install
cd $_HOME_/ToxBlinkenwall/toxblinkenwall/
sed -i -e 'sx#define RPI_NO_Xx// define RPI_NO_Xx' openGL/esUtil.c
gcc $CF2 $CF3 \
-fstack-protector-all \
-Wno-unused-variable \
-fPIC -export-dynamic -I$_INST_/include -o toxblinkenwall -lm \
toxblinkenwall.c openGL/esUtil.c openGL/esShader.c rb.c \
-lEGL -lGLESv2 -lX11 \
-std=gnu99 \
-L$_INST_/lib \
$_INST_/lib/libtoxcore.a \
$_INST_/lib/libtoxav.a \
-lrt \
$_INST_/lib/libopus.a \
$_INST_/lib/libvpx.a \
$_INST_/lib/libsodium.a \
-lasound \
-lpthread -lv4lconvert \
-lm
res2=$?
cd $_HOME_
if [ $res2 -eq 0 ]; then
:
# $_HOME_/ToxBlinkenwall/toxblinkenwall/initscript.sh start
else
echo "ERROR !!"
fi