2022-11-18 20:10:17 +00:00
#!/bin/bash
2023-03-09 14:18:06 +00:00
source /app/libexec/save_migration.sh
2022-11-18 20:10:17 +00:00
post_update( ) {
# post update script
echo "Executing post-update script"
2022-11-19 21:47:45 +00:00
local prev_version = $( sed -e 's/[\.a-z]//g' <<< $version )
2022-11-18 20:10:17 +00:00
2023-01-10 16:41:09 +00:00
if [ [ $prev_version -le "050" ] ] ; then # If updating from prior to save sorting change at 0.5.0b
2023-03-09 14:18:06 +00:00
save_migration
2022-11-19 21:47:45 +00:00
fi
2022-11-18 20:10:17 +00:00
2023-02-25 16:02:05 +00:00
# Everything within the following ( <code> ) will happen behind the Zenity dialog. The save migration was a long process so it has its own individual dialogs.
2022-11-18 20:10:17 +00:00
(
2023-02-25 16:02:05 +00:00
if [ [ $prev_version -le "062" ] ] ; then
# In version 0.6.2b, the following changes were made that required config file updates/reset:
2023-03-07 15:36:14 +00:00
# - Primehack preconfiguration completely redone. "Stop emulation" hotkey set to Start+Select, Xbox and Nintendo keymap profiles were created, Xbox set as default.
# - Duckstation save and state locations were dir_prep'd to the rdhome/save and /state folders, which was not previously done. Much safer now!
2023-02-25 16:11:40 +00:00
rm -rf /var/config/primehack # Purge old Primehack config files. Saves are safe as they are linked into /var/data/primehack.
2023-02-25 16:02:05 +00:00
primehack_init
2023-03-07 15:36:14 +00:00
dir_prep " $rdhome /saves/duckstation " "/var/data/duckstation/memcards"
dir_prep " $rdhome /states/duckstation " "/var/data/duckstation/savestates"
2023-02-25 16:02:05 +00:00
fi
# The following commands are run every time.
2022-11-18 20:10:17 +00:00
tools_init
2023-03-08 14:51:13 +00:00
update_rd_conf
2022-11-18 20:10:17 +00:00
) |
zenity --icon-name= net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
--window-icon= "/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Finishing Upgrade" \
--text= "RetroDECK is finishing the upgrade process, please wait."
create_lock
}