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

DietPi-Software | Moonlight: Game streaming client for Sunshine and NVIDIA GameStream #6303

Merged
merged 24 commits into from
Apr 29, 2023
Merged
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
1 change: 1 addition & 0 deletions .meta/dietpi-survey_report
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@ shopt -s extglob
aSOFTWARE_NAME8_17[$i]=${aSOFTWARE_NAME8_16[$i]}
done
aSOFTWARE_NAME8_17[206]='openHAB'
aSOFTWARE_NAME8_17[207]='Moonlight'

# Pre-create software counter array so that we can see also software (available in newest version) with 0 installs
for i in "${aSOFTWARE_NAME8_17[@]}"
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ v8.17

New software:
- openHAB | This long requested vendor and technology agnostic FLOSS home automation software has been finally added to DietPi. Many thanks to @just-jason and many others for requesting it and @MDAR for providing install instructions and valuable information: https://github.com/MichaIng/DietPi/issues/3857
- Moonlight | This Game streaming client for Sunshine and NVIDIA has been added to our software catalogue. Many thanks to @mtekman for implementing it: https://github.com/MichaIng/DietPi/pull/6303

Enhancements:
- NanoPi R series | Updated udev rules for the Ethernet LEDs to not lid the LEDs of disabled Ethernet devices. If an Ethernet device has been detected by the kernel/udev already and an LED is configured to light on link (connected cable), it lights until the interface is set up and no link is detected. So for disabled interfaces, some LEDs remained lit. The udev rules have now been changed to quickly set up and down the interfaces for the LEDs to remain off until an interface has been successfully configured.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ Links to hardware and software manufacturers, sources and build instructions use
- [Navidrome](https://github.com/navidrome/navidrome)
- [Homer](https://github.com/bastienwirtz/homer)
- [microblog.pub](https://git.sr.ht/~tsileo/microblog.pub)
- [Moonlight](https://github.com/moonlight-stream/moonlight-embedded)
- [Nukkit](https://github.com/CloudburstMC/Nukkit)
- [openHAB](https://github.com/openhab)

Expand Down
48 changes: 46 additions & 2 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,20 @@ Available commands:
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,2]=0
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,10]=0
#------------------
software_id=207
aSOFTWARE_NAME[$software_id]='Moonlight'
aSOFTWARE_DESC[$software_id]='Game streaming client for Sunshine and NVIDIA GameStream'
aSOFTWARE_CATX[$software_id]=5
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/gaming/#moonlight'
# RPi only
(( $G_HW_MODEL > 9 )) && aSOFTWARE_AVAIL_G_HW_MODEL[$software_id,$G_HW_MODEL]=0
# - ARMv6: https://github.com/moonlight-stream/moonlight-embedded/issues/832
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0
# No Bookworm packages yet and Bullseye packages depend on libssl1.1
aSOFTWARE_AVAIL_G_DISTRO[$software_id,7]=0
# No Buster ARMv8 packages
(( $G_HW_ARCH == 3 )) && aSOFTWARE_AVAIL_G_DISTRO[$software_id,5]=0

MichaIng marked this conversation as resolved.
Show resolved Hide resolved
# Social & Search
#--------------------------------------------------------------------------------
Expand Down Expand Up @@ -11124,6 +11138,28 @@ _EOF_
modprobe binfmt_misc 2> /dev/null && G_EXEC systemctl restart systemd-binfmt
fi

if To_Install 207 # Moonlight: https://dl.cloudsmith.io/public/moonlight-game-streaming/moonlight-embedded/setup.deb.sh
then
# Enable required fake KMS driver
/boot/dietpi/func/dietpi-set_hardware rpi-opengl vc4-fkms-v3d

# APT key
local url='https://dl.cloudsmith.io/public/moonlight-game-streaming/moonlight-embedded/gpg.5AEE46706CF0453E.key'
G_CHECK_URL "$url"
G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-moonlight.gpg --yes"

# APT list
G_EXEC eval "echo 'deb https://dl.cloudsmith.io/public/moonlight-game-streaming/moonlight-embedded/deb/raspbian/ $G_DISTRO_NAME main' > /etc/apt/sources.list.d/dietpi-moonlight.list"
G_AGUP

# APT deps
(( $G_DISTRO < 6 )) && aDEPS=('libcec4') || aDEPS=('libcec6')

# Install the client
G_AGI moonlight-embedded "${aDEPS[@]}"
unset -v aDEPS
fi

if To_Install 27 # TasmoAdmin
then
# Install required PHP modules
Expand Down Expand Up @@ -11954,13 +11990,14 @@ If no WireGuard (auto)start is included, but you require it, please do the follo
then
suggest_gpu_mem=96

# Desktops, OpenTyrian
# Desktops, OpenTyrian, Moonlight
elif (( ${aSOFTWARE_INSTALL_STATE[23]} == 1 ||
${aSOFTWARE_INSTALL_STATE[24]} == 1 ||
${aSOFTWARE_INSTALL_STATE[25]} == 1 ||
${aSOFTWARE_INSTALL_STATE[26]} == 1 ||
${aSOFTWARE_INSTALL_STATE[51]} == 1 ||
${aSOFTWARE_INSTALL_STATE[173]} == 1 ))
${aSOFTWARE_INSTALL_STATE[173]} == 1 ||
${aSOFTWARE_INSTALL_STATE[207]} == 1 ))
then
suggest_gpu_mem=1 # default
fi
Expand Down Expand Up @@ -12743,6 +12780,13 @@ If no WireGuard (auto)start is included, but you require it, please do the follo
[[ -d '/usr/lib/x86_64-linux-gnu' ]] && G_EXEC rmdir --ignore-fail-on-non-empty /usr/lib/x86_64-linux-gnu
fi

if To_Uninstall 207 # Moonlight
then
G_AGP moonlight-embedded
[[ -f '/etc/apt/sources.list.d/dietpi-moonlight.list' ]] && G_EXEC rm /etc/apt/sources.list.d/dietpi-moonlight.list
[[ -f '/etc/apt/trusted.gpg.d/dietpi-moonlight.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-moonlight.gpg
fi

if To_Uninstall 119 # CAVA
then
G_AGP cava
Expand Down