From 794c576771f19607ff189681cf4a68215e179df9 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 18 Sep 2024 09:25:38 +0900 Subject: [PATCH 1/5] feat/port master (#914) * PORTMASTER: adding POC of manifest and reset function * PORTMASTER: init * PORTMASTER: adding a wrapper to manage the script to being out of the bin folder later * MANIFEST: empty lines cleanup [skip ci] * PORTMASTER: fixing PortMaster wrapper name * WORKFLOW: tentative solution for PRs - try#6 [skip ci] * WORKFLOW: tentative solution for PRs - try#7 [skip ci] * PORTMASTER: fixing PortMaster wrapper path * PORTMASTER: fixing PortMaster wrapper install * PORTMASTER: updated to latest retrodeck build * Code format * PORT_MASTER: fixed paths and commands + added harbourmaster --- .../retrodeck/reference_lists/features.json | 9 +++++++ functions/post_update.sh | 3 +++ functions/prepare_component.sh | 15 +++++++++++ net.retrodeck.retrodeck.yml | 27 +++++++++++++++++++ 4 files changed, 54 insertions(+) diff --git a/config/retrodeck/reference_lists/features.json b/config/retrodeck/reference_lists/features.json index 977383b3..6da76574 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" }, @@ -1124,6 +1127,12 @@ "name": "ES-DE", "url": "https://retrodeck.readthedocs.io/en/latest/wiki_es_de/esde-guide/.", "launch": "es-de" + }, + "portmaster": { + "description": "PortMaster", + "name": "PortMaster", + "system": "portmaster", + "launch": "PortMaster" } } } diff --git a/functions/post_update.sh b/functions/post_update.sh index d7176aec..97669f78 100644 --- a/functions/post_update.sh +++ b/functions/post_update.sh @@ -433,6 +433,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" prepare_component "reset" "ruffle" update_rd_conf diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index ac3e47b9..03765a58 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -857,6 +857,21 @@ 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" + unzip "/app/retrodeck/PortMaster.zip" -d "/var/data/" + cp -f "/var/data/PortMaster/retrodeck/PortMaster.txt" "/var/data/PortMaster/PortMaster.sh" + chmod +x "/var/data/PortMaster/PortMaster.sh" + rm -f "$roms_folder/portmaster/PortMaster.sh" + install -Dm755 "/var/data/PortMaster/PortMaster.sh" "$roms_folder/portmaster/PortMaster.sh" + fi + if [[ "$component" =~ ^(ruffle|all)$ ]]; then component_found="true" log i "----------------------" diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 68738487..f44d97aa 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -542,6 +542,33 @@ 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/" + - install -Dm755 "PortMaster" "${FLATPAK_DEST}/bin/PortMaster" + - install -Dm755 "harbourmaster" "${FLATPAK_DEST}/bin/harbourmaster" + - cp PortMaster.zip "${FLATPAK_DEST}/retrodeck/PortMaster.zip" + sources: + - type: file + url: https://github.com/PortsMaster/PortMaster-GUI/releases/download/2024.09.13-1455/retrodeck.portmaster.zip + sha256: 4fe3ce3ffdc1d66fe235c8a1a6062a86aa06ee615dba1fe5fc6e9bdd75e9d39c + dest-filename: PortMaster.zip + - type: script + commands: + - | + #!/bin/bash + "/var/data/PortMaster/PortMaster.sh" "$@" + dest-filename: PortMaster + - type: script + commands: + - | + #!/bin/bash + "/var/data/PortMaster/harbourmaster" "$@" + dest-filename: harbourmaster + # ES-DE - name: ES-DE From 59cdee5e8701f9cfb8dd5c7f6bb9e5945985ccde Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 18 Sep 2024 09:27:10 +0900 Subject: [PATCH 2/5] ES-DE: restored latest build after merges --- net.retrodeck.retrodeck.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index f44d97aa..0a79370a 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -582,10 +582,8 @@ modules: sources: # Testing the new feat/update-3.1.0 - type: archive - url: https://github.com/RetroDECK/ES-DE/releases/download/feat%2Fupdate-3.1.0-170924.19/RetroDECK-ES-DE-Artifact.tar.gz - sha256: 047198f98d4c57fefb19bda059ec059ea2fb9691519952b86b744d21b57a00ff - #url: https://github.com/RetroDECK/ES-DE/releases/latest/download/RetroDECK-ES-DE-Artifact.tar.gz - #sha256: RETRODECKESDELATEST + url: https://github.com/RetroDECK/ES-DE/releases/latest/download/RetroDECK-ES-DE-Artifact.tar.gz + sha256: RETRODECKESDELATEST - name: retrodeck-theme buildsystem: simple From 5e160325ab69db8dd234248898d2d1e4d0b1bb86 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 18 Sep 2024 15:35:56 +0900 Subject: [PATCH 3/5] RUN_GAME: escaping ' --- functions/run_game.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/run_game.sh b/functions/run_game.sh index 8f084a05..27315fea 100755 --- a/functions/run_game.sh +++ b/functions/run_game.sh @@ -168,6 +168,7 @@ find_system_commands() { substitute_placeholders() { local cmd="$1" log d "Substitute placeholder: working on $cmd" + game=$(echo "$game" | sed "s/'/'\\\\''/g") # escaping internal ' local rom_path="$game" local rom_dir=$(dirname "$rom_path") @@ -193,6 +194,8 @@ substitute_placeholders() { cmd="${cmd//"%FILENAME%"/"'$file_name'"}" cmd="${cmd//"%ROMRAW%"/"'$rom_raw'"}" cmd="${cmd//"%ROMPATH%"/"'$rom_dir'"}" + cmd="${cmd//"%ENABLESHORTCUTS%"/""}" + cmd="${cmd//"%EMULATOR_OS-SHELL%"/"/bin/sh"}" # Ensure paths are quoted correctly cmd="${cmd//"%ROM%"/"'$rom_path'"}" From c1423d62b76143b7f3a69fcf5e4c89a411aebafc Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sat, 21 Sep 2024 00:12:15 +0900 Subject: [PATCH 4/5] PORTMASTER: moving it to rolling release --- automation_tools/automation_task_list.cfg | 1 + net.retrodeck.retrodeck.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/automation_tools/automation_task_list.cfg b/automation_tools/automation_task_list.cfg index 979b5998..94013b2d 100644 --- a/automation_tools/automation_task_list.cfg +++ b/automation_tools/automation_task_list.cfg @@ -24,3 +24,4 @@ hash^RETRODECKMELONDSLATEST^https://github.com/RetroDECK/net.kuribo64.melonDS/re hash^RETRODECKSOLARUSLATEST^https://github.com/RetroDECK/org.solarus_games.solarus.Launcher/releases/latest/download/RetroDECK-solarus-Artifact.tar.gz hash^RETRODECKGZDOOMLATEST^https://github.com/RetroDECK/org.zdoom.GZDoom/releases/latest/download/RetroDECK-gzdoom-Artifact.tar.gz hash^RETRODECKMAMELATEST^https://github.com/RetroDECK/MAME/releases/latest/download/RetroDECK-MAME-Artifact.tar.gz +hash^PORTMASTERLATESTSHA^https://github.com/PortsMaster/PortMaster-GUI/releases/latest/download/retrodeck.portmaster.zip \ No newline at end of file diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 0a79370a..4bef5bd5 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -553,8 +553,8 @@ modules: - cp PortMaster.zip "${FLATPAK_DEST}/retrodeck/PortMaster.zip" sources: - type: file - url: https://github.com/PortsMaster/PortMaster-GUI/releases/download/2024.09.13-1455/retrodeck.portmaster.zip - sha256: 4fe3ce3ffdc1d66fe235c8a1a6062a86aa06ee615dba1fe5fc6e9bdd75e9d39c + url: https://github.com/PortsMaster/PortMaster-GUI/releases/latest/download/retrodeck.portmaster.zip + sha256: PORTMASTERLATESTSHA dest-filename: PortMaster.zip - type: script commands: From ce93560723f5bea1ec20c95171a81f40e3c4ecf3 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Mon, 23 Sep 2024 21:39:42 +0900 Subject: [PATCH 5/5] ES-DE: triggering build for tentive fixing version label