From 21834feeadcc874e8dd452b2b9c7c1e8f846041f Mon Sep 17 00:00:00 2001 From: XargonWan Date: Fri, 12 Jul 2024 17:02:56 +0900 Subject: [PATCH] DEVELOPER_TOOLBOX: fixing local build --- .gitignore | 2 +- automation_tools/appdata_management.sh | 24 +++++++++---------- automation_tools/flatpak_build_bundle.sh | 4 ++-- .../flatpak_build_download_only.sh | 4 ++-- automation_tools/flatpak_build_only.sh | 5 ++-- developer_toolbox/build_retrodeck_locally.sh | 5 ++++ 6 files changed, 25 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 05fda91c..393e53ca 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,7 @@ backup tmp .godot rd-submodules/es-de/patches-tmp* -.local/ +retrodeck-repo buildid *.bak incconfigs/ diff --git a/automation_tools/appdata_management.sh b/automation_tools/appdata_management.sh index 9eb2ba4e..072dd8ee 100755 --- a/automation_tools/appdata_management.sh +++ b/automation_tools/appdata_management.sh @@ -40,19 +40,19 @@ release_snippet="\ xml_content=$(cat "$appdata_file") # Replace RELEASE_NOTES_PLACEHOLDER with the actual release notes -# TODO -git clone https://github.com/XargonWan/RetroDECK.wiki.git /tmp/wiki +# # TODO +# git clone https://github.com/XargonWan/RetroDECK.wiki.git /tmp/wiki -# Path to the markdown file -wiki="/tmp/wiki/Version-history:-Patch-Notes.md" -# Read the markdown file until the first occurrence of "---" -latest_version_notes="" -while IFS= read -r line; do - if [ "$line" = "---" ]; then - break - fi - latest_version_notes+="$line\n" -done < "$wiki" +# # Path to the markdown file +# wiki="/tmp/wiki/Version-history:-Patch-Notes.md" +# # Read the markdown file until the first occurrence of "---" +# latest_version_notes="" +# while IFS= read -r line; do +# if [ "$line" = "---" ]; then +# break +# fi +# latest_version_notes+="$line\n" +# done < "$wiki" # Extract the version number version_number="${latest_version_notes#*# RetroDECK }" # Remove text before "# RetroDECK " diff --git a/automation_tools/flatpak_build_bundle.sh b/automation_tools/flatpak_build_bundle.sh index 8e79186f..b242820b 100755 --- a/automation_tools/flatpak_build_bundle.sh +++ b/automation_tools/flatpak_build_bundle.sh @@ -3,9 +3,9 @@ # This is building the bundle RetroDECK.flatpak after the download and build steps are done if [ "${GITHUB_REF##*/}" = "main" ]; then - flatpak build-bundle "${GITHUB_WORKSPACE}/.local" "$GITHUB_WORKSPACE/RetroDECK.flatpak" net.retrodeck.retrodeck + flatpak build-bundle "${GITHUB_WORKSPACE}/retrodeck-repo" "$GITHUB_WORKSPACE/RetroDECK.flatpak" net.retrodeck.retrodeck sha256sum RetroDECK.flatpak > RetroDECK.flatpak.sha else - flatpak build-bundle "${GITHUB_WORKSPACE}/.local" "$GITHUB_WORKSPACE/RetroDECK-cooker.flatpak" net.retrodeck.retrodeck + flatpak build-bundle "${GITHUB_WORKSPACE}/retrodeck-repo" "$GITHUB_WORKSPACE/RetroDECK-cooker.flatpak" net.retrodeck.retrodeck sha256sum RetroDECK-cooker.flatpak > RetroDECK-cooker.flatpak.sha fi \ No newline at end of file diff --git a/automation_tools/flatpak_build_download_only.sh b/automation_tools/flatpak_build_download_only.sh index 8c779fbb..e8fca807 100755 --- a/automation_tools/flatpak_build_download_only.sh +++ b/automation_tools/flatpak_build_download_only.sh @@ -12,12 +12,12 @@ else FOLDER=retrodeck-flatpak-cooker fi -mkdir -vp "${GITHUB_WORKSPACE}"/{.local,retrodeck-flatpak-cooker} +mkdir -vp "${GITHUB_WORKSPACE}"/{retrodeck-repo,retrodeck-flatpak-cooker} flatpak-builder --user --force-clean \ --install-deps-from=flathub \ --install-deps-from=flathub-beta \ - --repo="${GITHUB_WORKSPACE}/.local" \ + --repo="${GITHUB_WORKSPACE}/retrodeck-repo" \ --download-only \ "${GITHUB_WORKSPACE}/${FOLDER}" \ net.retrodeck.retrodeck.yml diff --git a/automation_tools/flatpak_build_only.sh b/automation_tools/flatpak_build_only.sh index c7f84d82..25eb459c 100755 --- a/automation_tools/flatpak_build_only.sh +++ b/automation_tools/flatpak_build_only.sh @@ -12,13 +12,14 @@ else FOLDER=retrodeck-flatpak-cooker fi -mkdir -vp ${GITHUB_WORKSPACE}/.local +mkdir -vp ${GITHUB_WORKSPACE}/retrodeck-repo mkdir -vp ${GITHUB_WORKSPACE}/"$FOLDER" flatpak-builder --user --force-clean \ --install-deps-from=flathub \ --install-deps-from=flathub-beta \ - --repo=${GITHUB_WORKSPACE}/.local \ + --repo=${GITHUB_WORKSPACE}/retrodeck-repo \ --disable-download \ + $disable_rofiles_fuse \ "${GITHUB_WORKSPACE}/$FOLDER" \ net.retrodeck.retrodeck.yml \ No newline at end of file diff --git a/developer_toolbox/build_retrodeck_locally.sh b/developer_toolbox/build_retrodeck_locally.sh index 85b9e90e..027ee01e 100755 --- a/developer_toolbox/build_retrodeck_locally.sh +++ b/developer_toolbox/build_retrodeck_locally.sh @@ -5,6 +5,11 @@ git submodule update --init --recursive export GITHUB_WORKSPACE="." +export $disable_rofiles_fuse="--disable-rofiles-fuse" + +# Initialize the Flatpak repo +ostree init --mode=archive-z2 --repo=${GITHUB_WORKSPACE}/retrodeck-repo + cp net.retrodeck.retrodeck.appdata.xml net.retrodeck.retrodeck.appdata.xml.bak cp net.retrodeck.retrodeck.yml net.retrodeck.retrodeck.yml.bak