Add initial mod/texture pack support

This commit is contained in:
icenine451 2023-03-10 16:54:07 -05:00
parent 4e04e467e4
commit 76f8dec0a7
3 changed files with 23 additions and 4 deletions

View file

@ -7,6 +7,9 @@ bios_folder=/home/deck/retrodeck/bios
media_folder=/home/deck/retrodeck/downloaded_media
themes_folder=/home/deck/retrodeck/themes
logs_folder=/home/deck/retrodeck/.logs
mods_folder=/home/deck/retrodeck/mods
texture_packs_folder=/home/deck/retrodeck/texture_packs
sdcard=/run/media/mmcblk0p1
power_user=false
power_user=false
network_features=false

View file

@ -736,6 +736,8 @@ dolphin_init() {
dir_prep "$rdhome/states" "/var/data/dolphin-emu/StateSaves"
mkdir -pv /var/data/dolphin-emu/Wii/
dir_prep "$rdhome/saves/wii/dolphin" "/var/data/dolphin-emu/Wii"
dir_prep "$mods_folder/Dolphin" "/var/data/dolphin-emu/Load/GraphicMods/"
dir_prep "$texture_packs_folder/Dolphin" "/var/data/dolphin-emu/Load/Textures/"
}
primehack_init() {
@ -754,6 +756,8 @@ primehack_init() {
dir_prep "$rdhome/states" "/var/data/primehack/StateSaves"
mkdir -pv /var/data/primehack/Wii/
dir_prep "$rdhome/saves/wii/primehack" "/var/data/primehack/Wii"
dir_prep "$mods_folder/Primehack" "/var/data/primehack/Load/GraphicMods/"
dir_prep "$texture_packs_folder/Primehack" "/var/data/primehack/Load/Textures/"
}
pcsx2_init() {
@ -1009,7 +1013,7 @@ update_splashscreens() {
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
# TODO: 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
# ES section
dir_prep $roms_folder "/var/config/emulationstation/ROMs"
@ -1270,8 +1274,9 @@ finit() {
mkdir -pv $states_folder
mkdir -pv $rdhome/screenshots
mkdir -pv $rdhome/bios/pico8
mkdir -pv $rdhome/.logs
mkdir -pv $logs_folder
mkdir -pv $mods_folder
mkdir -pv $texture_packs_folder
# XMLSTARLET HERE
cp -fv /app/retrodeck/es_settings.xml /var/config/emulationstation/.emulationstation/es_settings.xml

View file

@ -27,6 +27,17 @@ post_update() {
dir_prep "$rdhome/saves/duckstation" "/var/data/duckstation/memcards"
dir_prep "$rdhome/states/duckstation" "/var/data/duckstation/savestates"
fi
if [[ $prev_version -le "070" ]]; then
# In version 0.7.0b, the following changes were made that required config file updates/reset or other changes to the filesystem:
# - New ~/retrodeck/mods and ~/retrodeck/texture_packs directories are added and symlinked to multiple different emulators (where supported)
mkdir -p "$mods_folder"
mkdir -p "$texture_packs_folder"
dir_prep "$mods_folder/Primehack" "/var/data/primehack/Load/GraphicMods/"
dir_prep "$texture_packs_folder/Primehack" "/var/data/primehack/Load/Textures/"
dir_prep "$mods_folder/Dolphin" "/var/data/dolphin-emu/Load/GraphicMods/"
dir_prep "$texture_packs_folder/Dolphin" "/var/data/dolphin-emu/Load/Textures/"
fi
# The following commands are run every time.