mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-03-06 14:27:48 +00:00
Merge pull request #711 from icenine451/cooker-0.8.0b-icenine451
Cooker 0.8.0b icenine451
This commit is contained in:
commit
daaf6dd701
functions
|
@ -519,10 +519,15 @@ install_retrodeck_controller_profile() {
|
||||||
# NOTE: These files need to be stored in shared locations for Steam, outside of the normal RetroDECK folders and should always be an optional user choice
|
# NOTE: These files need to be stored in shared locations for Steam, outside of the normal RetroDECK folders and should always be an optional user choice
|
||||||
# BIGGER NOTE: As part of this process, all emulators will need to have their configs hard-reset to match the controller mappings of the profile
|
# BIGGER NOTE: As part of this process, all emulators will need to have their configs hard-reset to match the controller mappings of the profile
|
||||||
# USAGE: install_retrodeck_controller_profile
|
# USAGE: install_retrodeck_controller_profile
|
||||||
if [[ -d "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/" && -d "$HOME/.steam/steam/controller_base/templates/" ]]; then
|
if [[ -d "$HOME/.steam/steam/controller_base/templates/" || -d "$HOME/.var/app/com.valvesoftware.Steam/.steam/steam/controller_base/templates/" ]]; then
|
||||||
rsync -rlD --mkpath "/app/retrodeck/binding_icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/"
|
if [[ -d "$HOME/.steam/steam/controller_base/templates/" ]]; then # If a normal binary Steam install exists
|
||||||
rsync -rlD --mkpath "$emuconfigs/defaults/retrodeck/controller_configs/" "$HOME/.steam/steam/controller_base/templates/"
|
rsync -rlD --mkpath "/app/retrodeck/binding_icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/"
|
||||||
# TODO: delete older files Issue#672
|
rsync -rlD --mkpath "$emuconfigs/defaults/retrodeck/controller_configs/" "$HOME/.steam/steam/controller_base/templates/"
|
||||||
|
fi
|
||||||
|
if [[ -d "$HOME/.var/app/com.valvesoftware.Steam/.steam/steam/controller_base/templates/" ]]; then # If a Flatpak Steam install exists
|
||||||
|
rsync -rlD --mkpath "/app/retrodeck/binding_icons/" "$HOME/.var/app/com.valvesoftware.Steam/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/"
|
||||||
|
rsync -rlD --mkpath "$emuconfigs/defaults/retrodeck/controller_configs/" "$HOME/.var/app/com.valvesoftware.Steam/.steam/steam/controller_base/templates/"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "RetroDECK Controller Profile Install" "The target directories for the controller profile do not exist.\n\nThis may happen if you do not have Steam installed or the location is does not have permission to be read."
|
configurator_generic_dialog "RetroDECK Controller Profile Install" "The target directories for the controller profile do not exist.\n\nThis may happen if you do not have Steam installed or the location is does not have permission to be read."
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -236,11 +236,12 @@ post_update() {
|
||||||
|
|
||||||
if [[ $prev_version -le "080" ]]; then
|
if [[ $prev_version -le "080" ]]; then
|
||||||
# In version 0.8.0b, the following changes were made that required config file updates/reset or other changes to the filesystem:
|
# In version 0.8.0b, the following changes were made that required config file updates/reset or other changes to the filesystem:
|
||||||
# - Remove RetroDECK controller profile from existing template location TODO
|
# - Remove RetroDECK controller profile from existing template location
|
||||||
# - Determine if Steam is installed via normal desktop application / Flatpak / SteamOS TODO
|
|
||||||
# - Install RetroDECK controller profile in desired location TODO
|
|
||||||
# - Change section name in retrodeck.cfg for ABXY button swap preset
|
# - Change section name in retrodeck.cfg for ABXY button swap preset
|
||||||
# - Force disable global rewind in RA in prep for preset system
|
# - Force disable global rewind in RA in prep for preset system
|
||||||
|
if [[ -f "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf"]]; then # Only remove if file had been previously installed
|
||||||
|
rm -f "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf"
|
||||||
|
fi
|
||||||
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
|
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
|
||||||
set_setting_value "$raconf" "rewind_enable" "false" "retroarch"
|
set_setting_value "$raconf" "rewind_enable" "false" "retroarch"
|
||||||
|
|
||||||
|
@ -268,7 +269,7 @@ post_update() {
|
||||||
rsync -rlD --mkpath "/app/retrodeck/extras/DynamicInputTextures/" "/var/data/primehack/Load/DynamicInputTextures/"
|
rsync -rlD --mkpath "/app/retrodeck/extras/DynamicInputTextures/" "/var/data/primehack/Load/DynamicInputTextures/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -f "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf" ]]; then # If RetroDECK controller profile has been previously installed
|
if [[ ! -z $(find "$HOME/.steam/steam/controller_base/templates/" -maxdepth 1 -type f -iname "RetroDECK*.vdf") || ! -z $(find "$HOME/.var/app/com.valvesoftware.Steam/.steam/steam/controller_base/templates/" -maxdepth 1 -type f -iname "RetroDECK*.vdf") ]]; then # If RetroDECK controller profile has been previously installed
|
||||||
install_retrodeck_controller_profile
|
install_retrodeck_controller_profile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue