mirror of
https://github.com/RetroPie/RetroPie-Setup.git
synced 2024-05-20 05:10:53 -04:00
Compare commits
5 commits
94c3b09507
...
aa0145e37a
Author | SHA1 | Date | |
---|---|---|---|
aa0145e37a | |||
5e0ab1f859 | |||
33c8fed68b | |||
218caa5b7e | |||
3b9a8e440b |
|
@ -164,7 +164,7 @@ oric_fullname="Oric 1"
|
|||
pc88_exts=".d88 .cmt .m3u .t88"
|
||||
pc88_fullname="NEC PC-8801"
|
||||
|
||||
pc98_exts=".d88 .d98 .88d .98d .fdi .fdd .xdf .hdm .dup .2hd .tfd .hdi .thd .nhd .hdd .zip"
|
||||
pc98_exts=".2hd .88d .98d .cmd .d88 .d98 .dup .fdi .fdd .hdd .hdi .hdm .nhd .thd .tfd .xdf .zip"
|
||||
pc98_fullname="NEC PC-9801"
|
||||
|
||||
pc_exts=".bat .com .conf .cue .dosz .exe .ins .ima .img .iso .m3u .m3u8 .sh .vhd .zip"
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
|
||||
rp_module_id="autostart"
|
||||
rp_module_desc="Auto-start Emulation Station / Kodi on boot"
|
||||
rp_module_desc="Auto-start EmulationStation / Pegasus / Kodi on boot"
|
||||
rp_module_section="config"
|
||||
|
||||
function _update_hook_autostart() {
|
||||
|
@ -42,6 +42,9 @@ _EOF_
|
|||
kodi)
|
||||
echo -e "kodi-standalone #auto\nemulationstation #auto" >>"$script"
|
||||
;;
|
||||
pegasus)
|
||||
echo "pegasus-fe #auto" >> "$script"
|
||||
;;
|
||||
es|*)
|
||||
echo "emulationstation #auto" >>"$script"
|
||||
;;
|
||||
|
@ -102,20 +105,29 @@ function remove_autostart() {
|
|||
|
||||
function gui_autostart() {
|
||||
cmd=(dialog --backtitle "$__backtitle" --menu "Choose the desired boot behaviour." 22 76 16)
|
||||
local has_pegasus=0
|
||||
local has_kodi=0
|
||||
|
||||
command -v pegasus-fe >/dev/null && has_pegasus=1
|
||||
command -v kodi-standalone >/dev/null && has_kodi=1
|
||||
|
||||
while true; do
|
||||
if isPlatform "x11"; then
|
||||
local x11_autostart
|
||||
if [[ -f "$home/.config/autostart/retropie.desktop" ]]; then
|
||||
options=(1 "Autostart Emulation Station after login (Enabled)")
|
||||
options=(1 "Autostart EmulationStation after login (Enabled)")
|
||||
x11_autostart=1
|
||||
else
|
||||
options=(1 "Autostart Emulation Station after login (Disabled)")
|
||||
options=(1 "Autostart EmulationStation after login (Disabled)")
|
||||
x11_autostart=0
|
||||
fi
|
||||
else
|
||||
options=(
|
||||
1 "Start Emulation Station at boot"
|
||||
2 "Start Kodi at boot (exit for Emulation Station)"
|
||||
1 "Start EmulationStation at boot"
|
||||
)
|
||||
[[ "$has_kodi" -eq 1 ]] && options+=(2 "Start Kodi at boot (exit starts EmulationStation)")
|
||||
[[ "$has_pegasus" -eq 1 ]] && options+=(3 "Start Pegasus at boot")
|
||||
options+=(
|
||||
E "Manually edit $configdir/all/autostart.sh"
|
||||
)
|
||||
if [[ "$__os_id" == "Raspbian" ]]; then
|
||||
|
@ -136,21 +148,25 @@ function gui_autostart() {
|
|||
if isPlatform "x11"; then
|
||||
if [[ "$x11_autostart" -eq 0 ]]; then
|
||||
enable_autostart
|
||||
printMsgs "dialog" "Emulation Station is set to autostart after login."
|
||||
printMsgs "dialog" "EmulationStation is set to autostart after login."
|
||||
else
|
||||
disable_autostart
|
||||
printMsgs "dialog" "Autostarting of Emulation Station is disabled."
|
||||
printMsgs "dialog" "Autostarting of EmulationStation is disabled."
|
||||
fi
|
||||
x11_autostart=$((x11_autostart ^ 1))
|
||||
else
|
||||
enable_autostart
|
||||
printMsgs "dialog" "Emulation Station is set to launch at boot."
|
||||
printMsgs "dialog" "EmulationStation is set to launch at boot."
|
||||
fi
|
||||
;;
|
||||
2)
|
||||
enable_autostart kodi
|
||||
printMsgs "dialog" "Kodi is set to launch at boot."
|
||||
;;
|
||||
3)
|
||||
enable_autostart pegasus
|
||||
printMsgs "dialog" "Pegasus is set to launch at boot."
|
||||
;;
|
||||
E)
|
||||
editFile "$configdir/all/autostart.sh"
|
||||
;;
|
||||
|
|
79
scriptmodules/supplementary/pegasus-fe-dev.sh
Normal file
79
scriptmodules/supplementary/pegasus-fe-dev.sh
Normal file
|
@ -0,0 +1,79 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# This file is part of The RetroPie Project
|
||||
#
|
||||
# The RetroPie Project is the legal property of its developers, whose names are
|
||||
# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
|
||||
#
|
||||
# See the LICENSE.md file at the top-level directory of this distribution and
|
||||
# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
|
||||
#
|
||||
|
||||
rp_module_id="pegasus-fe-dev"
|
||||
rp_module_desc="Pegasus: A cross platform, customizable graphical frontend (lastest master)"
|
||||
rp_module_help="Pegasus is a cross platform, customizable graphical frontend for launching emulators and managing your game collection.\nThis package provides source installation on platforms not covered by the upstream project pre-built binaries (i.e. ARM 64bit)."
|
||||
rp_module_licence="GPL3 https://raw.githubusercontent.com/mmatyas/pegasus-frontend/master/LICENSE.md"
|
||||
rp_module_section="exp"
|
||||
rp_module_repo="git https://github.com/mmatyas/pegasus-frontend master"
|
||||
rp_module_flags="!mali frontend"
|
||||
|
||||
function depends_pegasus-fe-dev() {
|
||||
if [[ "$__os_debian_ver" -lt 11 ]]; then
|
||||
md_ret_errors+=("Pegasus (dev) requires Debian 11 (bullseye) or later. Please install the 'pegasus-fe' package instead.")
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ -n "$__os_ubuntu_ver" ]] && compareVersions "$__os_ubuntu_ver" lt 22.04; then
|
||||
md_ret_errors+=("Pegasus (dev) requires Ubuntu 22.04 or later. Please install the 'pegasus-fe' package instead.")
|
||||
return 1
|
||||
fi
|
||||
|
||||
local depends=(
|
||||
fontconfig
|
||||
gstreamer1.0-alsa
|
||||
gstreamer1.0-libav
|
||||
gstreamer1.0-plugins-good
|
||||
libqt5multimedia5-plugins
|
||||
libsdl2-dev
|
||||
pkg-config
|
||||
policykit-1
|
||||
qml-module-qtgraphicaleffects qml-module-qtmultimedia qml-module-qtqml
|
||||
qml-module-qtqml-models2
|
||||
qml-module-qtquick-controls qml-module-qtquick-controls2
|
||||
qml-module-qtquick-layouts qml-module-qtquick-templates2
|
||||
qml-module-qtquick-window2 qml-module-qtquick2
|
||||
qml-module-qt-labs-qmlmodels qml-module-qtquick-shapes
|
||||
)
|
||||
# Qt build dependencies
|
||||
depends+=(qtbase5-private-dev qtdeclarative5-dev qtmultimedia5-dev libqt5svg5-dev qttools5-dev)
|
||||
getDepends "${depends[@]}"
|
||||
}
|
||||
|
||||
function sources_pegasus-fe-dev() {
|
||||
gitPullOrClone
|
||||
# on KMS, apply a patch to fix lanching games
|
||||
isPlatform "kms" && applyPatch "$md_build/etc/rpi4/kms_launch_fix.diff"
|
||||
}
|
||||
|
||||
function build_pegasus-fe-dev() {
|
||||
rm -fr release && mkdir -p release
|
||||
pushd release
|
||||
qmake .. QMAKE_CXXFLAGS+="$__cxxflags" QMAKE_LIBS_LIBDL=-ldl USE_SDL_GAMEPAD=1 USE_SDL_POWER=1 INSTALLDIR="$md_inst"
|
||||
make
|
||||
md_ret_require=(
|
||||
"$md_build/release/src/app/pegasus-fe"
|
||||
)
|
||||
}
|
||||
|
||||
function install_pegasus-fe-dev() {
|
||||
make -C release install
|
||||
_add_launcher_pegasus-fe
|
||||
}
|
||||
|
||||
function remove_pegasus-fe-dev() {
|
||||
remove_pegasus-fe
|
||||
}
|
||||
|
||||
function configure_pegasus-fe-dev() {
|
||||
configure_pegasus-fe
|
||||
}
|
|
@ -10,7 +10,8 @@
|
|||
#
|
||||
|
||||
rp_module_id="pegasus-fe"
|
||||
rp_module_desc="Pegasus: A cross platform, customizable graphical frontend (latest alpha release)"
|
||||
rp_module_desc="Pegasus: A cross platform, customizable graphical frontend (latest pre-built release)"
|
||||
rp_module_help="Pegasus is a cross platform, customizable graphical frontend for launching emulators and managing your game collection.\nThis package installs the upstream pre-built binaries. Use this package on RaspiOS Buster or PC/x86 installations"
|
||||
rp_module_licence="GPL3 https://raw.githubusercontent.com/mmatyas/pegasus-frontend/master/LICENSE.md"
|
||||
rp_module_section="exp"
|
||||
rp_module_flags="!mali frontend"
|
||||
|
@ -25,7 +26,11 @@ function depends_pegasus-fe() {
|
|||
libsdl2-dev
|
||||
policykit-1
|
||||
)
|
||||
|
||||
# show an error on 64bit ARMs, since there are no pre-built packages for it
|
||||
if isPlatform "arm" && hasFlag "64bit"; then
|
||||
md_ret_errors+=("There are no pre-build binaries for 64bit ARM systems! Try installing Pegasus with the ${md_id}-dev package")
|
||||
return 1
|
||||
fi
|
||||
getDepends "${depends[@]}"
|
||||
}
|
||||
|
||||
|
@ -43,7 +48,7 @@ function install_bin_pegasus-fe() {
|
|||
isPlatform "x11" && platform="x11"
|
||||
isPlatform "rpi" && platform="$__platform"
|
||||
if [[ -z "${platform}" ]]; then
|
||||
md_ret_errors+=("Sorry, Pegasus is not yet available for this platform. Consider reporting this on the forum!")
|
||||
md_ret_errors+=("Sorry, Pegasus has no pre-built binaries for this platform. Consider installing the ${md_id}-dev package or reporting this on the RetroPie forum!")
|
||||
return
|
||||
fi
|
||||
|
||||
|
@ -62,7 +67,11 @@ function install_bin_pegasus-fe() {
|
|||
printMsgs "console" "Download URL: ${asset_url}"
|
||||
downloadAndExtract "${asset_url}" "$md_inst"
|
||||
|
||||
# create launcher script
|
||||
_add_launcher_pegasus-fe
|
||||
}
|
||||
|
||||
function _add_launcher_pegasus-fe() {
|
||||
# create launcher script
|
||||
cat > /usr/bin/pegasus-fe << _EOF_
|
||||
#!/bin/bash
|
||||
|
||||
|
@ -71,19 +80,59 @@ if [[ \$(id -u) -eq 0 ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# save current tty/vt number for use with X so it can be launched on the correct tty
|
||||
tty=\$(tty)
|
||||
export TTY="\${tty:8:1}"
|
||||
_EOF_
|
||||
|
||||
# on KMS platforms, add some additional setup commands
|
||||
if isPlatform "kms"; then
|
||||
cat >> /usr/bin/pegasus-fe << _EOF_
|
||||
# KMS setup
|
||||
export QT_QPA_EGLFS_FORCE888=1 # improve gradients
|
||||
export QT_QPA_EGLFS_KMS_ATOMIC=1 # use the atomic DRM API on Pi 4
|
||||
export QT_QPA_PLATFORM=eglfs
|
||||
export QT_QPA_QT_QPA_EGLFS_INTEGRATION=eglfs_kms
|
||||
|
||||
# find the right DRI card
|
||||
for i in \$(find /sys/devices/platform -name "card?"); do
|
||||
node=\${i:0-1}
|
||||
case "\$i" in
|
||||
*gpu*) card=\$node ;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo Using DRI card at /dev/dri/card\${card}
|
||||
file="/tmp/pegasus_\$\$.eglfs.json"
|
||||
echo "{ \"device\": \"/dev/dri/card\${card}\" }" > "\$file"
|
||||
export QT_QPA_EGLFS_KMS_CONFIG="\$file"
|
||||
_EOF_
|
||||
fi
|
||||
|
||||
cat >> /usr/bin/pegasus-fe << _EOF_
|
||||
clear
|
||||
"$md_inst/pegasus-fe" "\$@"
|
||||
|
||||
rm -f "/tmp/pegasus_\$\$.eglfs.json"
|
||||
_EOF_
|
||||
|
||||
chmod +x /usr/bin/pegasus-fe
|
||||
}
|
||||
|
||||
function _update_themes_pegasus-fe() {
|
||||
# add some themes to Pegasus
|
||||
echo Installing themes
|
||||
declare themes=(
|
||||
"mmatyas/pegasus-theme-9999999-in-1"
|
||||
"mmatyas/pegasus-theme-es2-simple"
|
||||
"mmatyas/pegasus-theme-flixnet"
|
||||
"mmatyas/pegasus-theme-secretary"
|
||||
)
|
||||
local theme
|
||||
pushd "$home/.config/pegasus-frontend/themes" || return
|
||||
for theme in ${themes[@]}; do
|
||||
local path=${theme//"mmatyas/pegasus-theme-"/}
|
||||
gitPullOrClone "$path" "https://github.com/$theme"
|
||||
done
|
||||
popd
|
||||
}
|
||||
function remove_pegasus-fe() {
|
||||
rm -f /usr/bin/pegasus-fe
|
||||
}
|
||||
|
@ -94,4 +143,15 @@ function configure_pegasus-fe() {
|
|||
# create external directories
|
||||
mkUserDir "$md_conf_root/all/pegasus-fe/scripts"
|
||||
mkUserDir "$md_conf_root/all/pegasus-fe/themes"
|
||||
|
||||
[[ "$md_mode" == "remove" ]] && return
|
||||
|
||||
# remove the other Pegasus package if it's installed
|
||||
if [[ "$md_id" == "pegasus-fe-dev" ]]; then
|
||||
rmDirExists "$rootdir/$md_type/pegasus-fe"
|
||||
else
|
||||
rmDirExists "$rootdir/$md_type/pegasus-fe-dev"
|
||||
fi
|
||||
# update themes
|
||||
_update_themes_pegasus-fe
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue