ES-DE: .emulationstation folder is now renamed in ES-DE

This commit is contained in:
XargonWan 2024-02-19 16:21:43 +01:00
parent a19c932f1e
commit cb8b3de7d8
6 changed files with 28 additions and 21 deletions

View file

@ -28,12 +28,12 @@ save_migration() {
fi
# Doing the dir prep as we don't know from which version we came
dir_prep "$media_folder" "/var/config/emulationstation/.emulationstation/downloaded_media"
dir_prep "$themes_folder" "/var/config/emulationstation/.emulationstation/themes"
dir_prep "$media_folder" "/var/config/emulationstation/ES-DE/downloaded_media"
dir_prep "$themes_folder" "/var/config/emulationstation/ES-DE/themes"
mkdir -pv $rdhome/logs #this was added later, maybe safe to remove in a few versions
# Resetting es_settings, now we need it but in the future I should think a better solution, maybe with sed
cp -fv /app/retrodeck/es_settings.xml /var/config/emulationstation/.emulationstation/es_settings.xml
cp -fv /app/retrodeck/es_settings.xml /var/config/emulationstation/ES-DE/es_settings.xml
# 0.4 -> 0.5
# Perform save and state migration if needed

View file

@ -486,9 +486,9 @@ install_retrodeck_starterpack() {
## DOOM section ##
cp /app/retrodeck/extras/doom1.wad "$roms_folder/doom/doom1.wad" # No -f in case the user already has it
mkdir -p "/var/config/emulationstation/.emulationstation/gamelists/doom"
if [[ ! -f "/var/config/emulationstation/.emulationstation/gamelists/doom/gamelist.xml" ]]; then # Don't overwrite an existing gamelist
cp "/app/retrodeck/rd_prepacks/doom/gamelist.xml" "/var/config/emulationstation/.emulationstation/gamelists/doom/gamelist.xml"
mkdir -p "/var/config/emulationstation/ES-DE/gamelists/doom"
if [[ ! -f "/var/config/emulationstation/ES-DE/gamelists/doom/gamelist.xml" ]]; then # Don't overwrite an existing gamelist
cp "/app/retrodeck/rd_prepacks/doom/gamelist.xml" "/var/config/emulationstation/ES-DE/gamelists/doom/gamelist.xml"
fi
mkdir -p "$media_folder/doom"
unzip -oq "/app/retrodeck/rd_prepacks/doom/doom.zip" -d "$media_folder/doom/"
@ -519,8 +519,8 @@ 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
rsync -rlD --mkpath "/app/retrodeck/graphics/" "/var/config/emulationstation/.emulationstation/resources/graphics/"
rm -rf /var/config/emulationstation/ES-DE/resources/graphics
rsync -rlD --mkpath "/app/retrodeck/graphics/" "/var/config/emulationstation/ES-DE/resources/graphics/"
}
deploy_helper_files() {

View file

@ -25,9 +25,9 @@ zip_compressable_extensions="$emuconfigs/defaults/retrodeck/reference_lists/zip_
easter_egg_checklist="$emuconfigs/defaults/retrodeck/reference_lists/easter_egg_checklist.cfg" # A config file listing days and times when special splash screens should show up
input_validation="$emuconfigs/defaults/retrodeck/reference_lists/input_validation.cfg" # A config file listing valid CLI inputs
finit_options_list="$emuconfigs/defaults/retrodeck/reference_lists/finit_options_list.cfg" # A config file listing available optional installs during finit
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
splashscreen_dir="/var/config/emulationstation/ES-DE/resources/graphics/extra_splashes" # The default location of extra splash screens
current_splash_file="/var/config/emulationstation/ES-DE/resources/graphics/splash.svg" # The active splash file that will be shown on boot
default_splash_file="/var/config/emulationstation/ES-DE/resources/graphics/splash-orig.svg" # The default RetroDECK splash screen
multi_user_emulator_config_dirs="$emuconfigs/defaults/retrodeck/reference_lists/multi_user_emulator_config_dirs.cfg" # A list of emulator config folders that can be safely linked/unlinked entirely in multi-user mode
rd_es_themes="/app/share/emulationstation/themes" # The directory where themes packaged with RetroDECK are stored
lockfile="/var/config/retrodeck/.lock" # where the lockfile is located
@ -58,7 +58,7 @@ yuzuconf="/var/config/yuzu/qt-config.ini"
# ES-DE config files
es_settings="/var/config/emulationstation/.emulationstation/es_settings.xml"
es_settings="/var/config/emulationstation/ES-DE/es_settings.xml"
# RetroArch config files

View file

@ -124,7 +124,7 @@ post_update() {
dir_prep "$texture_packs_folder/RetroArch-Mupen64Plus/hires_texture" "/var/config/retroarch/system/Mupen64plus/hires_texture"
dir_prep "$texture_packs_folder/Duckstation" "/var/config/duckstation/textures"
dir_prep "$rdhome/gamelists" "/var/config/emulationstation/.emulationstation/gamelists"
dir_prep "$rdhome/gamelists" "/var/config/emulationstation/ES-DE/gamelists"
dir_prep "$borders_folder" "/var/config/retroarch/overlays/borders"
rsync -rlD --mkpath "/app/retrodeck/emu-configs/retroarch/borders/" "/var/config/retroarch/overlays/borders/"
@ -172,7 +172,7 @@ post_update() {
dir_prep "$states_folder/psx/duckstation" "/var/config/duckstation/savestates"
rm -rf /var/config/retrodeck/tools
rm -rf /var/config/emulationstation/.emulationstation/gamelists/tools/
rm -rf /var/config/emulationstation/ES-DE/gamelists/tools/
mv "$saves_folder/gc/dolphin/EUR" "$saves_folder/gc/dolphin/EU"
mv "$saves_folder/gc/dolphin/USA" "$saves_folder/gc/dolphin/US"
@ -195,8 +195,8 @@ post_update() {
sed -i '$ a <string name="UserThemeDirectory" value="" />' "$es_settings" # Add new default line to existing file
set_setting_value "$es_settings" "UserThemeDirectory" "$themes_folder" "es_settings"
unlink "/var/config/emulationstation/ROMs"
unlink "/var/config/emulationstation/.emulationstation/downloaded_media"
unlink "/var/config/emulationstation/.emulationstation/themes"
unlink "/var/config/emulationstation/ES-DE/downloaded_media"
unlink "/var/config/emulationstation/ES-DE/themes"
set_setting_value "$raconf" "savestate_auto_load" "false" "retroarch"
set_setting_value "$raconf" "savestate_auto_save" "false" "retroarch"
@ -241,8 +241,15 @@ post_update() {
# - Install RetroDECK controller profile in desired location TODO
# - Change section name in retrodeck.cfg for ABXY button swap preset
sed -i 's^nintendo_button_layout^abxy_button_swap^' "$rd_conf" # This is a one-off sed statement as there are no functions for replacing section names
mv -f /var/config/emulationstation/.emulationstation /var/config/emulationstation/ES-DE # in 3.0 .emulationstation was moved into ES-DE
ln -s /var/config/emulationstation/ES-DE /var/config/emulationstation/.emulationstation # symlinking it to mantain the compatibility # TODO: remove this symlink n 0.9.0b
fi
# if [[ $prev_version -le "090" ]]; then
# # Placeholder for version 0.9.0b
# rm /var/config/emulationstation/.emulationstation # remving the old symlink to .emulationstation as it might be not needed anymore
# fi
# The following commands are run every time.
if [[ -d "/var/data/dolphin-emu/Load/DynamicInputTextures" ]]; then # Refresh installed textures if they have been enabled

View file

@ -40,12 +40,12 @@ prepare_component() {
if [[ "$component" =~ ^(es-de|ES-DE|all)$ ]]; then # For use after ESDE-related folders are moved or a reset
if [[ "$action" == "reset" ]]; then
rm -rf /var/config/emulationstation/
mkdir -p /var/config/emulationstation/.emulationstation/
cp -f /app/retrodeck/es_settings.xml /var/config/emulationstation/.emulationstation/es_settings.xml
mkdir -p /var/config/emulationstation/ES-DE/
cp -f /app/retrodeck/es_settings.xml /var/config/emulationstation/ES-DE/es_settings.xml
set_setting_value "$es_settings" "ROMDirectory" "$roms_folder" "es_settings"
set_setting_value "$es_settings" "MediaDirectory" "$media_folder" "es_settings"
set_setting_value "$es_settings" "UserThemeDirectory" "$themes_folder" "es_settings"
dir_prep "$rdhome/gamelists" "/var/config/emulationstation/.emulationstation/gamelists"
dir_prep "$rdhome/gamelists" "/var/config/emulationstation/ES-DE/gamelists"
emulationstation --home /var/config/emulationstation --create-system-dirs
update_splashscreens
fi
@ -53,7 +53,7 @@ prepare_component() {
set_setting_value "$es_settings" "ROMDirectory" "$roms_folder" "es_settings"
set_setting_value "$es_settings" "MediaDirectory" "$media_folder" "es_settings"
set_setting_value "$es_settings" "UserThemeDirectory" "$themes_folder" "es_settings"
dir_prep "$rdhome/gamelists" "/var/config/emulationstation/.emulationstation/gamelists"
dir_prep "$rdhome/gamelists" "/var/config/emulationstation/ES-DE/gamelists"
fi
fi

View file

@ -1349,7 +1349,7 @@ configurator_usb_import_dialog() {
if [[ ! -z "$choice" ]]; then
emulationstation --home "$choice" --create-system-dirs
rm -rf "$choice/.emulationstation" # Cleanup unnecessary folder
rm -rf "$choice/ES-DE" # Cleanup unnecessary folder
fi
else
configurator_generic_dialog "RetroDeck Configurator - USB Import" "There were no USB devices found."