summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdefaults/assets/fgmod-uninstaller.sh35
-rwxr-xr-xdefaults/assets/fgmod.sh35
-rw-r--r--package.json2
3 files changed, 71 insertions, 1 deletions
diff --git a/defaults/assets/fgmod-uninstaller.sh b/defaults/assets/fgmod-uninstaller.sh
index 07e598c..1b2b854 100755
--- a/defaults/assets/fgmod-uninstaller.sh
+++ b/defaults/assets/fgmod-uninstaller.sh
@@ -43,6 +43,41 @@ else
done
fi
+for arg in "$@"; do
+ if [[ "$arg" == lutris:rungameid/* ]]; then
+ lutris_id="${arg#lutris:rungameid/}"
+
+ # Get slug from Lutris JSON
+ slug=$(lutris --list-games --json 2>/dev/null | jq -r ".[] | select(.id == $lutris_id) | .slug")
+
+ if [[ -z "$slug" || "$slug" == "null" ]]; then
+ echo "Could not find slug for Lutris ID $lutris_id"
+ break
+ fi
+
+ # Find matching YAML file using slug
+ config_file=$(find ~/.config/lutris/games/ -iname "${slug}-*.yml" | head -1)
+
+ if [[ -z "$config_file" ]]; then
+ echo "No config file found for slug '$slug'"
+ break
+ fi
+
+ # Extract executable path from YAML
+ exe_path=$(grep -E '^\s*exe:' "$config_file" | sed 's/.*exe:[[:space:]]*//')
+
+ if [[ -n "$exe_path" ]]; then
+ exe_folder_path=$(dirname "$exe_path")
+ echo "Resolved executable path: $exe_path"
+ echo "Executable folder: $exe_folder_path"
+ else
+ echo "Executable path not found in $config_file"
+ fi
+
+ break
+ fi
+done
+
# Fallback to STEAM_COMPAT_INSTALL_PATH when no path was found
[[ -z "$exe_folder_path" && -n "$STEAM_COMPAT_INSTALL_PATH" ]] && exe_folder_path="$STEAM_COMPAT_INSTALL_PATH"
diff --git a/defaults/assets/fgmod.sh b/defaults/assets/fgmod.sh
index 59563ed..f61a70a 100755
--- a/defaults/assets/fgmod.sh
+++ b/defaults/assets/fgmod.sh
@@ -46,6 +46,41 @@ else
done
fi
+for arg in "$@"; do
+ if [[ "$arg" == lutris:rungameid/* ]]; then
+ lutris_id="${arg#lutris:rungameid/}"
+
+ # Get slug from Lutris JSON
+ slug=$(lutris --list-games --json 2>/dev/null | jq -r ".[] | select(.id == $lutris_id) | .slug")
+
+ if [[ -z "$slug" || "$slug" == "null" ]]; then
+ echo "Could not find slug for Lutris ID $lutris_id"
+ break
+ fi
+
+ # Find matching YAML file using slug
+ config_file=$(find ~/.config/lutris/games/ -iname "${slug}-*.yml" | head -1)
+
+ if [[ -z "$config_file" ]]; then
+ echo "No config file found for slug '$slug'"
+ break
+ fi
+
+ # Extract executable path from YAML
+ exe_path=$(grep -E '^\s*exe:' "$config_file" | sed 's/.*exe:[[:space:]]*//')
+
+ if [[ -n "$exe_path" ]]; then
+ exe_folder_path=$(dirname "$exe_path")
+ echo "Resolved executable path: $exe_path"
+ echo "Executable folder: $exe_folder_path"
+ else
+ echo "Executable path not found in $config_file"
+ fi
+
+ break
+ fi
+done
+
[[ -z "$exe_folder_path" && -n "$STEAM_COMPAT_INSTALL_PATH" ]] && exe_folder_path="$STEAM_COMPAT_INSTALL_PATH"
if [[ -d "$exe_folder_path/Engine" ]]; then
diff --git a/package.json b/package.json
index 13d612a..0476dc9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "decky-framegen",
- "version": "0.12.1",
+ "version": "0.12.2",
"description": "This plugin installs and manages OptiScaler, a tool that enhances upscaling and enables frame generation in a range of DirectX 12 games.",
"type": "module",
"scripts": {