From c32a20cf2367416eb2b14c93fcde6959c811d25a Mon Sep 17 00:00:00 2001 From: icenine451 Date: Sat, 29 Jun 2024 16:23:01 -0400 Subject: [PATCH 1/8] Update USB import tool --- tools/configurator.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/configurator.sh b/tools/configurator.sh index 2793be49..e6b735f8 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -1402,7 +1402,7 @@ configurator_usb_import_dialog() { while read -r size device_path; do device_name=$(basename "$device_path") external_devices=("${external_devices[@]}" "$device_name" "$size" "$device_path") - done < <(df --output=size,target | grep media | grep -v $default_sd | awk '{$1=$1;print}') + done < <(df --output=size,target -h | grep "/run/media/" | grep -v "$default_sd" | awk '{$1=$1;print}') if [[ "${#external_devices[@]}" -gt 0 ]]; then choice=$(rd_zenity --list --title="RetroDECK Configurator Utility - USB Migration Tool" --cancel-label="Back" \ @@ -1432,7 +1432,7 @@ configurator_usb_import_dialog() { device_name=$(basename "$device_path") external_devices=("${external_devices[@]}" "$device_name" "$size" "$device_path") fi - done < <(df --output=size,target | grep media | grep -v $default_sd | awk '{$1=$1;print}') + done < <(df --output=size,target -h | grep "/run/media/" | grep -v "$default_sd" | awk '{$1=$1;print}') if [[ "${#external_devices[@]}" -gt 0 ]]; then choice=$(rd_zenity --list --title="RetroDECK Configurator Utility - USB Migration Tool" --cancel-label="Back" \ From 9f2c4c9129cdd705244b0d40407f1183cf9c48ec Mon Sep 17 00:00:00 2001 From: icenine451 Date: Mon, 1 Jul 2024 09:26:30 -0400 Subject: [PATCH 2/8] Updates to USB Import tool - Support for new SteamOS SD card paths - More safety around existing user data --- tools/configurator.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tools/configurator.sh b/tools/configurator.sh index e6b735f8..4b6a7d6d 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -1397,12 +1397,15 @@ configurator_usb_import_dialog() { "Prepare USB device" ) log i "Configurator: opening \"$choice\" menu" + + configurator_generic_dialog "RetroDeck Configurator - USB Import" "If you have an SD card installed that is not currently configured in RetroDECK it may show up in this list, but not be suitable for USB import.\n\nPlease select your desired drive carefully." + external_devices=() while read -r size device_path; do device_name=$(basename "$device_path") external_devices=("${external_devices[@]}" "$device_name" "$size" "$device_path") - done < <(df --output=size,target -h | grep "/run/media/" | grep -v "$default_sd" | awk '{$1=$1;print}') + done < <(df --output=size,target -h | grep "/run/media/" | grep -v "$sdcard" | awk '{$1=$1;print}') if [[ "${#external_devices[@]}" -gt 0 ]]; then choice=$(rd_zenity --list --title="RetroDECK Configurator Utility - USB Migration Tool" --cancel-label="Back" \ @@ -1414,8 +1417,8 @@ configurator_usb_import_dialog() { "${external_devices[@]}") if [[ ! -z "$choice" ]]; then - es-de --home "$choice" --create-system-dirs - rm -rf "$choice/ES-DE" # Cleanup unnecessary folder + es-de --home "$choice/RetroDECK ROM Import" --create-system-dirs + rm -rf "$choice/RetroDECK ROM Import/ES-DE" # Cleanup unnecessary folder fi else configurator_generic_dialog "RetroDeck Configurator - USB Import" "There were no USB devices found." @@ -1428,11 +1431,11 @@ configurator_usb_import_dialog() { external_devices=() while read -r size device_path; do - if [[ -d "$device_path/ROMs" ]]; then + if [[ -d "$device_path/RetroDECK ROM Import/ROMs" ]]; then device_name=$(basename "$device_path") external_devices=("${external_devices[@]}" "$device_name" "$size" "$device_path") fi - done < <(df --output=size,target -h | grep "/run/media/" | grep -v "$default_sd" | awk '{$1=$1;print}') + done < <(df --output=size,target -h | grep "/run/media/" | grep -v "$sdcard" | awk '{$1=$1;print}') if [[ "${#external_devices[@]}" -gt 0 ]]; then choice=$(rd_zenity --list --title="RetroDECK Configurator Utility - USB Migration Tool" --cancel-label="Back" \ @@ -1444,10 +1447,10 @@ configurator_usb_import_dialog() { "${external_devices[@]}") if [[ ! -z "$choice" ]]; then - if [[ $(verify_space "$choice/ROMs" "$roms_folder") == "false" ]]; then + if [[ $(verify_space "$choice/RetroDECK ROM Import/ROMs" "$roms_folder") == "false" ]]; then if [[ $(configurator_generic_question_dialog "RetroDECK Configurator Utility - USB Migration Tool" "You MAY not have enough free space to import this ROM library.\n\nThis utility only imports new additions from the USB device, so if there are a lot of the same ROMs in both locations you are likely going to be fine\nbut we are not able to verify how much data will be transferred before it happens.\n\nIf you are unsure, please verify your available free space before continuing.\n\nDo you want to continue now?") == "true" ]]; then ( - rsync -a --mkpath "$choice/ROMs/"* "$roms_folder" + rsync -a --mkpath "$choice/RetroDECK ROM Import/ROMs/"* "$roms_folder" ) | rd_zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --auto-close \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ @@ -1456,7 +1459,7 @@ configurator_usb_import_dialog() { fi else ( - rsync -a --mkpath "$choice/ROMs/"* "$roms_folder" + rsync -a --mkpath "$choice/RetroDECK ROM Import/ROMs/"* "$roms_folder" ) | rd_zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --auto-close \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ From 86d5298c9de487a7a1b9e3aecddd82d545484fd9 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Mon, 1 Jul 2024 09:32:58 -0400 Subject: [PATCH 3/8] Move USB Import tool to main Configurator --- tools/configurator.sh | 202 +++++++++++++++++++++--------------------- 1 file changed, 100 insertions(+), 102 deletions(-) diff --git a/tools/configurator.sh b/tools/configurator.sh index 4b6a7d6d..06d1c6be 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -61,6 +61,7 @@ source /app/libexec/global.sh # - Compress Multiple Games - RVZ # - Compress Multiple Games - All Formats # - Compress All Games +# - Tool: USB Import # - Install: RetroDECK Controller Layouts # - Install: PS3 firmware # - Install: PS Vita firmware @@ -101,7 +102,6 @@ source /app/libexec/global.sh # - Change Multi-user mode # - Change Update channel # - Browse the wiki -# - USB Import tool # - Install: RetroDECK Starter Pack # DIALOG TREE FUNCTIONS @@ -559,6 +559,7 @@ configurator_retrodeck_tools_dialog() { "Tool: Remove Empty ROM Folders" "Remove some or all of the empty ROM folders" "Tool: Rebuild All ROM Folders" "Rebuild any missing default ROM folders" "Tool: Compress Games" "Compress games for systems that support it" + "Tool: USB Import" "Prepare a USB device for ROMs or import an existing collection" "Install: RetroDECK Controller Layouts" "Install the custom RetroDECK controller layouts on Steam" "Install: PS3 Firmware" "Download and install PS3 firmware for use with the RPCS3 emulator" "Install: PS Vita Firmware" "Download and install PS Vita firmware for use with the Vita3K emulator" @@ -632,6 +633,11 @@ configurator_retrodeck_tools_dialog() { configurator_compression_tool_dialog ;; + "Tool: USB Import" ) + log i "Configurator: opening \"$choice\" menu" + configurator_usb_import_dialog + ;; + "Install: RetroDECK Controller Layouts" ) log i "Configurator: opening \"$choice\" menu" configurator_generic_dialog "RetroDECK Configurator - Install: RetroDECK Controller Profile" "We are now offering a new official RetroDECK controller profile!\nIt is an optional component that helps you get the most out of RetroDECK with a new in-game radial menu for unified hotkeys across emulators.\n\nThe files need to be installed outside of the normal ~/retrodeck folder, so we wanted your permission before proceeding.\n\nThe files will be installed at the following shared Steam locations:\n\n$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/\n$HOME/.steam/steam/controller_base/templates" @@ -925,6 +931,99 @@ configurator_compression_cleanup_dialog() { fi } +configurator_usb_import_dialog() { + choice=$(rd_zenity --list --title="RetroDECK Configurator Utility - Developer Options" --cancel-label="Back" \ + --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ + --column="Choice" --column="Description" \ + "Prepare USB device" "Create ROM folders on a selected USB device" \ + "Import from USB" "Import collection from a previously prepared device" ) + + case $choice in + + "Prepare USB device" ) + log i "Configurator: opening \"$choice\" menu" + configurator_generic_dialog "RetroDeck Configurator - USB Import" "If you have an SD card installed that is not currently configured in RetroDECK it may show up in this list, but not be suitable for USB import.\n\nPlease select your desired drive carefully." + + external_devices=() + + while read -r size device_path; do + device_name=$(basename "$device_path") + external_devices=("${external_devices[@]}" "$device_name" "$size" "$device_path") + done < <(df --output=size,target -h | grep "/run/media/" | grep -v "$sdcard" | awk '{$1=$1;print}') + + if [[ "${#external_devices[@]}" -gt 0 ]]; then + choice=$(rd_zenity --list --title="RetroDECK Configurator Utility - USB Migration Tool" --cancel-label="Back" \ + --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ + --hide-column=3 --print-column=3 \ + --column "Device Name" \ + --column "Device Size" \ + --column "path" \ + "${external_devices[@]}") + + if [[ ! -z "$choice" ]]; then + es-de --home "$choice/RetroDECK ROM Import" --create-system-dirs + rm -rf "$choice/RetroDECK ROM Import/ES-DE" # Cleanup unnecessary folder + fi + else + configurator_generic_dialog "RetroDeck Configurator - USB Import" "There were no USB devices found." + fi + configurator_usb_import_dialog + ;; + + "Import from USB" ) + log i "Configurator: opening \"$choice\" menu" + external_devices=() + + while read -r size device_path; do + if [[ -d "$device_path/RetroDECK ROM Import/ROMs" ]]; then + device_name=$(basename "$device_path") + external_devices=("${external_devices[@]}" "$device_name" "$size" "$device_path") + fi + done < <(df --output=size,target -h | grep "/run/media/" | grep -v "$sdcard" | awk '{$1=$1;print}') + + if [[ "${#external_devices[@]}" -gt 0 ]]; then + choice=$(rd_zenity --list --title="RetroDECK Configurator Utility - USB Migration Tool" --cancel-label="Back" \ + --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ + --hide-column=3 --print-column=3 \ + --column "Device Name" \ + --column "Device Size" \ + --column "path" \ + "${external_devices[@]}") + + if [[ ! -z "$choice" ]]; then + if [[ $(verify_space "$choice/RetroDECK ROM Import/ROMs" "$roms_folder") == "false" ]]; then + if [[ $(configurator_generic_question_dialog "RetroDECK Configurator Utility - USB Migration Tool" "You MAY not have enough free space to import this ROM library.\n\nThis utility only imports new additions from the USB device, so if there are a lot of the same ROMs in both locations you are likely going to be fine\nbut we are not able to verify how much data will be transferred before it happens.\n\nIf you are unsure, please verify your available free space before continuing.\n\nDo you want to continue now?") == "true" ]]; then + ( + rsync -a --mkpath "$choice/RetroDECK ROM Import/ROMs/"* "$roms_folder" + ) | + rd_zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --auto-close \ + --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ + --title "RetroDECK Configurator Utility - USB Import In Progress" + configurator_generic_dialog "RetroDECK Configurator - USB Migration Tool" "The import process is complete!" + fi + else + ( + rsync -a --mkpath "$choice/RetroDECK ROM Import/ROMs/"* "$roms_folder" + ) | + rd_zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --auto-close \ + --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ + --title "RetroDECK Configurator Utility - USB Import In Progress" + configurator_generic_dialog "RetroDECK Configurator - USB Migration Tool" "The import process is complete!" + fi + fi + else + configurator_generic_dialog "RetroDeck Configurator - USB Import" "There were no USB devices found with an importable folder." + fi + configurator_usb_import_dialog + ;; + + "" ) # No selection made or Back button clicked + log i "Configurator: going back" + configurator_retrodeck_tools_dialog + ;; + esac +} + configurator_online_update_setting_dialog() { if [[ $(get_setting_value $rd_conf "update_check" retrodeck "options") == "true" ]]; then rd_zenity --question \ @@ -1289,7 +1388,6 @@ configurator_developer_dialog() { "Change Multi-user mode" "Enable or disable multi-user support" \ "Change Update Channel" "Change between normal and cooker builds" \ "Browse the Wiki" "Browse the RetroDECK wiki online" \ - "USB Import" "Prepare a USB device for ROMs or import an existing collection" \ "Install RetroDECK Starter Pack" "Install the optional RetroDECK starter pack" ) case $choice in @@ -1310,11 +1408,6 @@ configurator_developer_dialog() { configurator_developer_dialog ;; - "USB Import" ) - log i "Configurator: opening \"$choice\" menu" - configurator_usb_import_dialog - ;; - "Install RetroDECK Starter Pack" ) log i "Configurator: opening \"$choice\" menu" if [[ $(configurator_generic_question_dialog "Install: RetroDECK Starter Pack" "The RetroDECK creators have put together a collection of classic retro games you might enjoy!\n\nWould you like to have them automatically added to your library?") == "true" ]]; then @@ -1386,101 +1479,6 @@ configurator_online_update_channel_dialog() { fi } -configurator_usb_import_dialog() { - choice=$(rd_zenity --list --title="RetroDECK Configurator Utility - Developer Options" --cancel-label="Back" \ - --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ - --column="Choice" --column="Description" \ - "Prepare USB device" "Create ROM folders on a selected USB device" \ - "Import from USB" "Import collection from a previously prepared device" ) - - case $choice in - - "Prepare USB device" ) - log i "Configurator: opening \"$choice\" menu" - - configurator_generic_dialog "RetroDeck Configurator - USB Import" "If you have an SD card installed that is not currently configured in RetroDECK it may show up in this list, but not be suitable for USB import.\n\nPlease select your desired drive carefully." - - external_devices=() - - while read -r size device_path; do - device_name=$(basename "$device_path") - external_devices=("${external_devices[@]}" "$device_name" "$size" "$device_path") - done < <(df --output=size,target -h | grep "/run/media/" | grep -v "$sdcard" | awk '{$1=$1;print}') - - if [[ "${#external_devices[@]}" -gt 0 ]]; then - choice=$(rd_zenity --list --title="RetroDECK Configurator Utility - USB Migration Tool" --cancel-label="Back" \ - --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ - --hide-column=3 --print-column=3 \ - --column "Device Name" \ - --column "Device Size" \ - --column "path" \ - "${external_devices[@]}") - - if [[ ! -z "$choice" ]]; then - es-de --home "$choice/RetroDECK ROM Import" --create-system-dirs - rm -rf "$choice/RetroDECK ROM Import/ES-DE" # Cleanup unnecessary folder - fi - else - configurator_generic_dialog "RetroDeck Configurator - USB Import" "There were no USB devices found." - fi - configurator_usb_import_dialog - ;; - - "Import from USB" ) - log i "Configurator: opening \"$choice\" menu" - external_devices=() - - while read -r size device_path; do - if [[ -d "$device_path/RetroDECK ROM Import/ROMs" ]]; then - device_name=$(basename "$device_path") - external_devices=("${external_devices[@]}" "$device_name" "$size" "$device_path") - fi - done < <(df --output=size,target -h | grep "/run/media/" | grep -v "$sdcard" | awk '{$1=$1;print}') - - if [[ "${#external_devices[@]}" -gt 0 ]]; then - choice=$(rd_zenity --list --title="RetroDECK Configurator Utility - USB Migration Tool" --cancel-label="Back" \ - --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ - --hide-column=3 --print-column=3 \ - --column "Device Name" \ - --column "Device Size" \ - --column "path" \ - "${external_devices[@]}") - - if [[ ! -z "$choice" ]]; then - if [[ $(verify_space "$choice/RetroDECK ROM Import/ROMs" "$roms_folder") == "false" ]]; then - if [[ $(configurator_generic_question_dialog "RetroDECK Configurator Utility - USB Migration Tool" "You MAY not have enough free space to import this ROM library.\n\nThis utility only imports new additions from the USB device, so if there are a lot of the same ROMs in both locations you are likely going to be fine\nbut we are not able to verify how much data will be transferred before it happens.\n\nIf you are unsure, please verify your available free space before continuing.\n\nDo you want to continue now?") == "true" ]]; then - ( - rsync -a --mkpath "$choice/RetroDECK ROM Import/ROMs/"* "$roms_folder" - ) | - rd_zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --auto-close \ - --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ - --title "RetroDECK Configurator Utility - USB Import In Progress" - configurator_generic_dialog "RetroDECK Configurator - USB Migration Tool" "The import process is complete!" - fi - else - ( - rsync -a --mkpath "$choice/RetroDECK ROM Import/ROMs/"* "$roms_folder" - ) | - rd_zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --auto-close \ - --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ - --title "RetroDECK Configurator Utility - USB Import In Progress" - configurator_generic_dialog "RetroDECK Configurator - USB Migration Tool" "The import process is complete!" - fi - fi - else - configurator_generic_dialog "RetroDeck Configurator - USB Import" "There were no USB devices found with an importable folder." - fi - configurator_usb_import_dialog - ;; - - "" ) # No selection made or Back button clicked - log i "Configurator: going back" - configurator_developer_dialog - ;; - esac - -} - # START THE CONFIGURATOR configurator_welcome_dialog From 6e0a729574d69698b405e9dbdbafdbf218709a69 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Mon, 1 Jul 2024 10:46:12 -0400 Subject: [PATCH 4/8] Create default BIOS subfolders during USB Import prep --- tools/configurator.sh | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/tools/configurator.sh b/tools/configurator.sh index 06d1c6be..1b85effe 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -961,8 +961,33 @@ configurator_usb_import_dialog() { "${external_devices[@]}") if [[ ! -z "$choice" ]]; then - es-de --home "$choice/RetroDECK ROM Import" --create-system-dirs - rm -rf "$choice/RetroDECK ROM Import/ES-DE" # Cleanup unnecessary folder + es-de --home "$choice/RetroDECK Import" --create-system-dirs + rm -rf "$choice/RetroDECK Import/ES-DE" # Cleanup unnecessary folder + create_dir "$choice/RetroDECK Import/BIOS" + + # Prepare default BIOS folder subfolders + create_dir "$choice/RetroDECK Import/BIOS/np2kai" + create_dir "$choice/RetroDECK Import/BIOS/dc" + create_dir "$choice/RetroDECK Import/BIOS/Mupen64plus" + create_dir "$choice/RetroDECK Import/BIOS/quasi88" + create_dir "$choice/RetroDECK Import/BIOS/fbneo/samples" + create_dir "$choice/RetroDECK Import/BIOS/fbneo/cheats" + create_dir "$choice/RetroDECK Import/BIOS/fbneo/blend" + create_dir "$choice/RetroDECK Import/BIOS/fbneo/patched" + create_dir "$choice/RetroDECK Import/BIOS/citra/sysdata" + create_dir "$choice/RetroDECK Import/BIOS/cemu" + create_dir "$choice/RetroDECK Import/BIOS/pico-8/carts" + create_dir "$choice/RetroDECK Import/BIOS/pico-8/cdata" + create_dir "$choice/RetroDECK Import/BIOS/rpcs3/dev_hdd0" + create_dir "$choice/RetroDECK Import/BIOS/rpcs3/dev_hdd1" + create_dir "$choice/RetroDECK Import/BIOS/rpcs3/dev_flash" + create_dir "$choice/RetroDECK Import/BIOS/rpcs3/dev_flash2" + create_dir "$choice/RetroDECK Import/BIOS/rpcs3/dev_flash3" + create_dir "$choice/RetroDECK Import/BIOS/rpcs3/dev_bdvd" + create_dir "$choice/RetroDECK Import/BIOS/rpcs3/dev_usb000" + create_dir "$choice/RetroDECK Import/BIOS/Vita3K/" + create_dir "$choice/RetroDECK Import/BIOS/mame-sa/samples" + create_dir "$choice/RetroDECK Import/BIOS/gzdoom" fi else configurator_generic_dialog "RetroDeck Configurator - USB Import" "There were no USB devices found." @@ -975,7 +1000,7 @@ configurator_usb_import_dialog() { external_devices=() while read -r size device_path; do - if [[ -d "$device_path/RetroDECK ROM Import/ROMs" ]]; then + if [[ -d "$device_path/RetroDECK Import/ROMs" ]]; then device_name=$(basename "$device_path") external_devices=("${external_devices[@]}" "$device_name" "$size" "$device_path") fi @@ -991,10 +1016,10 @@ configurator_usb_import_dialog() { "${external_devices[@]}") if [[ ! -z "$choice" ]]; then - if [[ $(verify_space "$choice/RetroDECK ROM Import/ROMs" "$roms_folder") == "false" ]]; then + if [[ $(verify_space "$choice/RetroDECK Import/ROMs" "$roms_folder") == "false" ]]; then if [[ $(configurator_generic_question_dialog "RetroDECK Configurator Utility - USB Migration Tool" "You MAY not have enough free space to import this ROM library.\n\nThis utility only imports new additions from the USB device, so if there are a lot of the same ROMs in both locations you are likely going to be fine\nbut we are not able to verify how much data will be transferred before it happens.\n\nIf you are unsure, please verify your available free space before continuing.\n\nDo you want to continue now?") == "true" ]]; then ( - rsync -a --mkpath "$choice/RetroDECK ROM Import/ROMs/"* "$roms_folder" + rsync -a --mkpath "$choice/RetroDECK Import/ROMs/"* "$roms_folder" ) | rd_zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --auto-close \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ @@ -1003,7 +1028,7 @@ configurator_usb_import_dialog() { fi else ( - rsync -a --mkpath "$choice/RetroDECK ROM Import/ROMs/"* "$roms_folder" + rsync -a --mkpath "$choice/RetroDECK Import/ROMs/"* "$roms_folder" ) | rd_zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --auto-close \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ From b88da802cfacb22512e678b73b26fb951d8b3ded Mon Sep 17 00:00:00 2001 From: icenine451 Date: Mon, 1 Jul 2024 10:47:17 -0400 Subject: [PATCH 5/8] Add BIOS folder to USB Import process --- tools/configurator.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/configurator.sh b/tools/configurator.sh index 1b85effe..ab2e13f2 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -1020,6 +1020,7 @@ configurator_usb_import_dialog() { if [[ $(configurator_generic_question_dialog "RetroDECK Configurator Utility - USB Migration Tool" "You MAY not have enough free space to import this ROM library.\n\nThis utility only imports new additions from the USB device, so if there are a lot of the same ROMs in both locations you are likely going to be fine\nbut we are not able to verify how much data will be transferred before it happens.\n\nIf you are unsure, please verify your available free space before continuing.\n\nDo you want to continue now?") == "true" ]]; then ( rsync -a --mkpath "$choice/RetroDECK Import/ROMs/"* "$roms_folder" + rsync -a --mkpath "$choice/RetroDECK Import/BIOS/"* "$bios_folder" ) | rd_zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --auto-close \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ @@ -1029,6 +1030,7 @@ configurator_usb_import_dialog() { else ( rsync -a --mkpath "$choice/RetroDECK Import/ROMs/"* "$roms_folder" + rsync -a --mkpath "$choice/RetroDECK Import/BIOS/"* "$bios_folder" ) | rd_zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --auto-close \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ From 129367e5dec7d820d97308bb8655a96d6abcc9df Mon Sep 17 00:00:00 2001 From: icenine451 Date: Mon, 1 Jul 2024 10:48:10 -0400 Subject: [PATCH 6/8] Update low space warning message for USB Import --- tools/configurator.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configurator.sh b/tools/configurator.sh index ab2e13f2..8b2fd70a 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -1017,7 +1017,7 @@ configurator_usb_import_dialog() { if [[ ! -z "$choice" ]]; then if [[ $(verify_space "$choice/RetroDECK Import/ROMs" "$roms_folder") == "false" ]]; then - if [[ $(configurator_generic_question_dialog "RetroDECK Configurator Utility - USB Migration Tool" "You MAY not have enough free space to import this ROM library.\n\nThis utility only imports new additions from the USB device, so if there are a lot of the same ROMs in both locations you are likely going to be fine\nbut we are not able to verify how much data will be transferred before it happens.\n\nIf you are unsure, please verify your available free space before continuing.\n\nDo you want to continue now?") == "true" ]]; then + if [[ $(configurator_generic_question_dialog "RetroDECK Configurator Utility - USB Migration Tool" "You MAY not have enough free space to import this ROM/BIOS library.\n\nThis utility only imports new additions from the USB device, so if there are a lot of the same files in both locations you are likely going to be fine\nbut we are not able to verify how much data will be transferred before it happens.\n\nIf you are unsure, please verify your available free space before continuing.\n\nDo you want to continue now?") == "true" ]]; then ( rsync -a --mkpath "$choice/RetroDECK Import/ROMs/"* "$roms_folder" rsync -a --mkpath "$choice/RetroDECK Import/BIOS/"* "$bios_folder" From 2d813196196663d815c83446d50a007e89b96d53 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Mon, 1 Jul 2024 10:49:18 -0400 Subject: [PATCH 7/8] Add BIOS folder size check to low space warning for USB Import --- tools/configurator.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configurator.sh b/tools/configurator.sh index 8b2fd70a..3e9c3c8f 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -1016,7 +1016,7 @@ configurator_usb_import_dialog() { "${external_devices[@]}") if [[ ! -z "$choice" ]]; then - if [[ $(verify_space "$choice/RetroDECK Import/ROMs" "$roms_folder") == "false" ]]; then + if [[ $(verify_space "$choice/RetroDECK Import/ROMs" "$roms_folder") == "false" || $(verify_space "$choice/RetroDECK Import/BIOS" "$bios_folder") == "false" ]]; then if [[ $(configurator_generic_question_dialog "RetroDECK Configurator Utility - USB Migration Tool" "You MAY not have enough free space to import this ROM/BIOS library.\n\nThis utility only imports new additions from the USB device, so if there are a lot of the same files in both locations you are likely going to be fine\nbut we are not able to verify how much data will be transferred before it happens.\n\nIf you are unsure, please verify your available free space before continuing.\n\nDo you want to continue now?") == "true" ]]; then ( rsync -a --mkpath "$choice/RetroDECK Import/ROMs/"* "$roms_folder" From 92e6383c7804dbf3b3e2aab5715b226f451608ed Mon Sep 17 00:00:00 2001 From: icenine451 Date: Mon, 1 Jul 2024 10:50:11 -0400 Subject: [PATCH 8/8] Update Configurator menu description for USB Import --- tools/configurator.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configurator.sh b/tools/configurator.sh index 3e9c3c8f..573dfef1 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -935,7 +935,7 @@ configurator_usb_import_dialog() { choice=$(rd_zenity --list --title="RetroDECK Configurator Utility - Developer Options" --cancel-label="Back" \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ --column="Choice" --column="Description" \ - "Prepare USB device" "Create ROM folders on a selected USB device" \ + "Prepare USB device" "Create ROM and BIOS folders on a selected USB device" \ "Import from USB" "Import collection from a previously prepared device" ) case $choice in