mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 05:55:38 +00:00
Plan for upcomfing SteamOS SD card path changes
This commit is contained in:
parent
71f209eb7a
commit
3bc51e3c02
|
@ -29,10 +29,10 @@ browse() {
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
zenity --question --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" --cancel-label="No" --ok-label "Yes" \
|
zenity --question --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" --cancel-label="No" --ok-label "Yes" \
|
||||||
--text="No directory selected. Do you want to return to the main menu?"
|
--text="No directory selected. Do you want to exit?"
|
||||||
if [ $? == 1 ]
|
if [ $? == 0 ]
|
||||||
then
|
then
|
||||||
configurator_welcome_dialog
|
break
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
14
global.sh
14
global.sh
|
@ -68,6 +68,12 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if SD card path has changed from SteamOS update
|
||||||
|
if [[ ! -d $default_sd && "$(ls -A /run/media/deck/)" ]]; then
|
||||||
|
configurator_generic_dialog "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\"."
|
||||||
|
default_sd=$(browse "SD Card Location")
|
||||||
|
fi
|
||||||
|
|
||||||
rdhome="$HOME/retrodeck" # the retrodeck home, aka ~/retrodeck
|
rdhome="$HOME/retrodeck" # the retrodeck home, aka ~/retrodeck
|
||||||
roms_folder="$rdhome/roms" # the default roms folder path
|
roms_folder="$rdhome/roms" # the default roms folder path
|
||||||
saves_folder="$rdhome/saves" # the default saves folder path
|
saves_folder="$rdhome/saves" # the default saves folder path
|
||||||
|
@ -97,4 +103,12 @@ else
|
||||||
echo "Found RetroDECK config file in $rd_conf"
|
echo "Found RetroDECK config file in $rd_conf"
|
||||||
echo "Loading it"
|
echo "Loading it"
|
||||||
source "$rd_conf"
|
source "$rd_conf"
|
||||||
|
|
||||||
|
# Update SD card path if changed from SteamOS update
|
||||||
|
if [[ ! -d $sdcard && "$(ls -A /run/media/deck/)" ]]; then
|
||||||
|
configurator_generic_dialog "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\"."
|
||||||
|
sdcard=$(browse "SD Card Location")
|
||||||
|
conf_write
|
||||||
|
source "$rd_conf"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -7,7 +7,7 @@ post_update() {
|
||||||
|
|
||||||
local prev_version=$(sed -e 's/[\.a-z]//g' <<< $version)
|
local prev_version=$(sed -e 's/[\.a-z]//g' <<< $version)
|
||||||
|
|
||||||
if [[ $prev_version -le "054" ]]; then
|
if [[ $prev_version -le "054" ]]; then # If updating from prior to save sorting change
|
||||||
|
|
||||||
# Finding existing ROMs folder
|
# Finding existing ROMs folder
|
||||||
if [ -d "$default_sd/retrodeck" ]
|
if [ -d "$default_sd/retrodeck" ]
|
||||||
|
|
18
retrodeck.sh
18
retrodeck.sh
|
@ -73,8 +73,8 @@ then
|
||||||
# ...but the version doesn't match with the config file
|
# ...but the version doesn't match with the config file
|
||||||
if [ "$hard_version" != "$version" ];
|
if [ "$hard_version" != "$version" ];
|
||||||
then
|
then
|
||||||
echo "Config file's version is $version but the actual version is $hard_version"
|
echo "Config file's version is $version but the actual version is $hard_version"
|
||||||
post_update # Executing post update script
|
post_update # Executing post update script
|
||||||
fi
|
fi
|
||||||
# Else, LOCKFILE IS NOT EXISTING (WAS REMOVED)
|
# Else, LOCKFILE IS NOT EXISTING (WAS REMOVED)
|
||||||
# if the lock file doesn't exist at all means that it's a fresh install or a triggered reset
|
# if the lock file doesn't exist at all means that it's a fresh install or a triggered reset
|
||||||
|
@ -83,15 +83,11 @@ else
|
||||||
finit # Executing First/Force init
|
finit # Executing First/Force init
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Normal Startup
|
# Check if SD card path has changed from SteamOS update
|
||||||
|
if [[ ! -d $sd_card && "$(ls -A /run/media/deck/)" ]]; then
|
||||||
# Check if the retrodeck folder is existing
|
configurator_generic_dialog "The ROMs folder was not found in the expected location.\nThis may happen when SteamOS is updated.\n\nPlease browse to the current location of the "
|
||||||
if [ ! -d $rdhome ] then
|
|
||||||
zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \
|
|
||||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
|
||||||
--title "RetroDECK" \
|
|
||||||
--text="The retrodeck folder was not found on the previous location, please choose a new location.\nNOTE: the folder selection may work on desktop mode only."
|
|
||||||
configurator_destination_choice_dialog()
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Normal Startup
|
||||||
|
|
||||||
start_retrodeck
|
start_retrodeck
|
Loading…
Reference in a new issue