diff --git a/apps/Scrcpy/description b/apps/Scrcpy/description new file mode 100644 index 0000000..4d16a9b --- /dev/null +++ b/apps/Scrcpy/description @@ -0,0 +1 @@ +Screen Mirror Over USB Or Wireless ADB diff --git a/apps/Scrcpy/icon-24.png b/apps/Scrcpy/icon-24.png new file mode 100644 index 0000000..697d759 Binary files /dev/null and b/apps/Scrcpy/icon-24.png differ diff --git a/apps/Scrcpy/icon-64.png b/apps/Scrcpy/icon-64.png new file mode 100644 index 0000000..41e4f17 Binary files /dev/null and b/apps/Scrcpy/icon-64.png differ diff --git a/apps/Scrcpy/install b/apps/Scrcpy/install new file mode 100755 index 0000000..566acaf --- /dev/null +++ b/apps/Scrcpy/install @@ -0,0 +1,40 @@ +#!/bin/bash + +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + +function error { + echo -e "\\e[91m$1\\e[39m" + exit 1 +} + +echo "Install Scrcpy" +echo -e "==============\n" +echo " · More info scrcpy --help or visiting https://github.com/Genymobile/scrcpy" +echo " · The Android device requires at least API 21 (Android 5.0)." +echo " · Make sure you enabled adb debugging on your device(s)." +echo " · On some devices, you also need to enable an additional option to control it using keyboard and mouse." +echo " · If you have issues, try to run the app a couple of times through Terminal." +echo + +sudo rm -rf ~/scrcpy /usr/local/share/scrcpy ~/.local/share/applications/scrcpy.desktop 2>/dev/null + +"${DIRECTORY}/pkg-install" "adb ffmpeg libsdl2-2.0-0" "$(dirname "$0")" || exit 1 + +wget https://misapuntesde.com/rpi_share/scrcpy-1.13.tar.gz || error "Failed to download!" +tar -xf scrcpy-1.13.tar.gz || error "Failed to extract!" +rm scrcpy-1.13.tar.gz + +ln -s /usr/bin/adb /home/pi/scrcpy/ + +sudo mkdir -p /usr/local/share/scrcpy +sudo cp -af $HOME/scrcpy/scrcpy-server /usr/local/share/scrcpy/scrcpy-server + +echo "[Desktop Entry] +Name=Scrcpy +Exec=$HOME/scrcpy/android.sh +Icon=$(dirname "$0")/icon-64.png +Path=$HOME/scrcpy/ +Type=Application +Comment=Display and control of Android devices connected on USB +Categories=ConsoleOnly;Utility;System;" > ~/.local/share/applications/scrcpy.desktop + diff --git a/apps/Scrcpy/uninstall b/apps/Scrcpy/uninstall new file mode 100755 index 0000000..058a763 --- /dev/null +++ b/apps/Scrcpy/uninstall @@ -0,0 +1,13 @@ +#!/bin/bash + +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + +function error { + echo -e "\\e[91m$1\\e[39m" + exit 1 +} + +#if your app installs any packages, keep this command here so those packages will be removed. +"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 + +sudo rm -rf ~/scrcpy /usr/local/share/scrcpy ~/.local/share/applications/scrcpy.desktop diff --git a/apps/Scrcpy/website b/apps/Scrcpy/website new file mode 100644 index 0000000..5736b14 --- /dev/null +++ b/apps/Scrcpy/website @@ -0,0 +1 @@ +https://github.com/Genymobile/scrcpy