diff --git a/functions.sh b/functions.sh index d61d1df7..ea3ee31c 100644 --- a/functions.sh +++ b/functions.sh @@ -998,6 +998,15 @@ tools_init() { cp -fv /app/retrodeck/tools-gamelist.xml /var/config/retrodeck/tools/gamelist.xml } +update_splashscreens() { + # This script will purge any existing ES graphics and reload them from RO space into somewhere ES will look for it + # USAGE: update_splashscreens + + rm -rf /var/config/emulationstation/.emulationstation/resources/graphics + mkdir -p /var/config/emulationstation/.emulationstation/resources/graphics + cp -rf /app/retrodeck/graphics/* /var/config/emulationstation/.emulationstation/resources/graphics +} + emulators_post_move() { # This script will redo the symlinks for all emulators after moving the $rdhome location without resetting other options # FUTURE WORK: The sed commands here should be replaced with set_setting_value and dir_prep should be replaced with changing paths in config files directly where possible @@ -1077,7 +1086,7 @@ create_lock() { easter_eggs() { # This function will replace the RetroDECK startup splash screen with a different image if the day and time match a listing in easter_egg_checklist.cfg # The easter_egg_checklist.cfg file has the current format: $start_date^$end_date^$start_time^$end_time^$splash_file - # Ex. The line "1001^1031^0000^2359^spooky.svg" would show the file "spooky.svg" During any time of day in the month of October + # Ex. The line "1001^1031^0000^2359^spooky.svg" would show the file "spooky.svg" during any time of day in the month of October # The easter_egg_checklist.cfg is read in order, so lines higher in the file will have higher priority in the event of an overlap # USAGE: easter_eggs current_day=$(date +"%0m%0d") # Read the current date in a format that can be calculated in ranges @@ -1092,7 +1101,7 @@ easter_eggs() { fi done < $easter_egg_checklist - cp -fv "$new_splash_file $current_splash_file" # Deploy assigned splash screen + cp -fv "$new_splash_file" "$current_splash_file" # Deploy assigned splash screen } start_retrodeck() { @@ -1248,6 +1257,7 @@ finit() { # Initializing ES-DE # TODO: after the next update of ES-DE this will not be needed - let's test it emulationstation --home /var/config/emulationstation --create-system-dirs + update_splashscreens mkdir -pv /var/config/retrodeck/tools/ diff --git a/global.sh b/global.sh index 7bfd48fa..b659e367 100755 --- a/global.sh +++ b/global.sh @@ -5,19 +5,19 @@ source /app/libexec/functions.sh # Static variables -rd_conf="/var/config/retrodeck/retrodeck.cfg" # RetroDECK config file path -rd_conf_backup="/var/config/retrodeck/retrodeck.bak" # Backup of RetroDECK config file from update -emuconfigs="/app/retrodeck/emu-configs" # folder with all the default emulator configs -rd_defaults="$emuconfigs/defaults/retrodeck.cfg" # A default RetroDECK config file -rd_update_patch="/var/config/retrodeck/rd_update.patch" # A static location for the temporary patch file used during retrodeck.cfg updates -bios_checklist="/var/config/retrodeck/tools/bios_checklist.cfg" # A config file listing BIOS file information that can be verified -easter_egg_checklist="/var/config/retrodeck/tools/easter_egg_checklist.cfg" # A config file listing days and times when special splash screens should show up -splashscreen_dir="/var/config/emulationstation/graphics/extra-splashes" # The default location of extra splash screens -current_splash_file="/var/config/emulationstation/graphics/splash.svg" # The active splash file that will be shown on boot -default_splash_file="/var/config/emulationstation/graphics/splash-orig.svg" # The default RetroDECK splash screen -lockfile="/var/config/retrodeck/.lock" # where the lockfile is located -default_sd="/run/media/mmcblk0p1" # Steam Deck SD default path -hard_version="$(cat '/app/retrodeck/version')" # hardcoded version (in the readonly filesystem) +rd_conf="/var/config/retrodeck/retrodeck.cfg" # RetroDECK config file path +rd_conf_backup="/var/config/retrodeck/retrodeck.bak" # Backup of RetroDECK config file from update +emuconfigs="/app/retrodeck/emu-configs" # folder with all the default emulator configs +rd_defaults="$emuconfigs/defaults/retrodeck.cfg" # A default RetroDECK config file +rd_update_patch="/var/config/retrodeck/rd_update.patch" # A static location for the temporary patch file used during retrodeck.cfg updates +bios_checklist="/var/config/retrodeck/tools/bios_checklist.cfg" # A config file listing BIOS file information that can be verified +easter_egg_checklist="/var/config/retrodeck/tools/easter_egg_checklist.cfg" # A config file listing days and times when special splash screens should show up +splashscreen_dir="/var/config/emulationstation/.emulationstation/resources/graphics/extra-splashes" # The default location of extra splash screens +current_splash_file="/var/config/emulationstation/.emulationstation/resources/graphics/splash.svg" # The active splash file that will be shown on boot +default_splash_file="/var/config/emulationstation/.emulationstation/resources/graphics/splash-orig.svg" # The default RetroDECK splash screen +lockfile="/var/config/retrodeck/.lock" # where the lockfile is located +default_sd="/run/media/mmcblk0p1" # Steam Deck SD default path +hard_version="$(cat '/app/retrodeck/version')" # hardcoded version (in the readonly filesystem) # Config files for emulators with single config files diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 30b8f67a..c80d5f00 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -1038,9 +1038,8 @@ modules: buildsystem: simple build-commands: - # Initializing retrodeck and emulationstation config folders + # Initializing RO retrodeck config folder - mkdir -p ${FLATPAK_DEST}/retrodeck - - mkdir -p ${FLATPAK_DEST}/emulationstation # Prep the ES-DE and RetroArch config files - I will have to SED/XMLSTARLET them soon - rm -rf /app/share/emulationstation/resources/systems/unix/es_find_rules.xml @@ -1050,12 +1049,11 @@ modules: # These must be put in home folder, managed by retrodeck.sh - cp es-configs/es_settings.xml ${FLATPAK_DEST}/retrodeck/es_settings.xml - # Logo, res, move graphics directory to mutable space so splash can be changed after build - - mv -f -t ${FLATPAK_DEST}/emulationstation /app/share/emulationstation/resources/graphics - - ln -s ${FLATPAK_DEST}/emulationstation/graphics /app/share/emulationstation/resources/graphics - - cp -f res/extra-splashes/* ${FLATPAK_DEST}/emulationstation/graphics - - cp -f res/splash.svg ${FLATPAK_DEST}/emulationstation/graphics/splash.svg - - cp -f res/splash.svg ${FLATPAK_DEST}/emulationstation/graphics/splash-orig.svg + # Logo, res, move graphics directory away from default location so splash can be changed after build + - mv -f -t ${FLATPAK_DEST}/retrodeck /app/share/emulationstation/resources/graphics + - cp -f res/splash.svg ${FLATPAK_DEST}/retrodeck/graphics/splash.svg + - cp -f res/splash.svg ${FLATPAK_DEST}/retrodeck/graphics/splash-orig.svg + - cp -rf res/extra-splashes/ ${FLATPAK_DEST}/retrodeck/graphics - cp -f res/icon.svg /app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg # Tools @@ -1071,7 +1069,6 @@ modules: - cp global.sh /app/libexec/global.sh - cp functions.sh /app/libexec/functions.sh - cp post_update.sh /app/libexec/post_update.sh - - cp save_migration.sh /app/libexec/save_migration.sh # Desktop entry diff --git a/post_update.sh b/post_update.sh index a9826214..0b7b2076 100644 --- a/post_update.sh +++ b/post_update.sh @@ -31,6 +31,7 @@ post_update() { # The following commands are run every time. tools_init + update_splashscreens update_rd_conf ) | zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \