aboutsummaryrefslogtreecommitdiff
path: root/install.sh
blob: 64ee28f088ff93e2f6825f13172cf84a99dbb04b (plain)
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
#!/bin/sh -e

script_dir=$(dirname "$0")
cd "$script_dir"

[ $(id -u) -ne 0 ] && echo "You need root privileges to run the install script" && exit 1

curl -sfL 'https://dec05eba.com/files/twemoji.tar.gz' -o /tmp/twemoji.tar.gz
mkdir -p /usr/share/quickmedia/emoji
tar xf /tmp/twemoji.tar.gz --directory=/usr/share/quickmedia/emoji
rm -f /tmp/twemoji.tar.gz

sibs build --release video_player
sibs build --release

install -Dm755 "video_player/sibs-build/$(sibs platform)/release/quickmedia-video-player" "/usr/bin/quickmedia-video-player"
install -Dm755 "sibs-build/$(sibs platform)/release/quickmedia" "/usr/bin/quickmedia"
ln -sf "/usr/bin/quickmedia" "/usr/bin/qm"
install -Dm644 boards.json "/usr/share/quickmedia/boards.json"

install -Dm644 example-config.json "/usr/share/quickmedia/example-config.json"
install -Dm644 README.md "/usr/share/quickmedia/README.md"

install -Dm644 mpv/fonts/Material-Design-Iconic-Font.ttf "/usr/share/quickmedia/mpv/fonts/Material-Design-Iconic-Font.ttf"
install -Dm644 mpv/scripts/mordenx.lua "/usr/share/quickmedia/mpv/scripts/mordenx.lua"
install -Dm644 mpv/scripts/ytdl_hook.lua "/usr/share/quickmedia/mpv/scripts/ytdl_hook.lua"
install -Dm644 mpv/input.conf "/usr/share/quickmedia/mpv/input.conf"
install -Dm644 mpv/mpv.conf "/usr/share/quickmedia/mpv/mpv.conf"

for file in images/* icons/* shaders/* themes/*; do
    install -Dm644 "$file" "/usr/share/quickmedia/$file"
done

for file in launcher/*; do
    filename=$(basename "$file")
    install -Dm644 "$file" "/usr/share/applications/$filename"
done

echo "Successfully installed QuickMedia"