install_deps.sh
5.6 KB
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
#!/bin/bash
# Webcamoid, webcam capture application.
# Copyright (C) 2017 Gonzalo Exequiel Pedone
#
# Webcamoid is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Webcamoid is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Webcamoid. If not, see <http://www.gnu.org/licenses/>.
#
# Web-Site: http://webcamoid.github.io/
set -e
if [ ! -z "${USE_WGET}" ]; then
export DOWNLOAD_CMD="wget -nv -c"
else
export DOWNLOAD_CMD="curl --retry 10 -sS -kLOC -"
fi
if [ -z "${ARCHITECTURE}" ]; then
architecture="${DOCKERIMG%%/*}"
else
case "${ARCHITECTURE}" in
aarch64)
architecture=arm64v8
;;
armv7)
architecture=arm32v7
;;
*)
architecture=${ARCHITECTURE}
;;
esac
fi
# Fix keyboard layout bug when running apt
cat << EOF > keyboard_config
XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
EOF
export LC_ALL=C
export DEBIAN_FRONTEND=noninteractive
apt-get -qq -y update
apt-get install -qq -y keyboard-configuration
cp -vf keyboard_config /etc/default/keyboard
dpkg-reconfigure --frontend noninteractive keyboard-configuration
# Install missing dependencies
apt-get -qq -y update
apt-get -qq -y upgrade
apt-get -qq -y install \
curl \
file \
libdbus-1-3 \
libfontconfig1 \
libgl1 \
libx11-xcb1 \
libxcb-glx0 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-randr0 \
libxcb-render-util0 \
libxcb-shape0 \
libxcb-xinerama0 \
libxext6 \
libxkbcommon-x11-0 \
libxrender1 \
python3-pip \
wget
if [ "${architecture}" = amd64 ]; then
apt-get -qq -y install \
libgpgme11
else
apt-get -qq -y install \
libgpgme11t64
fi
mkdir -p .local/bin
if [[ ( "${architecture}" = amd64 || "${architecture}" = arm64v8 ) && ! -z "${QTIFWVER}" ]]; then
# Install Qt Installer Framework
case "${architecture}" in
arm64v8)
qtArch=arm64
;;
*)
qtArch=x64
;;
esac
qtIFW=QtInstallerFramework-linux-${qtArch}-${QTIFWVER}.run
${DOWNLOAD_CMD} "http://download.qt.io/official_releases/qt-installer-framework/${QTIFWVER}/${qtIFW}" || true
if [ -e "${qtIFW}" ]; then
if [ "${architecture}" = arm64v8 ]; then
ln -svf libtiff.so.6 /usr/lib/aarch64-linux-gnu/libtiff.so.5
ln -svf libwebp.so.7 /usr/lib/aarch64-linux-gnu/libwebp.so.6
fi
chmod +x "${qtIFW}"
QT_QPA_PLATFORM=minimal \
./"${qtIFW}" \
--verbose \
--root ~/QtIFW \
--accept-licenses \
--accept-messages \
--confirm-command \
install
cd .local
cp -rvf ~/QtIFW/* .
cd ..
fi
fi
# Install AppImageTool
case "${architecture}" in
arm64v8)
appimage=appimagetool-aarch64.AppImage
;;
arm32v7)
appimage=appimagetool-armhf.AppImage
;;
*)
appimage=appimagetool-x86_64.AppImage
;;
esac
wget -c -O ".local/${appimage}" "https://github.com/AppImage/AppImageKit/releases/download/${APPIMAGEVER}/${appimage}" || true
if [ -e ".local/${appimage}" ]; then
chmod +x ".local/${appimage}"
cd .local
./${appimage} --appimage-extract || true
if [ -e squashfs-root/usr ]; then
cp -rvf squashfs-root/usr/* .
fi
cd ..
fi
# Install build dependecies
apt-get -y install \
ccache \
clang \
cmake \
dpkg \
fakeroot \
file \
g++ \
git \
libasound2-dev \
libavcodec-dev \
libavdevice-dev \
libavformat-dev \
libavutil-dev \
libgl1-mesa-dev \
libjack-dev \
libkmod-dev \
libpipewire-0.3-dev \
libpipewire-0.3-modules \
libpulse-dev \
libqt6opengl6-dev \
libqt6svg6-dev \
libsdl2-dev \
libswresample-dev \
libswscale-dev \
libusb-dev \
libusb-1.0-0-dev \
libuvc-dev \
libv4l-dev \
libvlc-dev \
libvlccore-dev \
libvulkan-dev \
libwebpdemux2 \
libxext-dev \
libxfixes-dev \
lintian \
linux-libc-dev \
make \
patchelf \
pkg-config \
portaudio19-dev \
qmake6 \
qml6-module-qt-labs-folderlistmodel \
qml6-module-qt-labs-platform \
qml6-module-qt-labs-settings \
qml6-module-qtcore \
qml6-module-qtmultimedia \
qml6-module-qtqml \
qml6-module-qtqml-models \
qml6-module-qtqml-workerscript \
qml6-module-qtquick-controls \
qml6-module-qtquick-dialogs \
qml6-module-qtquick-layouts \
qml6-module-qtquick-nativestyle \
qml6-module-qtquick-shapes \
qml6-module-qtquick-templates \
qml6-module-qtquick-window \
qml6-module-qtquick3d-spatialaudio \
qml6-module-qttest \
qml6-module-qtwayland-compositor \
qt6-declarative-dev \
qt6-l10n-tools \
qt6-multimedia-dev \
qt6-wayland \
rpm \
rpmlint \
vlc-plugin-base \
xvfb
if [[ "${DOCKERIMG}" != */ubuntu:rolling && "${DISTRO}" != ubuntu_devel ]]; then
apt-get -y install \
libqt6multimediaquick6
fi
if [ "${UPLOAD}" != 1 ]; then
apt-get -y install \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
libgstreamer-plugins-base1.0-dev \
libgstreamer1.0-0
fi