Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions grout/component_functions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

# TODO

_prepare_component::grout() {
local action="$1"
shift

local component_config="$(get_own_component_path)/rd_config"

case "$action" in

reset)
log i "----------------------"
log i "Resetting Grout"
log i "----------------------"

create_dir "$XDG_CONFIG_HOME/grout"
;;

esac
}

_post_update::grout() {
local previous_version="$1"

}

_post_update_legacy::grout() {
# This function is to cover users upgrading from prior to 0.11.0, when per-component versioning was introduced. It can be removed once we are confident all users are running 0.11.0 or higher

local previous_version="$1"

if check_version_is_older_than "$previous_version" "0.10.0b"; then
# In version 0.10.0b, the following changes were made that required config file updates/reset or other changes to the filesystem:
# - Init GROUT as it is a new emulator

log i "0.10.0b Upgrade - Reset: GROUT"

prepare_component "reset" "grout"
fi
}
16 changes: 16 additions & 0 deletions grout/component_launcher.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

source /app/libexec/launcher_functions.sh

# Setting component name and path based on the directory name
component_name="$(basename "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")")"
component_path="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)"

export LD_LIBRARY_PATH="$component_path/lib:$rd_shared_libs/org.gnome.Platform/49/:${DEFAULT_LD_LIBRARY_PATH}"

# Set plugin paths

log i "RetroDECK is now launching $component_name"
log d "Library path is: $LD_LIBRARY_PATH"

exec "$component_path/Grout.sh" "$@"
20 changes: 20 additions & 0 deletions grout/component_manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"grout": {
"name": "GROUT",
"core_framework_compatibility": "1",
"component_version": "0.3",
"capabilities": ["reset","open"],
"url_rdwiki": "https://retrodeck.readthedocs.io/en/latest/wiki_tool_guides/grout/grout-guide/",
"url_webpage": "https://grout.romm.app",
"url_donation_purchase": "https://ko-fi.com/kwallbmoc",
"url_source": "https://github.com/rommapp/grout",
"description": "A RomM Client for your Linux retro handheld.",
"component_type": "Tool",
"system_friendly_name": "GROUT",
"backup_data": {
"core": [
{"path": "$XDG_CONFIG_HOME/grout"}
]
}
}
}
47 changes: 47 additions & 0 deletions grout/component_recipe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"grout": [
{
"source_url": "$REPO_ROOT/$COMPONENT_NAME/tmp_assets/Grout-RetroDECK.zip",
"source_type": "local",
"extraction_type": "archive",
"assets": [
{
"type": "create",
"dest": "component_version",
"contents": "$FRAMEWORK_DESIRED_VERSION"
},
{
"type": "file",
"source": "$REPO_ROOT/$COMPONENT_NAME/component_functions.sh",
"dest": "$COMPONENT_ARTIFACT_ROOT"
},
{
"type": "file",
"source": "$REPO_ROOT/$COMPONENT_NAME/component_launcher.sh",
"dest": "$COMPONENT_ARTIFACT_ROOT"
},
{
"type": "file",
"source": "$REPO_ROOT/$COMPONENT_NAME/component_manifest.json",
"dest": "$COMPONENT_ARTIFACT_ROOT"
},
{
"type": "file",
"source": "$REPO_ROOT/$COMPONENT_NAME/component_recipe.json",
"dest": "$COMPONENT_ARTIFACT_ROOT"
},
{
"type": "dir",
"source": "Grout",
"dest": "$COMPONENT_ARTIFACT_ROOT/Grout"
},
{
"type": "file",
"source": "Grout.sh",
"dest": "$COMPONENT_ARTIFACT_ROOT"
}
],
"libs": []
}
]
}
Binary file added grout/tmp_assets/Grout-RetroDECK.zip
Binary file not shown.