mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-02-16 19:35:39 +00:00
Merge branch 'cooker-0.6.2b-icenine451' into cooker-0.7.0b-icenine451
This commit is contained in:
commit
4e045eab2f
30
functions.sh
30
functions.sh
|
@ -1075,20 +1075,24 @@ create_lock() {
|
|||
}
|
||||
|
||||
easter_eggs() {
|
||||
today=$(date +"%0m%0d") # Read the current date in a format that can be calculated in ranges
|
||||
# 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
|
||||
# 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
|
||||
current_time=$(date +"%0H%0M") # Read the current time in a format that can be calculated in ranges
|
||||
while IFS="^" read -r start_date end_date start_time end_time splash_file # Read Easter Egg checklist file and separate values
|
||||
do
|
||||
if [[ $current_day -ge "$start_date" && $current_day -le "$end_date" && $current_time -ge "$start_time" && $current_time -le "$end_time" ]]; then # If current line specified date/time matches current date/time, set $splash_file to be deployed
|
||||
new_splash_file="$splashscreen_dir/$splash_file"
|
||||
break
|
||||
else # When there are no matches, the default splash screen is set to deploy
|
||||
new_splash_file="$default_splash_file"
|
||||
fi
|
||||
done < $easter_egg_checklist
|
||||
|
||||
# Set Easter Egg date or ranges here, in mmdd format
|
||||
|
||||
if [[ today -eq "0401" ]]; then # An example of a one-day easter egg
|
||||
echo "Today is April Fools Day!"
|
||||
# cp -fv /var/config/emulationstation/graphics/splash-aprilfools.svg /var/config/emulationstation/graphics/splash.svg
|
||||
elif [[ today -ge "1001" && today -le "1031" ]]; then # An example of a multi-day easter egg
|
||||
echo "Today is in the spooky month!"
|
||||
# cp -fv /var/config/emulationstation/graphics/splash-spookytime.svg /var/config/emulationstation/graphics/splash.svg
|
||||
else # Revert to standard splash otherwise
|
||||
echo "Nothing special happening today"
|
||||
# cp -fv /var/config/emulationstation/graphics/splash-orig.svg /var/config/emulationstation/graphics/splash.svg
|
||||
fi
|
||||
cp -fv "$new_splash_file $current_splash_file" # Deploy assigned splash screen
|
||||
}
|
||||
|
||||
start_retrodeck() {
|
||||
|
|
23
global.sh
23
global.sh
|
@ -5,16 +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
|
||||
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_repo="https://github.com/XargonWan/RetroDECK" # The official GitHub repo of RetroDECK
|
||||
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)
|
||||
|
||||
# Config files for emulators with single config files
|
||||
|
||||
|
|
|
@ -1039,8 +1039,8 @@ modules:
|
|||
build-commands:
|
||||
|
||||
# Initializing retrodeck and emulationstation config folders
|
||||
- mkdir -p /var/config/retrodeck
|
||||
- mkdir -p /var/config/emulationstation
|
||||
- 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
|
||||
|
@ -1051,11 +1051,11 @@ modules:
|
|||
- 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 /var/config/emulationstation /app/share/emulationstation/resources/graphics
|
||||
- ln -s /var/config/emulationstation/graphics /app/share/emulationstation/resources/graphics
|
||||
- cp -f res/extra-splashes/* /var/config/emulationstation/graphics
|
||||
- cp -f res/splash.svg /var/config/emulationstation/graphics/splash.svg
|
||||
- cp -f res/splash.svg /var/config/emulationstation/graphics/splash-orig.svg
|
||||
- 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
|
||||
- cp -f res/icon.svg /app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg
|
||||
|
||||
# Tools
|
||||
|
@ -1066,10 +1066,10 @@ modules:
|
|||
- cp retrodeck.sh /app/bin/retrodeck.sh
|
||||
- chmod +x /app/bin/retrodeck.sh
|
||||
|
||||
# Function libraries
|
||||
- mkdir -p /app/libexec
|
||||
- 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
|
||||
|
|
24
res/extra-splashes/example-splash.svg
Normal file
24
res/extra-splashes/example-splash.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 30 KiB |
0
tools/easter_egg_checklist.cfg
Normal file
0
tools/easter_egg_checklist.cfg
Normal file
Loading…
Reference in a new issue