mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-25 23:45:39 +00:00
FRAMEWORK: fixing online updater to point to the new org/repo
This commit is contained in:
parent
f5dc3407f5
commit
2ec8b00389
|
@ -44,10 +44,10 @@ check_for_version_update() {
|
||||||
|
|
||||||
log d "Entering funtcion check_for_version_update"
|
log d "Entering funtcion check_for_version_update"
|
||||||
|
|
||||||
wget -q --spider "https://api.github.com/repos/XargonWan/$update_repo/releases/latest"
|
wget -q --spider "https://api.github.com/repos/$git_organization_name/$update_repo/releases/latest"
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
local online_version=$(curl --silent "https://api.github.com/repos/XargonWan/$update_repo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
local online_version=$(curl --silent "https://api.github.com/repos/$git_organization_name/$update_repo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||||
|
|
||||||
if [[ ! "$update_ignore" == "$online_version" ]]; then
|
if [[ ! "$update_ignore" == "$online_version" ]]; then
|
||||||
if [[ "$update_repo" == "RetroDECK" ]] && [[ $(sed -e 's/[\.a-z]//g' <<< $version) -le $(sed -e 's/[\.a-z]//g' <<< $online_version) ]]; then
|
if [[ "$update_repo" == "RetroDECK" ]] && [[ $(sed -e 's/[\.a-z]//g' <<< $version) -le $(sed -e 's/[\.a-z]//g' <<< $online_version) ]]; then
|
||||||
|
@ -83,7 +83,7 @@ check_for_version_update() {
|
||||||
log i "Selected: \"OK\""
|
log i "Selected: \"OK\""
|
||||||
set_setting_value $rd_conf "update_ignore" "$online_version" retrodeck "options" # Store version to ignore for future checks
|
set_setting_value $rd_conf "update_ignore" "$online_version" retrodeck "options" # Store version to ignore for future checks
|
||||||
fi
|
fi
|
||||||
elif [[ "$update_repo" == "RetroDECK-cooker" ]] && [[ ! $version == $online_version ]]; then
|
elif [[ "$update_repo" == "$cooker_repository_name" ]] && [[ ! $version == $online_version ]]; then
|
||||||
log i "Showing update request dialog as \"$online_version\" was found and is greater then \"$version\""
|
log i "Showing update request dialog as \"$online_version\" was found and is greater then \"$version\""
|
||||||
choice=$(rd_zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Yes" --extra-button="No" --extra-button="Ignore this version" \
|
choice=$(rd_zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Yes" --extra-button="No" --extra-button="Ignore this version" \
|
||||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||||
|
|
|
@ -53,6 +53,9 @@ RA_API_URL="https://retroachievements.org/dorequest.php"
|
||||||
presets_dir="$config/retrodeck/presets" # Repository for all system preset config files
|
presets_dir="$config/retrodeck/presets" # Repository for all system preset config files
|
||||||
incompatible_presets_reference_list="$config/retrodeck/reference_lists/incompatible_presets.cfg" # A config file listing all incompatible presets for reference (eg. cannot have borders and widescreen enabled simultaniously)
|
incompatible_presets_reference_list="$config/retrodeck/reference_lists/incompatible_presets.cfg" # A config file listing all incompatible presets for reference (eg. cannot have borders and widescreen enabled simultaniously)
|
||||||
pretty_system_names_reference_list="$config/retrodeck/reference_lists/pretty_system_names.cfg" # An internal translation list for turning internal names (eg. gbc) to "pretty" names (Nintendo GameBoy Color)
|
pretty_system_names_reference_list="$config/retrodeck/reference_lists/pretty_system_names.cfg" # An internal translation list for turning internal names (eg. gbc) to "pretty" names (Nintendo GameBoy Color)
|
||||||
|
git_organization_name="RetroDECK" # The name of the organization in our git repository such as GitHub
|
||||||
|
cooker_repository_name="Cooker" # The name of the cooker repository under RetroDECK organization
|
||||||
|
|
||||||
|
|
||||||
# Godot data transfer temp files
|
# Godot data transfer temp files
|
||||||
|
|
||||||
|
@ -180,7 +183,7 @@ if [[ ! -f "$rd_conf" ]]; then
|
||||||
set_setting_value $rd_conf "sdcard" "$default_sd" retrodeck "paths" # Set SD card location if default path has changed
|
set_setting_value $rd_conf "sdcard" "$default_sd" retrodeck "paths" # Set SD card location if default path has changed
|
||||||
|
|
||||||
if grep -qF "cooker" <<< "$hard_version" || grep -qF "PR-" <<< "$hard_version"; then # If newly-installed version is a "cooker" or PR build
|
if grep -qF "cooker" <<< "$hard_version" || grep -qF "PR-" <<< "$hard_version"; then # If newly-installed version is a "cooker" or PR build
|
||||||
set_setting_value $rd_conf "update_repo" "RetroDECK-cooker" retrodeck "options"
|
set_setting_value $rd_conf "update_repo" "$cooker_repository_name" retrodeck "options"
|
||||||
set_setting_value $rd_conf "update_check" "true" retrodeck "options"
|
set_setting_value $rd_conf "update_check" "true" retrodeck "options"
|
||||||
set_setting_value $rd_conf "developer_options" "true" retrodeck "options"
|
set_setting_value $rd_conf "developer_options" "true" retrodeck "options"
|
||||||
fi
|
fi
|
||||||
|
@ -197,7 +200,7 @@ else
|
||||||
log i "Loading it"
|
log i "Loading it"
|
||||||
|
|
||||||
if grep -qF "cooker" <<< $hard_version; then # If newly-installed version is a "cooker" build
|
if grep -qF "cooker" <<< $hard_version; then # If newly-installed version is a "cooker" build
|
||||||
set_setting_value $rd_conf "update_repo" "RetroDECK-cooker" retrodeck "options"
|
set_setting_value $rd_conf "update_repo" "$cooker_repository_name" retrodeck "options"
|
||||||
set_setting_value $rd_conf "update_check" "true" retrodeck "options"
|
set_setting_value $rd_conf "update_check" "true" retrodeck "options"
|
||||||
set_setting_value $rd_conf "developer_options" "true" retrodeck "options"
|
set_setting_value $rd_conf "developer_options" "true" retrodeck "options"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -109,7 +109,7 @@ if [ -f "$lockfile" ]; then
|
||||||
if grep -qF "cooker" <<< $hard_version; then # If newly-installed version is a "cooker" build
|
if grep -qF "cooker" <<< $hard_version; then # If newly-installed version is a "cooker" build
|
||||||
log d "Newly-installed version is a \"cooker\" build"
|
log d "Newly-installed version is a \"cooker\" build"
|
||||||
configurator_generic_dialog "RetroDECK Cooker Warning" "RUNNING COOKER VERSIONS OF RETRODECK CAN BE EXTREMELY DANGEROUS AND ALL OF YOUR RETRODECK DATA\n(INCLUDING BIOS FILES, BORDERS, DOWNLOADED MEDIA, GAMELISTS, MODS, ROMS, SAVES, STATES, SCREENSHOTS, TEXTURE PACKS AND THEMES)\nARE AT RISK BY CONTINUING!"
|
configurator_generic_dialog "RetroDECK Cooker Warning" "RUNNING COOKER VERSIONS OF RETRODECK CAN BE EXTREMELY DANGEROUS AND ALL OF YOUR RETRODECK DATA\n(INCLUDING BIOS FILES, BORDERS, DOWNLOADED MEDIA, GAMELISTS, MODS, ROMS, SAVES, STATES, SCREENSHOTS, TEXTURE PACKS AND THEMES)\nARE AT RISK BY CONTINUING!"
|
||||||
set_setting_value $rd_conf "update_repo" "RetroDECK-cooker" retrodeck "options"
|
set_setting_value $rd_conf "update_repo" "$cooker_repository_name" retrodeck "options"
|
||||||
set_setting_value $rd_conf "update_check" "true" retrodeck "options"
|
set_setting_value $rd_conf "update_check" "true" retrodeck "options"
|
||||||
set_setting_value $rd_conf "developer_options" "true" retrodeck "options"
|
set_setting_value $rd_conf "developer_options" "true" retrodeck "options"
|
||||||
cooker_base_version=$(echo $hard_version | cut -d'-' -f2)
|
cooker_base_version=$(echo $hard_version | cut -d'-' -f2)
|
||||||
|
|
|
@ -1367,7 +1367,7 @@ configurator_online_update_channel_dialog() {
|
||||||
|
|
||||||
if [ $? == 0 ] # User clicked "Yes"
|
if [ $? == 0 ] # User clicked "Yes"
|
||||||
then
|
then
|
||||||
set_setting_value $rd_conf "update_repo" "RetroDECK-cooker" retrodeck "options"
|
set_setting_value $rd_conf "update_repo" "$cooker_repository_name" retrodeck "options"
|
||||||
else # User clicked "Cancel"
|
else # User clicked "Cancel"
|
||||||
configurator_developer_dialog
|
configurator_developer_dialog
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue