From de9e21c177d8678dbe631e105519a2d337faf20c Mon Sep 17 00:00:00 2001 From: icenine451 Date: Tue, 13 Jun 2023 14:41:16 -0400 Subject: [PATCH 1/4] Incorrect selection check for update option change --- rd-submodules/retroarch | 2 +- rd-submodules/shared-modules | 2 +- tools/configurator.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rd-submodules/retroarch b/rd-submodules/retroarch index fbfdda61..0b1cfb79 160000 --- a/rd-submodules/retroarch +++ b/rd-submodules/retroarch @@ -1 +1 @@ -Subproject commit fbfdda61b3da092a71cc53999dd3e7b909f244e2 +Subproject commit 0b1cfb79e591e10488a3262d6b38db843c39a409 diff --git a/rd-submodules/shared-modules b/rd-submodules/shared-modules index 50314360..a2441b96 160000 --- a/rd-submodules/shared-modules +++ b/rd-submodules/shared-modules @@ -1 +1 @@ -Subproject commit 50314360ded6fa3b9f0b602513b1164b7a6636ed +Subproject commit a2441b964afefd8cd1cebcdf562c7878670daf42 diff --git a/tools/configurator.sh b/tools/configurator.sh index 269fb69c..ee790af0 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -541,7 +541,7 @@ configurator_retrodeck_tools_dialog() { fi ;; - "RetroDECK: Change Update Check Setting" ) + "RetroDECK: Change Update Setting" ) configurator_online_update_setting_dialog ;; From 858f9d5691ad99b21d7a1d77aa9d0b33365b3fea Mon Sep 17 00:00:00 2001 From: icenine451 Date: Tue, 13 Jun 2023 14:44:54 -0400 Subject: [PATCH 2/4] Change network check target and add progress dlg --- functions/checks.sh | 6 ++++++ functions/global.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/functions/checks.sh b/functions/checks.sh index 6ebc2532..5e8e5002 100644 --- a/functions/checks.sh +++ b/functions/checks.sh @@ -4,7 +4,13 @@ check_network_connectivity() { # This function will do a basic check for network availability and return "true" if it is working. # USAGE: if [[ $(check_network_connectivity) == "true" ]]; then + ( local response=$(wget --spider -t 1 $remote_network_target) + ) | + 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 Network Check" \ + --text="Verifying network connectivity..." if [[ ! -z $(echo "$response" | grep "HTTP response 200") ]]; then echo "true" diff --git a/functions/global.sh b/functions/global.sh index ab232e5d..a7ad6136 100644 --- a/functions/global.sh +++ b/functions/global.sh @@ -37,7 +37,7 @@ default_sd="/run/media/mmcblk0p1" hard_version="$(cat '/app/retrodeck/version')" # hardcoded version (in the readonly filesystem) rd_repo="https://github.com/XargonWan/RetroDECK" # The URL of the main RetroDECK GitHub repo es_themes_list="https://gitlab.com/es-de/themes/themes-list/-/raw/master/themes.json" # The URL of the ES-DE 2.0 themes list -remote_network_target="https://one.one.one.one" # The URL of a common internet target for testing network access +remote_network_target="$rd_repo" # The URL of a common internet target for testing network access helper_files_folder="$emuconfigs/defaults/retrodeck/helper_files" # The parent folder of RetroDECK documentation files for deployment helper_files_list="$emuconfigs/defaults/retrodeck/reference_lists/helper_files_list.cfg" # The list of files to be deployed and where they go rd_appdata="/app/share/appdata/net.retrodeck.retrodeck.appdata.xml" # The shipped appdata XML file for this version From 01e197f74728cd1872ac9d02d4909356d1ddb380 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Tue, 13 Jun 2023 14:47:18 -0400 Subject: [PATCH 3/4] Change network check target again --- functions/global.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/global.sh b/functions/global.sh index a7ad6136..a5921f6c 100644 --- a/functions/global.sh +++ b/functions/global.sh @@ -37,7 +37,7 @@ default_sd="/run/media/mmcblk0p1" hard_version="$(cat '/app/retrodeck/version')" # hardcoded version (in the readonly filesystem) rd_repo="https://github.com/XargonWan/RetroDECK" # The URL of the main RetroDECK GitHub repo es_themes_list="https://gitlab.com/es-de/themes/themes-list/-/raw/master/themes.json" # The URL of the ES-DE 2.0 themes list -remote_network_target="$rd_repo" # The URL of a common internet target for testing network access +remote_network_target="https://flathub.org" # The URL of a common internet target for testing network access helper_files_folder="$emuconfigs/defaults/retrodeck/helper_files" # The parent folder of RetroDECK documentation files for deployment helper_files_list="$emuconfigs/defaults/retrodeck/reference_lists/helper_files_list.cfg" # The list of files to be deployed and where they go rd_appdata="/app/share/appdata/net.retrodeck.retrodeck.appdata.xml" # The shipped appdata XML file for this version From 68e9e77380b290ee02f5f4d471b1325a3896f4df Mon Sep 17 00:00:00 2001 From: icenine451 Date: Tue, 13 Jun 2023 14:53:04 -0400 Subject: [PATCH 4/4] Add multiple online target checks --- functions/checks.sh | 18 ++++++++++++------ functions/global.sh | 4 +++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/functions/checks.sh b/functions/checks.sh index 5e8e5002..ca2e38ed 100644 --- a/functions/checks.sh +++ b/functions/checks.sh @@ -5,18 +5,24 @@ check_network_connectivity() { # USAGE: if [[ $(check_network_connectivity) == "true" ]]; then ( - local response=$(wget --spider -t 1 $remote_network_target) + local response= + + if [[ ! -z $(wget --spider -t 1 $remote_network_target_1 | grep "HTTP response 200") ]]; then + local network_connnected="true" + elif [[ ! -z $(wget --spider -t 1 $remote_network_target_2 | grep "HTTP response 200") ]]; then + local network_connnected="true" + elif [[ ! -z $(wget --spider -t 1 $remote_network_target_3 | grep "HTTP response 200") ]]; then + local network_connnected="true" + else + local network_connnected="false" + fi ) | 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 Network Check" \ --text="Verifying network connectivity..." - if [[ ! -z $(echo "$response" | grep "HTTP response 200") ]]; then - echo "true" - else - echo "false" - fi + echo "$network_connected" } check_desktop_mode() { diff --git a/functions/global.sh b/functions/global.sh index a5921f6c..38a986b1 100644 --- a/functions/global.sh +++ b/functions/global.sh @@ -37,7 +37,9 @@ default_sd="/run/media/mmcblk0p1" hard_version="$(cat '/app/retrodeck/version')" # hardcoded version (in the readonly filesystem) rd_repo="https://github.com/XargonWan/RetroDECK" # The URL of the main RetroDECK GitHub repo es_themes_list="https://gitlab.com/es-de/themes/themes-list/-/raw/master/themes.json" # The URL of the ES-DE 2.0 themes list -remote_network_target="https://flathub.org" # The URL of a common internet target for testing network access +remote_network_target_1="https://flathub.org" # The URL of a common internet target for testing network access +remote_network_target_2="$rd_repo" # The URL of a common internet target for testing network access +remote_network_target_3="https://one.one.one.one" # The URL of a common internet target for testing network access helper_files_folder="$emuconfigs/defaults/retrodeck/helper_files" # The parent folder of RetroDECK documentation files for deployment helper_files_list="$emuconfigs/defaults/retrodeck/reference_lists/helper_files_list.cfg" # The list of files to be deployed and where they go rd_appdata="/app/share/appdata/net.retrodeck.retrodeck.appdata.xml" # The shipped appdata XML file for this version