Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add RPiPlay app #1975

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/RPiPlay/credits
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FD- (GitHub)
CleanMachine1 (GitHub)
4 changes: 4 additions & 0 deletions apps/RPiPlay/description
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Open-source AirPlay mirroring server for the Raspberry Pi. Supports Apple devices with iOS 9 and up.
Note: To exit the application, press CTRL+C to exit or close the connection to your iOS device.

Run from the Main Menu > Accessories > RPiPlay
Binary file added apps/RPiPlay/icon-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/RPiPlay/icon-64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions apps/RPiPlay/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash

# Install dependencies
install_packages cmake libavahi-compat-libdnssd-dev libplist-dev libssl-dev zenity || exit 1

# Prepare source
sudo rm -rf ~/RPiPlay
git_clone https://github.com/FD-/RPiPlay.git || error "Failed to git clone RPiPlay source code."
cd RPiPlay/ || error "Failed to enter RPiPlay directory."
mkdir build && cd build || error "Failed to create/enter build directory."

# Compile
cmake .. || error "Failed to run cmake."
make || error "Failed to run make."
sudo make install || error "Failed to install RPiPlay system-wide."

# Create run script
echo "#!/bin/bash
yn=$(zenity --title "RPiPlay" --text "Please configure whether you would like sound output from either \nHDMI or analog. \nNOTE: When the application starts press CTRL+C to exit or close the\nconnection from your iOS device." --list --radiolist --column "Choice" --column "Answer" HDMI HDMI Analog Analog )
if [ "$yn" = "HDMI" ]; then
echo "RPiPlay starting with HDMI audio output."
$DIRECTORY/etc/terminal-run "rpiplay -a hdmi -b auto" RPiPlay
elif [ "$yn" = "Analog" ]; then
echo "RPiPlay starting with analog audio output."
$DIRECTORY/etc/terminal-run "rpiplay -a analog -b auto" RPiPlay
else
echo "RPiPlay starting with automatic audio output selection."
$DIRECTORY/etc/terminal-run "rpiplay -b auto" RPiPlay
fi" > startrpiplay || error "Failed to create start script."
chmod +x startrpiplay
sudo mv startrpiplay /usr/local/bin/ || error "Failed to move start script to /usr/local/bin."

# Create desktop entry
echo "[Desktop Entry]
Name=RPiPlay
GenericName=AirPlay Mirroring
Comment=Open-source AirPlay mirroring server
Exec=startrpiplay
Icon=$(dirname "$0")/icon-64.png
Terminal=false
StartupNotify=true
Type=Application
Categories=Utility;" > ~/.local/share/applications/rpiplay.desktop || error "Failed to create desktop entry."

# Clean up
sudo rm -rf ~/RPiPlay
7 changes: 7 additions & 0 deletions apps/RPiPlay/uninstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

sudo rm -rf ~/RPiPlay
sudo rm -f /usr/local/bin/rpiplay || error "Failed to remove /usr/local/bin/rpiplay binary."
sudo rm -f /usr/local/bin/startrpiplay || error "Failed to remove /usr/local/bin/startrpiplay script."

purge_packages || exit 1
1 change: 1 addition & 0 deletions apps/RPiPlay/website
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/FD-/RPiPlay