Merge pull request #693 from icenine451/cooker-0.8.0b-icenine451

Various 0.8.0b fixes/additions
This commit is contained in:
icenine451 2024-02-21 11:09:32 -05:00 committed by GitHub
commit 86ab9f46f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 19 additions and 17 deletions

View file

@ -40,3 +40,4 @@ sega32xjp
sega32xna sega32xna
snes snes
snesna snesna
tg16

View file

@ -40,7 +40,9 @@
.msa .msa
.nds .nds
.nes .nes
.ngc
.o .o
.pce
.prg .prg
.rom .rom
.sfc .sfc
@ -58,3 +60,4 @@
.unif .unif
.xex .xex
.xfd .xfd
.z64

View file

@ -275,7 +275,7 @@ dir_prep() {
if [ -d "$symlink.old" ]; if [ -d "$symlink.old" ];
then then
echo "Moving the data from $symlink.old to $real" #DEBUG echo "Moving the data from $symlink.old to $real" #DEBUG
mv -f "$symlink.old"/{.[!.],}* $real mv -f "$symlink.old"/{.[!.],}* "$real"
echo "Removing $symlink.old" #DEBUG echo "Removing $symlink.old" #DEBUG
rm -rf "$symlink.old" rm -rf "$symlink.old"
fi fi
@ -368,9 +368,6 @@ finit() {
echo "Executing finit" echo "Executing finit"
# Placing the default retrodeck.cfg
cp -vf $rd_defaults $rd_conf
# Internal or SD Card? # Internal or SD Card?
local finit_dest_choice=$(configurator_destination_choice_dialog "RetroDECK data" "Welcome to the first configuration of RetroDECK.\nThe setup will be quick but please READ CAREFULLY each message in order to avoid misconfigurations.\n\nWhere do you want your RetroDECK data folder to be located?\n\nThis folder will contain all ROMs, BIOSs and scraped data." ) local finit_dest_choice=$(configurator_destination_choice_dialog "RetroDECK data" "Welcome to the first configuration of RetroDECK.\nThe setup will be quick but please READ CAREFULLY each message in order to avoid misconfigurations.\n\nWhere do you want your RetroDECK data folder to be located?\n\nThis folder will contain all ROMs, BIOSs and scraped data." )
echo "Choice is $finit_dest_choice" echo "Choice is $finit_dest_choice"

View file

@ -109,8 +109,7 @@ vita3kconf="/var/data/Vita3K/config.yml"
vita3kusrconfdir="$bios_folder/Vita3K/Vita3K" vita3kusrconfdir="$bios_folder/Vita3K/Vita3K"
# We moved the lockfile in /var/config/retrodeck in order to solve issue #53 - Remove in a few versions # We moved the lockfile in /var/config/retrodeck in order to solve issue #53 - Remove in a few versions
if [ -f "$HOME/retrodeck/.lock" ] if [[ -f "$HOME/retrodeck/.lock" ]]; then
then
mv "$HOME/retrodeck/.lock" $lockfile mv "$HOME/retrodeck/.lock" $lockfile
fi fi
@ -121,10 +120,12 @@ if [[ ! -f "$rd_conf" ]]; then
echo "Initializing" echo "Initializing"
# if we are here means that the we are in a new installation, so the version is valorized with the hardcoded one # if we are here means that the we are in a new installation, so the version is valorized with the hardcoded one
# Initializing the variables # Initializing the variables
if [ -z $version]; then if [[ -z "$version" ]]; then
if [[ -f "$lockfile" ]]; then
if [[ $(cat $lockfile) == *"0.4."* ]] || [[ $(cat $lockfile) == *"0.3."* ]] || [[ $(cat $lockfile) == *"0.2."* ]] || [[ $(cat $lockfile) == *"0.1."* ]]; then # If the previous version is very out of date, pre-rd_conf if [[ $(cat $lockfile) == *"0.4."* ]] || [[ $(cat $lockfile) == *"0.3."* ]] || [[ $(cat $lockfile) == *"0.2."* ]] || [[ $(cat $lockfile) == *"0.1."* ]]; then # If the previous version is very out of date, pre-rd_conf
echo "Running version workaround" echo "Running version workaround"
version=$(cat $lockfile) version=$(cat $lockfile)
fi
else else
version="$hard_version" version="$hard_version"
fi fi
@ -132,10 +133,10 @@ if [[ ! -f "$rd_conf" ]]; then
# Check if SD card path has changed from SteamOS update # Check if SD card path has changed from SteamOS update
if [[ ! -d "$default_sd" && "$(ls -A /run/media/deck/)" ]]; then if [[ ! -d "$default_sd" && "$(ls -A /run/media/deck/)" ]]; then
if [[ $(find media/deck/* -maxdepth 0 -type d -print | wc -l) -eq 1 ]]; then # If there is only one SD card found in the new Steam OS 3.5 location, assign it as the default if [[ $(find media/deck/* -maxdepth 0 -type d -print | wc -l) -eq 1 ]]; then # If there is only one SD card found in the new SteamOS 3.5 location, assign it as the default
default_sd="$(find media/deck/* -maxdepth 0 -type d -print)" default_sd="$(find media/deck/* -maxdepth 0 -type d -print)"
else # If the default legacy path cannot be found, and there are multiple entries in the new Steam OS 3.5 SD card path, let the user pick which one to use else # If the default legacy path cannot be found, and there are multiple entries in the new Steam OS 3.5 SD card path, let the user pick which one to use
configurator_generic_dialog "RetroDECK Setup" "The SD card was not found in the expected location.\nThis may happen when SteamOS is updated.\n\nPlease browse to the current location of the SD card.\n\nIf you are not using an SD card, please click \"Cancel\"." configurator_generic_dialog "RetroDECK Setup" "The SD card was not found in the default location, and multiple drives were detected.\nPlease browse to the location of the desired SD card.\n\nIf you are not using an SD card, please click \"Cancel\"."
default_sd="$(directory_browse "SD Card Location")" default_sd="$(directory_browse "SD Card Location")"
fi fi
fi fi
@ -171,8 +172,8 @@ else
conf_read conf_read
# Verify rdhome is where it is supposed to be. # Verify rdhome is where it is supposed to be.
if [[ ! -d $rdhome ]]; then if [[ ! -d "$rdhome" ]]; then
prev_home_path=$rdhome prev_home_path="$rdhome"
configurator_generic_dialog "RetroDECK Setup" "The RetroDECK data folder was not found in the expected location.\nThis may happen when SteamOS is updated.\n\nPlease browse to the current location of the \"retrodeck\" folder." configurator_generic_dialog "RetroDECK Setup" "The RetroDECK data folder was not found in the expected location.\nThis may happen when SteamOS is updated.\n\nPlease browse to the current location of the \"retrodeck\" folder."
new_home_path=$(directory_browse "RetroDECK folder location") new_home_path=$(directory_browse "RetroDECK folder location")
set_setting_value $rd_conf "rdhome" "$new_home_path" retrodeck "paths" set_setting_value $rd_conf "rdhome" "$new_home_path" retrodeck "paths"

View file

@ -112,11 +112,11 @@ build_preset_config() {
"change" ) "change" )
if [[ "$read_preset" == "$current_preset" ]]; then if [[ "$read_preset" == "$current_preset" ]]; then
if [[ "$target_file" = \$* ]]; then # Read current target file and resolve if it is a variable if [[ "$target_file" = \$* ]]; then # Read current target file and resolve if it is a variable
declare -g "target_file=$target_file" eval target_file=$target_file
fi fi
local read_target_file="$target_file" local read_target_file="$target_file"
if [[ "$defaults_file" = \$* ]]; then #Read current defaults file and resolve if it is a variable if [[ "$defaults_file" = \$* ]]; then #Read current defaults file and resolve if it is a variable
declare -g "defaults_file=$defaults_file" eval defaults_file=$defaults_file
fi fi
local read_defaults_file="$defaults_file" local read_defaults_file="$defaults_file"
if [[ "$read_system_enabled" == "true" ]]; then if [[ "$read_system_enabled" == "true" ]]; then

View file

@ -58,7 +58,7 @@ https://retrodeck.net
echo "You are about to reset one or more RetroDECK components or emulators." echo "You are about to reset one or more RetroDECK components or emulators."
echo "Available options are: es-de, retroarch, cemu, citra, dolphin, duckstation, melonds, pcsx3, pico8, ppsspp, primehack, rpcs3, xemu, yuzu, vita3k, mame, gzdoom, boilr, all" echo "Available options are: es-de, retroarch, cemu, citra, dolphin, duckstation, melonds, pcsx3, pico8, ppsspp, primehack, rpcs3, xemu, yuzu, vita3k, mame, gzdoom, boilr, all"
read -p "Please enter the component you would like to reset: " component read -p "Please enter the component you would like to reset: " component
if [[ "$emulator" =~ ^(es-de|retroarch|cemu|citra|dolphin|duckstation|mame|melonds|pcsx2|ppsspp|primehack|rpcs3|xemu|yuzu|all-emulators)$ ]]; then if [[ "$component" =~ ^(es-de|retroarch|cemu|citra|dolphin|duckstation|mame|melonds|pcsx2|ppsspp|primehack|rpcs3|xemu|yuzu|all)$ ]]; then
read -p "You are about to reset $component to default settings. Enter 'y' to continue, 'n' to stop: " response read -p "You are about to reset $component to default settings. Enter 'y' to continue, 'n' to stop: " response
if [[ $response == [yY] ]]; then if [[ $response == [yY] ]]; then
prepare_component "reset" "$component" "cli" prepare_component "reset" "$component" "cli"