Compare commits

...

4 commits

3 changed files with 25 additions and 12 deletions

View file

@ -842,7 +842,8 @@
"description": "RetroDECK Framework",
"name": "RetroDECK",
"url": "https://retrodeck.net/",
"cli-arg": "--version"
"cli-arg": "--version",
"logs": "$XDG_CONFIG_HOME/retrodeck/logs/retrodeck.log"
},
"retroarch": {
"description": "Libretro Multi-emulator Frontend",
@ -851,6 +852,7 @@
"launch": "retroarch",
"cli-arg": "--version",
"system": "retroarch",
"logs": "$logs_folder/retroarch/retroarch.log",
"properties": [
{
"cheevos": true,
@ -1045,6 +1047,7 @@
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_about/what-is-retrodeck/",
"system": "flash",
"launch": "ruffle-rdwrapper.sh",
"logs": "$XDG_CACHE_HOME/ruffle/ruffle.log",
"cli-arg": ""
},
"melonds": {
@ -1103,6 +1106,7 @@
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_emulator_guides/vita3k/vita3k-guide/",
"system": "psvita",
"launch": "Vita3K",
"logs": "$XDG_CACHE_HOME/Vita3K/vita3k.log",
"cli-arg": ""
},
"rpcs3": {
@ -1113,6 +1117,7 @@
"launch": "rpcs3",
"cli-arg": "--version",
"launch-override": "cd $(dirname $game) && rpcs3 $game",
"logs": "$XDG_CACHE_HOME/rpcs3/RPCS3.log",
"properties": [
{
"ask_to_exit": true
@ -1143,6 +1148,7 @@
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_emulator_guides/dolphin-primehack/dolphin-primehack-guide/",
"launch": "dolphin-emu-wrapper",
"cli-arg": "--version",
"logs": "$XDG_DATA_HOME/dolphin-emu/dolphin.log",
"system": [
"gc",
"wii"
@ -1163,6 +1169,7 @@
"url": "https://retrodeck.readthedocs.io/en/latest/wiki_emulator_guides/dolphin-primehack/dolphin-primehack-guide/",
"launch": "primehack-wrapper",
"cli-arg": "--version",
"logs": "$XDG_DATA_HOME/primehack/Logs/dolphin.log",
"system": [
"wii"
],

View file

@ -44,16 +44,21 @@ steam_sync() {
if (match($0, /<path>([^<]+)<\/path>/, arr))
print arr[1]
}' "$gamelist")
while read -r game; do
if [[ -n "$game" ]]; then # Avoid empty lines created by xmlstarlet
local game="${game#./}" # Remove leading ./
if [[ -f "$roms_folder/$system/$game" ]]; then # Validate file exists and isn't a stale ES-DE entry for a removed file
# Construct launch options with the rom path in quotes, to handle spaces
local launchOptions="$launch_command -s $system \"$roms_folder/$system/$game\""
jq --arg title "${game%.*}" --arg target "$target" --arg launchOptions "$launchOptions" \
'. += [{"title": $title, "target": $target, "launchOptions": $launchOptions}]' "${retrodeck_favorites_file}.new" > "${retrodeck_favorites_file}.tmp" \
&& mv "${retrodeck_favorites_file}.tmp" "${retrodeck_favorites_file}.new"
fi
while read -r game_path; do
local game="${game_path#./}" # Remove leading ./
if [[ -f "$roms_folder/$system/$game" ]]; then # Validate file exists and isn't a stale ES-DE entry for a removed file
# Construct launch options with the rom path in quotes, to handle spaces
local game_title=$(awk -v search_path="$game_path" 'BEGIN { RS="</game>"; FS="\n" }
/<path>/ {
if (match($0, /<path>([^<]+)<\/path>/, path) && path[1] == search_path) {
if (match($0, /<name>([^<]+)<\/name>/, name))
print name[1]
}
}' "$gamelist")
local launchOptions="$launch_command -s $system \"$roms_folder/$system/$game\""
jq --arg title "$game_title" --arg target "$target" --arg launchOptions "$launchOptions" \
'. += [{"title": $title, "target": $target, "launchOptions": $launchOptions}]' "${retrodeck_favorites_file}.new" > "${retrodeck_favorites_file}.tmp" \
&& mv "${retrodeck_favorites_file}.tmp" "${retrodeck_favorites_file}.new"
fi
done <<< "$system_favorites"
done
@ -110,7 +115,7 @@ steam_sync() {
log d "Some new favorites added between syncs, adding new favorited games"
# Load added favorites as manifest and run SRM add
mv "$retrodeck_added_favorites" "$retrodeck_favorites_file"
steam_sync_add
steam_sync_add
fi
# Make new favorites manifest the current one

View file

@ -1309,6 +1309,7 @@ configurator_steam_tools_dialog() {
"Manual Steam Sync" )
log i "Configurator: opening \"$choice\" menu"
configurator_generic_dialog "RetroDeck Configurator - Manual Steam Sync" "RetroDECK will now look for any ES-DE favorites and sync them to Steam, if needed.\n\nIf Steam Sync has been run before and no favorites have been added or removed, you will be returned to the Steam Tools menu.\nIf changes are needed, you will see a progress dialog during the process."
export CONFIGURATOR_GUI="zenity"
steam_sync
configurator_steam_tools_dialog