From 36b738e9f285e8ed6899d9c87fd5ebe1c11fadcb Mon Sep 17 00:00:00 2001 From: XargonWan Date: Thu, 22 Aug 2024 13:58:19 +0900 Subject: [PATCH 01/11] PORTMASTER: adding POC of manifest and reset function --- functions/prepare_component.sh | 12 ++++++++++++ net.retrodeck.retrodeck.yml | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index 137a5bbe..ffe6ab18 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -857,6 +857,18 @@ prepare_component() { sed -i 's#RETRODECKSAVESDIR#'$saves_folder'#g' "/var/config/gzdoom/gzdoom.ini" # This is an unfortunate one-off because set_setting_value does not currently support JSON fi + if [[ "$component" =~ ^(portmaster|all)$ ]]; then + component_found="true" + # TODO: MultiUser + log i "----------------------" + log i "Prepearing PortMaster" + log i "----------------------" + + rm -rf "/var/data/PortMaster" + create_dir "/var/data/PortMaster" + cp "$config/PortMaster/control.txt" "/var/data/PortMaster/" + fi + if [[ $component_found == "false" ]]; then log e "Supplied component $component not found, not resetting" fi diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index b095d7e1..ccffe172 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -524,6 +524,19 @@ modules: url: https://github.com/RetroDECK/MAME/releases/latest/download/RetroDECK-MAME-Artifact.tar.gz sha256: RETRODECKMAMELATEST + # PortMaster + + - name: PortMaster + buildsystem: simple + build-commands: + - mkdir -p "${FLATPAK_DEST}/retrodeck/PortMaster/" + - cp control.txt "${FLATPAK_DEST}/retrodeck/PortMaster/" + - install -Dm755 PortMaster.sh "${FLATPAK_DEST}/bin/" + sources: + - type: archive + url: + sha256: + # ES-DE - name: ES-DE From 9adf08a5920c45d68adecc095a88a757574d5268 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sat, 24 Aug 2024 21:46:20 +0900 Subject: [PATCH 02/11] PORTMASTER: init --- config/retrodeck/reference_lists/features.json | 9 +++++++++ functions/post_update.sh | 3 +++ functions/prepare_component.sh | 5 +++-- net.retrodeck.retrodeck.yml | 11 ++++++----- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/config/retrodeck/reference_lists/features.json b/config/retrodeck/reference_lists/features.json index c9fe9122..32e5cd1b 100644 --- a/config/retrodeck/reference_lists/features.json +++ b/config/retrodeck/reference_lists/features.json @@ -620,6 +620,9 @@ "pokemini": { "name": "Nintendo Pokémon Mini" }, + "portmaster": { + "name": "PortMaster" + }, "ports": { "name": "Ports" }, @@ -1094,6 +1097,12 @@ "name": "xemu", "system": "xbox", "launch": "xemu" + }, + "portmaster": { + "description": "PortMaster", + "name": "PortMaster", + "system": "portmaster", + "launch": "PortMaster" } } } diff --git a/functions/post_update.sh b/functions/post_update.sh index 146a8d10..ca17aab5 100644 --- a/functions/post_update.sh +++ b/functions/post_update.sh @@ -378,6 +378,9 @@ post_update() { # Placeholder for version 0.9.0b set_setting_value "$raconf" "libretro_info_path" "/var/config/retroarch/cores" "retroarch" + # TODO: Configurator dialog: Hey, we need to reset ES-DE! (because again ES-DE folders, new theme and such) + prepare_component "reset" "es-de" + prepare_component "reset" "portmaster" # TODO: check this # rm /var/config/emulationstation/.emulationstation # remving the old symlink to .emulationstation as it might be not needed anymore diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index ffe6ab18..7f3a31b5 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -865,8 +865,9 @@ prepare_component() { log i "----------------------" rm -rf "/var/data/PortMaster" - create_dir "/var/data/PortMaster" - cp "$config/PortMaster/control.txt" "/var/data/PortMaster/" + unzip "/app/retrodeck/PortMaster.zip" -d "/var/data/" + chmod +x "/var/data/PortMaster/PortMaster.sh" + ln -s "/app/bin/PortMaster" "$roms_folder/portmaster/PortMaster.sh" fi if [[ $component_found == "false" ]]; then diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index ccffe172..5f75fc86 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -530,12 +530,13 @@ modules: buildsystem: simple build-commands: - mkdir -p "${FLATPAK_DEST}/retrodeck/PortMaster/" - - cp control.txt "${FLATPAK_DEST}/retrodeck/PortMaster/" - - install -Dm755 PortMaster.sh "${FLATPAK_DEST}/bin/" + - cp retrodeck.portmaster.zip "${FLATPAK_DEST}/retrodeck/PortMaster.zip" + - ln -s "/var/data/PortMaster/PortMaster.sh" "${FLATPAK_DEST}/bin/PortMaster" + - chmod +x ${FLATPAK_DEST}/PortMaster sources: - - type: archive - url: - sha256: + - type: file + url: https://github.com/PortsMaster/PortMaster-GUI/releases/download/2024.08.24-1111/retrodeck.portmaster.zip + sha256: 20a78192995a55ffdfdf4cd9343897c6d1ef50351a8800d188e084f90a847726 # ES-DE From 4008fe25125758d7da483d77d4ff51455498e249 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 09:14:54 +0900 Subject: [PATCH 03/11] PORTMASTER: adding a wrapper to manage the script to being out of the bin folder later --- net.retrodeck.retrodeck.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index b7469051..dcf6916f 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -531,12 +531,19 @@ modules: build-commands: - mkdir -p "${FLATPAK_DEST}/retrodeck/PortMaster/" - cp retrodeck.portmaster.zip "${FLATPAK_DEST}/retrodeck/PortMaster.zip" - - ln -s "/var/data/PortMaster/PortMaster.sh" "${FLATPAK_DEST}/bin/PortMaster" + - cp "PortMaster.sh" "${FLATPAK_DEST}/bin/PortMaster" - chmod +x ${FLATPAK_DEST}/PortMaster sources: - type: file url: https://github.com/PortsMaster/PortMaster-GUI/releases/download/2024.08.24-1111/retrodeck.portmaster.zip sha256: 20a78192995a55ffdfdf4cd9343897c6d1ef50351a8800d188e084f90a847726 + - type: script + commands: + - | + #!/bin/bash + "/var/data/PortMaster/PortMaster.sh" "$@" + dest-filename: PortMaster.sh + # ES-DE From 852f27cb61721995b9d0e1984329d4010c69e0ee Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 09:31:54 +0900 Subject: [PATCH 04/11] MANIFEST: empty lines cleanup [skip ci] --- net.retrodeck.retrodeck.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index dcf6916f..328024bf 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -542,8 +542,7 @@ modules: - | #!/bin/bash "/var/data/PortMaster/PortMaster.sh" "$@" - dest-filename: PortMaster.sh - + dest-filename: PortMaster.sh # ES-DE From d83371690401d588b68546dee7cfe2608d2a7070 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 14:53:25 +0900 Subject: [PATCH 05/11] PORTMASTER: fixing PortMaster wrapper name --- net.retrodeck.retrodeck.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 328024bf..8640c156 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -531,7 +531,7 @@ modules: build-commands: - mkdir -p "${FLATPAK_DEST}/retrodeck/PortMaster/" - cp retrodeck.portmaster.zip "${FLATPAK_DEST}/retrodeck/PortMaster.zip" - - cp "PortMaster.sh" "${FLATPAK_DEST}/bin/PortMaster" + - cp "PortMaster" "${FLATPAK_DEST}/bin/PortMaster" - chmod +x ${FLATPAK_DEST}/PortMaster sources: - type: file @@ -542,7 +542,7 @@ modules: - | #!/bin/bash "/var/data/PortMaster/PortMaster.sh" "$@" - dest-filename: PortMaster.sh + dest-filename: PortMaster # ES-DE From 42810c733e27041d3388d34e32086d39a3b87f12 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 20:19:07 +0900 Subject: [PATCH 06/11] WORKFLOW: tentative solution for PRs - try#6 [skip ci] --- .github/workflows/cooker-selfhosted.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index cc3e7a64..1b1ac7ba 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -15,7 +15,6 @@ on: - '*.sh' - 'net.retrodeck.retrodeck.yml' - 'net.retrodeck.retrodeck.appdata.xml' - pull_request_target: pull_request: # Italy (CET): 11:00 PM From 3f063f693a8bf682f0a667d27655a5113c96064e Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 20:44:23 +0900 Subject: [PATCH 07/11] WORKFLOW: tentative solution for PRs - try#7 [skip ci] --- .github/workflows/cooker-selfhosted.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index 1b1ac7ba..70f2af7a 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -54,7 +54,6 @@ jobs: with: fetch-depth: 0 submodules: 'true' - ref: ${{ github.sha }} - name: "Install dependencies" run: "automation_tools/install_dependencies.sh" From 0e14c772607856bf95957830e7cf4dbf3d9766d9 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 21:23:32 +0900 Subject: [PATCH 08/11] PORTMASTER: fixing PortMaster wrapper path --- net.retrodeck.retrodeck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 8640c156..13bebd6c 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -531,7 +531,7 @@ modules: build-commands: - mkdir -p "${FLATPAK_DEST}/retrodeck/PortMaster/" - cp retrodeck.portmaster.zip "${FLATPAK_DEST}/retrodeck/PortMaster.zip" - - cp "PortMaster" "${FLATPAK_DEST}/bin/PortMaster" + - cp "PortMaster" "${FLATPAK_DEST}/bin/" - chmod +x ${FLATPAK_DEST}/PortMaster sources: - type: file From 840344217f84dae178b639cb58306f156f0bf86f Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 25 Aug 2024 22:11:48 +0900 Subject: [PATCH 09/11] PORTMASTER: fixing PortMaster wrapper install --- net.retrodeck.retrodeck.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 13bebd6c..662961e1 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -531,8 +531,8 @@ modules: build-commands: - mkdir -p "${FLATPAK_DEST}/retrodeck/PortMaster/" - cp retrodeck.portmaster.zip "${FLATPAK_DEST}/retrodeck/PortMaster.zip" - - cp "PortMaster" "${FLATPAK_DEST}/bin/" - - chmod +x ${FLATPAK_DEST}/PortMaster + - install -Dm755 "PortMaster" "${FLATPAK_DEST}/bin/PortMaster" + - ls -lah "${FLATPAK_DEST}/bin" sources: - type: file url: https://github.com/PortsMaster/PortMaster-GUI/releases/download/2024.08.24-1111/retrodeck.portmaster.zip From 08cc0c81a5b476b38c74b666f83971ed4eb6dc62 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 15 Sep 2024 09:52:02 +0900 Subject: [PATCH 10/11] PORTMASTER: updated to latest retrodeck build --- net.retrodeck.retrodeck.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 662961e1..b8242b12 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -535,8 +535,8 @@ modules: - ls -lah "${FLATPAK_DEST}/bin" sources: - type: file - url: https://github.com/PortsMaster/PortMaster-GUI/releases/download/2024.08.24-1111/retrodeck.portmaster.zip - sha256: 20a78192995a55ffdfdf4cd9343897c6d1ef50351a8800d188e084f90a847726 + url: https://github.com/PortsMaster/PortMaster-GUI/releases/download/2024.09.13-1455/retrodeck.portmaster.zip + sha256: 4fe3ce3ffdc1d66fe235c8a1a6062a86aa06ee615dba1fe5fc6e9bdd75e9d39c - type: script commands: - | From df02a6ed0067a392067d7a042487b2118f026745 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 15 Sep 2024 09:53:35 +0900 Subject: [PATCH 11/11] Code format --- config/retrodeck/reference_lists/features.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/retrodeck/reference_lists/features.json b/config/retrodeck/reference_lists/features.json index 454ffa8e..6da76574 100644 --- a/config/retrodeck/reference_lists/features.json +++ b/config/retrodeck/reference_lists/features.json @@ -621,7 +621,7 @@ "name": "Nintendo Pokémon Mini" }, "portmaster": { - "name": "PortMaster" + "name": "PortMaster" }, "ports": { "name": "Ports" @@ -1129,10 +1129,10 @@ "launch": "es-de" }, "portmaster": { - "description": "PortMaster", - "name": "PortMaster", - "system": "portmaster", - "launch": "PortMaster" + "description": "PortMaster", + "name": "PortMaster", + "system": "portmaster", + "launch": "PortMaster" } } }