mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-21 13:35:39 +00:00
Merge pull request #814 from icenine451/cooker-0.8.2b-icenine451
Cooker 0.8.2b icenine451
This commit is contained in:
commit
ac992bb8a0
|
@ -42,6 +42,14 @@ find_empty_rom_folders() {
|
|||
|
||||
empty_rom_folders_list=()
|
||||
all_empty_folders=()
|
||||
all_helper_files=()
|
||||
|
||||
while IFS='^' read -r file dest
|
||||
do
|
||||
if [[ ! "$file" == "#"* ]] && [[ ! -z "$file" ]]; then
|
||||
all_helper_files=("${all_helper_files[@]}" "$file")
|
||||
fi
|
||||
done < "$helper_files_list"
|
||||
|
||||
for system in $(find "$roms_folder" -mindepth 1 -maxdepth 1 -type d -printf '%f\n')
|
||||
do
|
||||
|
@ -59,6 +67,21 @@ find_empty_rom_folders() {
|
|||
empty_rom_folders_list=("${empty_rom_folders_list[@]}" "false" "$(realpath $dir)")
|
||||
all_empty_folders=("${all_empty_folders[@]}" "$(realpath $dir)")
|
||||
echo "$(realpath $dir)" >> "$godot_empty_roms_folders" # Godot data transfer temp file
|
||||
elif [[ $count -eq 2 ]] && [[ "$files" =~ "systeminfo.txt" ]]; then
|
||||
# Directory contains 2 files, one of which is "systeminfo.txt"
|
||||
for helper_file in ${all_helper_files[@]} # Compare helper file list to dir file list
|
||||
do
|
||||
if [[ "$files" =~ "$helper_file" ]]; then
|
||||
contains_helper_file="true" # Helper file was found
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ "$contains_helper_file" == "true" ]]; then
|
||||
# Directory contains only systeminfo.txt and a helper file
|
||||
empty_rom_folders_list=("${empty_rom_folders_list[@]}" "false" "$(realpath $dir)")
|
||||
all_empty_folders=("${all_empty_folders[@]}" "$(realpath $dir)")
|
||||
echo "$(realpath $dir)" >> "$godot_empty_roms_folders" # Godot data transfer temp file
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
|
|
@ -560,7 +560,6 @@ deploy_helper_files() {
|
|||
eval current_dest="$dest"
|
||||
cp -f "$helper_files_folder/$file" "$current_dest/$file"
|
||||
fi
|
||||
|
||||
done < "$helper_files_list"
|
||||
}
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ prepare_component() {
|
|||
create_dir "$bios_folder/fbneo/cheats"
|
||||
create_dir "$bios_folder/fbneo/blend"
|
||||
dir_prep "$mods_folder/FBNeo" "$bios_folder/fbneo/patched"
|
||||
|
||||
|
||||
# PPSSPP
|
||||
log i "--------------------------------"
|
||||
log i "Prepearing PPSSPP_LIBRETRO"
|
||||
|
@ -172,11 +172,11 @@ prepare_component() {
|
|||
set_setting_value "$ra_scummvm_conf" "themepath" "$mods_folder/RetroArch/ScummVM/theme" "libretro_scummvm" "scummvm"
|
||||
set_setting_value "$ra_scummvm_conf" "savepath" "$saves_folder/scummvm" "libretro_scummvm" "scummvm"
|
||||
set_setting_value "$ra_scummvm_conf" "browser_lastpath" "$roms_folder/scummvm" "libretro_scummvm" "scummvm"
|
||||
|
||||
|
||||
dir_prep "$texture_packs_folder/RetroArch-Mesen" "/var/config/retroarch/system/HdPacks"
|
||||
dir_prep "$texture_packs_folder/RetroArch-Mupen64Plus/cache" "/var/config/retroarch/system/Mupen64plus/cache"
|
||||
dir_prep "$texture_packs_folder/RetroArch-Mupen64Plus/hires_texture" "/var/config/retroarch/system/Mupen64plus/hires_texture"
|
||||
|
||||
|
||||
# Reset default preset settings
|
||||
set_setting_value "$rd_conf" "retroarch" "$(get_setting_value "$rd_defaults" "retroarch" "retrodeck" "cheevos")" "retrodeck" "cheevos"
|
||||
set_setting_value "$rd_conf" "retroarch" "$(get_setting_value "$rd_defaults" "retroarch" "retrodeck" "cheevos_hardcore")" "retrodeck" "cheevos_hardcore"
|
||||
|
@ -853,7 +853,7 @@ prepare_component() {
|
|||
sed -i 's#RETRODECKSAVESDIR#'$saves_folder'#g' "/var/config/gzdoom/gzdoom.ini" # This is an unfortunate one-off because set_setting_value does not currently support JSON
|
||||
fi
|
||||
|
||||
if [[ $component_found="false" ]]; then
|
||||
if [[ $component_found == "false" ]]; then
|
||||
log e "Supplied component $component not found, not resetting"
|
||||
fi
|
||||
|
||||
|
|
|
@ -586,16 +586,10 @@ configurator_retrodeck_tools_dialog() {
|
|||
|
||||
"Tool: Remove Empty ROM Folders" )
|
||||
log i "Configurator: opening \"$choice\" menu"
|
||||
(
|
||||
find_empty_rom_folders
|
||||
) |
|
||||
zenity --progress --no-cancel --pulsate --auto-close \
|
||||
--icon-name=net.retrodeck.retrodeck \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
--title="Finding Empty ROM Folders" \
|
||||
--width=400 --height=200 \
|
||||
--text="Finding empty ROM folders, please be patient.\n\n"
|
||||
|
||||
|
||||
configurator_generic_dialog "RetroDECK Configurator - Remove Empty ROM Folders" "Searching for empty rom folders, please be patient..."
|
||||
find_empty_rom_folders
|
||||
|
||||
choice=$(zenity \
|
||||
--list --width=1200 --height=720 --title "RetroDECK Configurator - RetroDECK: Remove Empty ROM Folders" \
|
||||
--checklist --hide-column=3 --ok-label="Remove Selected" --extra-button="Remove All" \
|
||||
|
@ -604,7 +598,7 @@ configurator_retrodeck_tools_dialog() {
|
|||
--column "Remove?" \
|
||||
--column "System" \
|
||||
"${empty_rom_folders_list[@]}")
|
||||
|
||||
|
||||
local rc=$?
|
||||
if [[ $rc == "0" && ! -z $choice ]]; then # User clicked "Remove Selected" with at least one system selected
|
||||
IFS="," read -ra folders_to_remove <<< "$choice"
|
||||
|
@ -620,7 +614,7 @@ configurator_retrodeck_tools_dialog() {
|
|||
done
|
||||
configurator_generic_dialog "RetroDECK Configurator - Remove Empty ROM Folders" "The removal process is complete."
|
||||
fi
|
||||
|
||||
|
||||
configurator_retrodeck_tools_dialog
|
||||
;;
|
||||
|
||||
|
|
Loading…
Reference in a new issue