ecmenu/setup-armbian

95 lines
3 KiB
Bash
Executable file

#!/bin/sh
sudo apt update
sudo apt upgrade -y
sudo apt install -y chicken-bin libchicken-dev libchicken11 \
libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev \
flatpak xdg-desktop-portal vim unclutter \
steam-devices wmctrl kde-plasma-desktop kdeconnect plasma-workspace-wayland plasma-settings
sudo systemctl enable bluetooth
blueman-tray &
sudo mkdir -p /etc/systemd/dnssd
cat << EOF > kodi.dnssd
[Service]
Name=%H
Type=_http._tcp
SubType=_kodi
Port=8080
EOF
sudo mv kodi.dnssd /etc/systemd/dnssd/
sudo systemctl restart systemd-resolved.service
flatpak remote-add -u --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
for FPAK in tv.kodi.Kodi org.libretro.RetroArch com.moonlight_stream.Moonlight
do
flatpak install -u -y $FPAK
done
cat <<EOF > led_off.sh
#!/bin/sh
echo none | sudo tee /sys/class/leds/blue_led/trigger
echo none | sudo tee /sys/class/leds/green_led/trigger
EOF
chmod +x led_off.sh
cat <<EOF > "${HOME}/.config/autostart/led_off.desktop"
[Desktop Entry]
Type=Application
Name=led_off
Exec=${HOME}/led_off.sh
X-GNOME-Autostart-enabled=true
EOF
cat <<EOF > "${HOME}/.config/autostart/menu.desktop"
[Desktop Entry]
Type=Application
Name=menu
Exec=${HOME}/ecmenu/menu
X-GNOME-Autostart-enabled=true
EOF
cat <<EOF > "${HOME}/.config/autostart/unclutter.desktop"
[Desktop Entry]
Type=Application
Name=unclutter
Exec=unclutter
X-GNOME-Autostart-enabled=true
EOF
cat <<EOF > "${HOME}/.config/autostart/overscan.desktop"
[Desktop Entry]
Type=Application
# Exec=/home/zilti/overscan-fix.sh
Exec=xrandr --output HDMI-1 --fb 1920x1080 --panning 1920x1080 --transform 1.042,0,-40,0,1.042,-20,0,0,1
X-GNOME-Autostart-enabled=true
NoDisplay=false
Hidden=false
Name[de_DE]=overscan
Comment[de_DE]=No description
X-GNOME-Autostart-Delay=1
EOF
### Steam Link
#flatpak --arch=x86_64 -u install flathub com.valvesoftware.SteamLink
curl http://media.steampowered.com/steamlink/rpi/steamlink-rpi3-1.2.0.241.tar.gz | tar -xzf -
sudo apt install -y libraspberrypi-bin cec-utils
sudo apt install -y libdbus-1-3:armhf libraspberrypi0:armhf libstdc++6:armhf libjpeg62-turbo:armhf \
libglib2.0-0:armhf libgles2:armhf zlib1g:armhf libdbus-1-3:armhf libudev1:armhf libraspberrypi0:armhf libglib2.0-0:armhf libgles2-mesa:armhf libpng16-16:armhf qtbase5-dev:armhf qtchooser:armhf qt5-qmake:armhf qtbase5-dev-tools:armhf
### Stremio
#flatpak --arch=x86_64 -u install flathub com.stremio.Stremio
sudo apt install -y qtcreator qt5-qmake g++ pkgconf libssl-dev librsvg2-bin qml-module-qtwebchannel qml-module-qt-labs-platform qml-module-qtwebengine qml-module-qtquick-dialogs qml-module-qtquick-controls qtdeclarative5-dev qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel libmpv-dev libqt5webview5-dev libkf5webengineviewer-dev libqt5opengl5-dev nodejs
mkdir stremio; cd stremio
git clone --depth=1 --recurse-submodules -j8 https://github.com/Stremio/stremio-shell.git
cd stremio-shell
qmake
make -f release.makefile
cp ./server.js ./build/ && ln -s "$(which node)" ./build/node
cd ../..
### Menu
git clone https://forgejo.lyrion.ch/zilti/ecmenu.git
cd ecmenu
./update