Here are the steps I went through, to the best of my knowledge. Be sure you understand the commands used before blindly typing them in. My UNIX knowledge is rusty. There are probably more efficient ways to step through this process. I am open to feedback on the steps.
I wrote this like a script, but it is not meant to be run like one.
This was for a Raspberry Pi B. My laptop is a MacBook running Mojave (10.14.6).
# Connect to Raspberry Pi from Laptop
ssh osmc@<IP Address>
# Set Password (Default is osmc) This is just good practice.
passwd osmc
# Make sure apt-get database is up-to-date
sudo apt-get update
# Essential tools for compiling, missing from OSMC
sudo apt-get install build-essential
sudo apt-get install git
# OpenMAX Headers
# This populates most of /opt/vc libraries
sudo apt-get install rbp-userland-dev-osmc
# Create a directory for downloading stuff, for good housekeeping
cd
mkdir Downloads
cd Downloads
# Get missing /opt/vc libraries from GitHub (those in /opt/vc/src)
# It is large, over 1GB for the full repository.
# I couldn’t figure out how to only download the part I needed without
# doing it one file at a time.
git clone GitHub - raspberrypi/firmware: This repository contains pre-compiled binaries of the current Raspberry Pi kernel and modules, userspace libraries, and bootloader/GPU firmware.
# Run from the Pi I kept getting a broken pipe and it wouldn’t complete.
# So I ran the above command on my laptop
# Note, you may get an error of paths colliding in firmware/modules
# due to case-sensitive/non-case-sensitive issues.
# These can be ignored since we don’t need that directory
# Move the necessary files to Raspberry Pi from the Laptop
#
scp -r firmware/opt/ osmc@:~/Downloads/
# However you get it onto the Raspberry Pi, copy files to /opt/vc.
# This probably could have been done with the scp step directly, but I felt
# better doing the final move on the Pi itself.
cd firmware/opt/vc
sudo cp -r src /opt/vc/
# Install packages for compiling
sudo apt-get install cmake
sudo apt-get install libavahi-compat-libdnssd-dev
sudo apt-get install libssl-dev
# Download RPiPlay from GitHub
cd ~/Downloads
git clone GitHub - FD-/RPiPlay: An open-source AirPlay mirroring server for the Raspberry Pi. Supports iOS 9 and up.
cd RPiPlay
# Build it
mkdir build
cd build
cmake …
make
# The executable is found in ~/Downloads/RPiPlay/build
# To run from that directory
./rpiplay
# To run from anywhere
.~/Downloads/RPiPlay/build/rpiplay
# To quit rpiplay on the Pi, type Ctrl-C.
# The Raspberry Pi will show up in AirPlay lists as “RPiPlay”
# The Raspberry Pi screen will go black when you run it with no arguments.
# I assumed that made Kodi unusable at the same time so I dug further.
# Help Information
./Downloads/RPiPlay/build/rpiplay -h
RPiPlay 1.2: An open-source AirPlay mirroring server for Raspberry Pi
Usage: ./Downloads/RPiPlay/build/rpiplay [-b (on|auto|off)] [-n name] [-a (hdmi|analog|off)]
Options:
-n name Specify the network name of the AirPlay server
-b (on|auto|off) Show black background always, only during active connection, or never
-a (hdmi|analog|off) Set audio output device
-l Enable low-latency mode (disables render clock)
-d Enable debug logging
-v/-h Displays this help and version information
# To make it easier to run
# I created a bin directory in my home directory and copied rpiplay to it
cd
mkdir bin
cd Downloads/RPiPlay/build
cp rpiplay ~/bin
# Then I added that directory (and current directory) to my path in .bashrc
export PATH=.:${HOME}/bin:${PATH}
# Create .bash_aliases (e.g. with vi)
# Not surprisingly emacs is not installed. I didn’t look very hard for any other editors.
# Add the following line
# This gives a name other than RPiPlay to the Raspberry Pi,
# Allows you to use Kodi when not connected via AirPlay
# Ensures sound goes through the HDMI cable.
#
alias rpiplay=‘rpiplay -n <Server_Name> -b auto -a hdmi’
# Final Step, run rpiplay on start up
# TBD