--text="There is a new version of RetroDECK available!\nYou are running version $hard_version, the latest is $online_version.\n\nIf you would like to update to the new version now, click \"Yes\".\nIf you would like to skip reminders about this version, click \"Ignore this version\".\nYou will be reminded again at the next version update.\n\nIf you would like to disable these update notifications entirely, disable Online Update Checks in the Configurator.")
rc=$?# Capture return code, as "Yes" button has no text value
if[[$rc=="1"]];then# If any button other than "Yes" was clicked
if[[$choice=="Ignore this version"]];then
set_setting_value $rd_conf"update_ignore""$online_version" retrodeck "options"# Store version to ignore for future checks
fi
else# User clicked "Yes"
configurator_generic_dialog "RetroDECK Online Update""The update process may take several minutes.\n\nAfter the update is complete, RetroDECK will close. When you run it again you will be using the latest version."
--text="There is a more recent build of the RetroDECK cooker branch.\nYou are running version $hard_version, the latest is $online_version.\n\nWould you like to update to it?\nIf you would like to skip reminders about this version, click \"Ignore this version\".\nYou will be reminded again at the next version update.\n\nIf you would like to disable these update notifications entirely, disable Online Update Checks in the Configurator.")
rc=$?# Capture return code, as "Yes" button has no text value
if[[$rc=="1"]];then# If any button other than "Yes" was clicked
if[[$choice=="Ignore this version"]];then
set_setting_value $rd_conf"update_ignore""$online_version" retrodeck "options"# Store version to ignore for future checks.
fi
else# User clicked "Yes"
configurator_generic_dialog "RetroDECK Online Update""The update process may take several minutes.\n\nAfter the update is complete, RetroDECK will close. When you run it again you will be using the latest version."
(
locallatest_cooker_download=$(curl --silent https://api.github.com/repos/XargonWan/$update_repo/releases/latest | grep '"browser_download_url":'| sed -E 's/.*"([^"]+)".*/\1/')
else# Unable to reach the GitHub API for some reason
configurator_generic_dialog "RetroDECK Online Update""RetroDECK is unable to reach the GitHub API to perform a version check.\nIt's possible that location is being blocked by your network or ISP.\n\nIf the problem continues, you will need to disable internal checks through the Configurator\nand perform updates manually through the Discover store."