From 9bf1c2d886a879160c8f0ae3ed5115373588e55a Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sat, 24 Aug 2024 22:55:31 +0900 Subject: [PATCH 01/12] POST_UPDATE: restoring old 0.8.4b missing region --- functions/post_update.sh | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/functions/post_update.sh b/functions/post_update.sh index d5c72f5d..8fa5338e 100644 --- a/functions/post_update.sh +++ b/functions/post_update.sh @@ -374,6 +374,61 @@ post_update() { fi fi + # Check if the version is older than 0.8.4b + if [[ $(check_version_is_older_than "0.8.4b") == "true" ]]; then + # In version 0.8.4b, the following changes were made: + # - Recovery from a failed move of the themes, downloaded_media and gamelists folder to their new ES-DE locations (AGAIN) + + log d "Injecting the new retrodeck/ES-DE subdir into the retrodeck.cfg" + # Check if ES-DE already exists in media_folder or themes_folder + if grep -E '^(media_folder|themes_folder)=.*ES-DE' "$rd_conf"; then + log d "ES-DE path already exists in media_folder or themes_folder" + else + # Update the paths if ES-DE does not exist + sed -i -e '/media_folder=/s|retrodeck/|retrodeck/ES-DE/|g' -e '/themes_folder=/s|retrodeck/|retrodeck/ES-DE/|g' "$rd_conf" && log d "Injection successful" + fi + log d "$(grep media_folder "$rd_conf")" + log d "$(grep themes_folder "$rd_conf")" + conf_read + conf_write + + log i "Checking if ES-DE downloaded_media, gamelist, and themes folder must be migrated from \"$rdhome\" to \"$rdhome/ES-DE\" due to a RetroDECK Framework bug" + + # Use rsync to merge directories and overwrite existing files + if [[ -d "$rdhome/themes" ]]; then + rsync -a "$rdhome/themes/" "$rdhome/ES-DE/themes/" && log d "Move of \"$rdhome/themes\" to \"$rdhome/ES-DE/themes\" completed" + rm -rf "$rdhome/themes" # Remove the original directory after merging + else + log i "ES-DE themes appear to have already been migrated." + fi + + if [[ -d "$rdhome/downloaded_media" ]]; then + rsync -a "$rdhome/downloaded_media/" "$rdhome/ES-DE/downloaded_media/" && log d "Move of \"$rdhome/downloaded_media\" to \"$rdhome/ES-DE/downloaded_media\" completed" + rm -rf "$rdhome/downloaded_media" # Remove the original directory after merging + else + log i "ES-DE downloaded media appear to have already been migrated." + fi + + if [[ -d "$rdhome/gamelists" ]]; then + rsync -a "$rdhome/gamelists/" "$rdhome/ES-DE/gamelists/" && log d "Move of \"$rdhome/gamelists\" to \"$rdhome/ES-DE/gamelists\" completed" + rm -rf "$rdhome/gamelists" # Remove the original directory after merging + else + log i "ES-DE gamelists appear to have already been migrated." + fi + + if [[ -d "$rdhome/collections" ]]; then + rsync -a "$rdhome/collections/" "$rdhome/ES-DE/collections/" && log d "Move of \"$rdhome/collections\" to \"$rdhome/ES-DE/collections\" completed" + rm -rf "$rdhome/collections" # Remove the original directory after merging + else + log i "ES-DE collections appear to have already been migrated." + fi + + # Setting the correct variables once again + set_setting_value "$es_settings" "MediaDirectory" "$media_folder" "es_settings" + set_setting_value "$es_settings" "UserThemeDirectory" "$themes_folder" "es_settings" + + fi + if [[ $(check_version_is_older_than "0.9.0b") == "true" ]]; then # Placeholder for version 0.9.0b From f12babdf0b9c0861088e5c43d2610888cd0549cf Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 09:38:46 +0900 Subject: [PATCH 02/12] RPCS3: updated firmware to 4.91 [skip ci] --- functions/global.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/global.sh b/functions/global.sh index f00f6914..b0a62c0f 100644 --- a/functions/global.sh +++ b/functions/global.sh @@ -45,7 +45,7 @@ remote_network_target_2="$rd_repo" remote_network_target_3="https://one.one.one.one" # The URL of a common internet target for testing network access helper_files_folder="$config/retrodeck/helper_files" # The parent folder of RetroDECK documentation files for deployment rd_appdata="/app/share/appdata/net.retrodeck.retrodeck.appdata.xml" # The shipped appdata XML file for this version -rpcs3_firmware="http://dus01.ps3.update.playstation.net/update/ps3/image/us/2023_0228_05fe32f5dc8c78acbcd84d36ee7fdc5b/PS3UPDAT.PUP" +rpcs3_firmware="http://dus01.ps3.update.playstation.net/update/ps3/image/us/2024_0227_3694eb3fb8d9915c112e6ab41a60c69f/PS3UPDAT.PUP" RA_API_URL="https://retroachievements.org/dorequest.php" # API URL for RetroAchievements.org presets_dir="$config/retrodeck/presets" # Repository for all system preset config files git_organization_name="RetroDECK" # The name of the organization in our git repository such as GitHub From 16c2c2a50e3a2272fe17f0c804241365b058591f Mon Sep 17 00:00:00 2001 From: MonkeyX Date: Sun, 25 Aug 2024 01:42:09 +0100 Subject: [PATCH 03/12] Removed need for BIOS tmp file for Godot (#919) Co-authored-by: Rekku --- functions/configurator_functions.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/functions/configurator_functions.sh b/functions/configurator_functions.sh index 32f11a7f..db7f9c4d 100644 --- a/functions/configurator_functions.sh +++ b/functions/configurator_functions.sh @@ -5,10 +5,6 @@ check_bios_files() { # There is a "basic" and "expert" mode which outputs different levels of data # USAGE: check_bios_files "mode" - if [[ -f "$godot_bios_files_checked" ]]; then - rm -f "$godot_bios_files_checked" # Godot data transfer temp files - fi - touch "$godot_bios_files_checked" while IFS="^" read -r bios_file bios_subdir bios_hash bios_system bios_desc || [[ -n "$bios_file" ]]; do @@ -25,10 +21,10 @@ check_bios_files() { fi if [[ "$1" == "basic" ]]; then bios_checked_list=("${bios_checked_list[@]}" "$bios_file" "$bios_system" "$bios_file_found" "$bios_hash_matched" "$bios_desc") - echo "$bios_file"^"$bios_system"^"$bios_file_found"^"$bios_hash_matched"^"$bios_desc" >> "$godot_bios_files_checked" # Godot data transfer temp file + echo "$bios_file"^"$bios_system"^"$bios_file_found"^"$bios_hash_matched"^"$bios_desc" # Godot data transfer else bios_checked_list=("${bios_checked_list[@]}" "$bios_file" "$bios_system" "$bios_file_found" "$bios_hash_matched" "$bios_desc" "$bios_subdir" "$bios_hash") - echo "$bios_file"^"$bios_system"^"$bios_file_found"^"$bios_hash_matched"^"$bios_desc"^"$bios_subdir"^"$bios_hash" >> "$godot_bios_files_checked" # Godot data transfer temp file + echo "$bios_file"^"$bios_system"^"$bios_file_found"^"$bios_hash_matched"^"$bios_desc"^"$bios_subdir"^"$bios_hash" # Godot data transfer fi fi done < $bios_checklist From feed0a1e581ac3af75060118337f4926fe128760 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 14:02:05 +0900 Subject: [PATCH 04/12] WORKFLOW: reverting the pull_request_target as it was not building the PR code [skip ci] --- .github/workflows/cooker-selfhosted.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index 4e232e33..2994d14e 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -15,7 +15,7 @@ on: - '*.sh' - 'net.retrodeck.retrodeck.yml' - 'net.retrodeck.retrodeck.appdata.xml' - pull_request_target: + pull_request: branches: - cooker* From bf619738f8e4f1e3e9bc7839e79bf6c0579bd7dd Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 14:18:01 +0900 Subject: [PATCH 05/12] WORKFLOW: tentative solution for PRs [skip ci] --- .github/workflows/cooker-selfhosted.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index 2994d14e..ba1f8785 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -15,7 +15,7 @@ on: - '*.sh' - 'net.retrodeck.retrodeck.yml' - 'net.retrodeck.retrodeck.appdata.xml' - pull_request: + pull_request_target: branches: - cooker* @@ -56,6 +56,12 @@ jobs: with: submodules: 'true' + - name: Checkout PR branch (include changes) + if: ${{ github.event_name == 'pull_request' }} + run: | + git fetch origin +refs/pull/${{ github.event.pull_request.number }}/merge + git checkout -qf FETCH_HEAD + - name: "Install dependencies" run: "automation_tools/install_dependencies.sh" From 056179c62949dabe2ee8a76c1012c954acfff705 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 17:42:50 +0900 Subject: [PATCH 06/12] WORKFLOW: tentative solution for PRs - try#2 [skip ci] --- .github/workflows/cooker-selfhosted.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index ba1f8785..9ac31a7c 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -57,7 +57,7 @@ jobs: submodules: 'true' - name: Checkout PR branch (include changes) - if: ${{ github.event_name == 'pull_request' }} + if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }} run: | git fetch origin +refs/pull/${{ github.event.pull_request.number }}/merge git checkout -qf FETCH_HEAD From 2cfc71b588481746fea39df93392952660c29bc7 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 17:52:19 +0900 Subject: [PATCH 07/12] WORKFLOW: tentative solution for PRs - try#3 [skip ci] --- .github/workflows/cooker-selfhosted.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index 9ac31a7c..bc9a6a40 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -55,12 +55,7 @@ jobs: uses: actions/checkout@v4 with: submodules: 'true' - - - name: Checkout PR branch (include changes) - if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }} - run: | - git fetch origin +refs/pull/${{ github.event.pull_request.number }}/merge - git checkout -qf FETCH_HEAD + ref: ${{ github.sha }} - name: "Install dependencies" run: "automation_tools/install_dependencies.sh" From 11877adc380c3475c8df863010d057b1177af4ce Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 17:56:21 +0900 Subject: [PATCH 08/12] WORKFLOW: simplyfing PR name [skip ci] --- .github/workflows/cooker-selfhosted.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index bc9a6a40..fd440a45 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -92,7 +92,7 @@ jobs: echo "[DEBUG] source branch is: $source_branch" # Generate the tag for a pull request - echo "TAG=PR-$GITHUB_RUN_ID-$source_branch-${{ env.buildid }}" >> $GITHUB_ENV + echo "TAG=PR-$source_branch-${{ env.buildid }}" >> $GITHUB_ENV echo "MAKE_LATEST=false" >> $GITHUB_ENV # Not marked as the latest cooker version if it's a feature branch else # Generate the tag for non-pull request branches From 5bad19fb3565eab7724de9c5db6e2a292c3b2a42 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 18:03:38 +0900 Subject: [PATCH 09/12] WORKFLOW: tentative solution for PRs - try#4 [skip ci] --- .github/workflows/cooker-selfhosted.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index fd440a45..99aa131e 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -54,6 +54,7 @@ jobs: - name: Clone RetroDECK repo uses: actions/checkout@v4 with: + fetch-depth: 0 submodules: 'true' ref: ${{ github.sha }} From dac75b31b24bf7f547d52fb55713f6fd11521b23 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 18:10:40 +0900 Subject: [PATCH 10/12] WORKFLOW: tentative solution for PRs - try#5 [skip ci] --- .github/workflows/cooker-selfhosted.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index 99aa131e..cc3e7a64 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -15,9 +15,8 @@ on: - '*.sh' - 'net.retrodeck.retrodeck.yml' - 'net.retrodeck.retrodeck.appdata.xml' - pull_request_target: - branches: - - cooker* + pull_request_target: + pull_request: # Italy (CET): 11:00 PM # Japan (JST): 7:00 AM From de743a3e230ce376b2fec70dba1d74eacdbe9908 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 20:56:43 +0900 Subject: [PATCH 11/12] WORKFLOW: tentative solution for PRs - try#8 [skip ci] --- .github/workflows/cooker-selfhosted.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index cc3e7a64..17c0855a 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -5,17 +5,16 @@ on: branches: - cooker* - feat* + - branch/cooker* paths: - '.github/workflows/**' - 'automation_tools/**' - 'config/**' - - 'config/es-de/**' - 'functions/**' - 'rd-submodules/**' - '*.sh' - 'net.retrodeck.retrodeck.yml' - 'net.retrodeck.retrodeck.appdata.xml' - pull_request_target: pull_request: # Italy (CET): 11:00 PM @@ -32,7 +31,7 @@ jobs: Building_RetroDECK: runs-on: retrodeck - steps: + steps: # Circumventing this bug: https://github.com/flatpak/flatpak-builder/issues/317 - name: Remove stuck mounts @@ -53,9 +52,7 @@ jobs: - name: Clone RetroDECK repo uses: actions/checkout@v4 with: - fetch-depth: 0 submodules: 'true' - ref: ${{ github.sha }} - name: "Install dependencies" run: "automation_tools/install_dependencies.sh" From 43c99f2e3399178ff77e0804e09f2fb3a0de84c8 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 28 Aug 2024 21:10:49 +0900 Subject: [PATCH 12/12] WORKFLOW: enhanced for outside runs, removed artifact for flathub as not needed in cooker [skip ci] --- .github/workflows/cooker-selfhosted.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index 17c0855a..ff93253d 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -41,6 +41,7 @@ jobs: continue-on-error: true - name: Generate a token for Rekku + if: ${{ github.repository == 'RetroDECK/RetroDECK' }} id: generate-rekku-token uses: actions/create-github-app-token@v1 with: @@ -176,10 +177,11 @@ jobs: allowUpdates: true makeLatest: ${{env.MAKE_LATEST}} # if it's a feat branch is not considered the latest build token: ${{ steps.generate-rekku-token.outputs.token }} - repo: Cooker + repo: ${{ github.repository_owner == 'RetroDECK' && 'Cooker' || github.event.repository.name }} # "Cooker" if we are in RetroDECK Org, else "this repo" continue-on-error: true - name: Rewrite Tag + if: ${{ github.repository == 'RetroDECK/RetroDECK' }} run: | git submodule deinit -f --all git fetch --tags @@ -202,14 +204,6 @@ jobs: path: RetroDECK-cooker.flatpak continue-on-error: true - - name: Create Artifact for flathub - run: | - tar -czf ${GITHUB_WORKSPACE}/RetroDECK-Artifact-cooker.tar.gz -C ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker . - hash=($(sha256sum ${GITHUB_WORKSPACE}/RetroDECK-Artifact-cooker.tar.gz)) - echo $hash > ${GITHUB_WORKSPACE}/RetroDECK-Artifact-cooker.sha - mv -f RetroDECK-Artifact-cooker.* ${{ secrets.ARTIFACT_REPO }} - continue-on-error: true - # - name: Upload RetroDECK-cooker.flatpak to Gitea Release # run: | # # Set variables for Gitea host, organization, repository, access token, and release details