This commit is contained in:
Rekku 2024-09-19 16:21:48 +01:00
commit fc0fd76b9d
8 changed files with 16811 additions and 8 deletions

View file

@ -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"
}
}
}

View file

@ -0,0 +1,36 @@
#!/bin/bash
# List of branches to pull and merge
branches=(
"cooker"
"feat/shadps4"
"feat/PortMaster"
"feat/steam-rom-manager"
)
# Get the current branch name
current_branch=$(git branch --show-current)
# Check if the current branch contains 'feat/' and 'okonomiyaki'
if [[ $current_branch == feat/* && $current_branch == *okonomiyaki* ]]; then
echo "Current branch is $current_branch, proceeding with fetch, pull, and merge."
# Iterate through the list of branches
for branch in "${branches[@]}"; do
echo "Fetching $branch..."
git fetch origin $branch
echo "Pulling $branch..."
git pull origin $branch
echo "Merging $branch into $current_branch..."
if ! git merge origin/$branch; then
echo "Merge conflict detected while merging $branch!"
echo "Please resolve the conflict, then run 'git merge --continue' to finish the merge."
exit 1 # Exit the script due to conflict
fi
done
else
echo "Current branch is not an okonomiyaki branch, quitting."
exit 1
fi

View file

@ -775,6 +775,15 @@ ponzu_remove() {
}
release_selector() {
# Show a progress bar
(
while true; do
echo "# Fetching all available releases from GitHub repositories... Please wait. This may take some time." ; sleep 1
done
) | zenity --progress --title="Fetching Releases" --text="Fetching releases..." --pulsate --no-cancel --auto-close --width=500 --height=150 &
progress_pid=$! # save process PID to kill it later
log d "Fetching releases from GitHub API for repository $cooker_repository_name"
# Fetch the main release from the RetroDECK repository
@ -783,6 +792,7 @@ release_selector() {
if [[ -z "$main_release" ]]; then
log e "Failed to fetch the main release"
kill $progress_pid # kill the progress bar
configurator_generic_dialog "Error" "Unable to fetch the main release. Please check your network connection or try again later."
return 1
fi
@ -796,11 +806,12 @@ release_selector() {
# Add the main release as the first entry in the release array
local release_array=("Main Release" "$main_tag_name" "$main_human_readable_date")
# Fetch all releases from the Cooker repository
local releases=$(curl -s https://api.github.com/repos/$git_organization_name/$cooker_repository_name/releases)
# Fetch all releases (including draft and pre-release) from the Cooker repository
local releases=$(curl -s https://api.github.com/repos/$git_organization_name/$cooker_repository_name/releases?per_page=100)
if [[ -z "$releases" ]]; then
log e "Failed to fetch releases or no releases available"
kill $progress_pid # kill the progress bar
configurator_generic_dialog "Error" "Unable to fetch releases. Please check your network connection or try again later."
return 1
fi
@ -809,15 +820,37 @@ release_selector() {
while IFS= read -r release; do
tag_name=$(echo "$release" | jq -r '.tag_name')
published_at=$(echo "$release" | jq -r '.published_at')
draft=$(echo "$release" | jq -r '.draft')
prerelease=$(echo "$release" | jq -r '.prerelease')
# Convert published_at to human-readable format
# Classifying releases
if echo "$tag_name" | grep -q "PR"; then
status="Pull Request"
elif [[ "$draft" == "true" ]]; then
status="Draft"
elif [[ "$prerelease" == "true" ]]; then
status="Pre-release"
elif [[ "$cooker_repository_name" == *"Cooker"* ]]; then
status="Cooker"
else
status="Main"
fi
# Convert published_at to human-readable format, if available
if [[ "$published_at" != "null" ]]; then
human_readable_date=$(date -d "$published_at" +"%d %B %Y %H:%M")
else
human_readable_date="Not published"
fi
# Ensure fields are properly aligned for Zenity
release_array+=("Cooker Channel" "$tag_name" "$human_readable_date")
release_array+=("$status" "$tag_name" "$human_readable_date")
done < <(echo "$releases" | jq -c '.[]' | sort -t: -k3,3r)
# kill the progress bar before opening the release list window
kill $progress_pid
if [[ ${#release_array[@]} -eq 0 ]]; then
configurator_generic_dialog "RetroDECK Updater" "No available releases found, exiting."
log d "No available releases found"

View file

@ -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

View file

@ -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 "----------------------"

View file

@ -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'"}"

View file

@ -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
@ -553,6 +580,7 @@ modules:
- cp -r files/* "${FLATPAK_DEST}"
- chmod +x "${FLATPAK_DEST}/bin/"*
sources:
# Testing the new feat/update-3.1.0
- type: archive
url: https://github.com/RetroDECK/ES-DE/releases/latest/download/RetroDECK-ES-DE-Artifact.tar.gz
sha256: RETRODECKESDELATEST

File diff suppressed because it is too large Load diff