summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDGdev91 <iperpido91@gmail.com>2025-01-28 12:51:05 +0100
committerDGdev91 <iperpido91@gmail.com>2025-01-28 12:51:05 +0100
commit09541fca5470d23bd393cfc0b52f254043eea8b1 (patch)
tree59870230a7c26f2300dbbe6f4ae32829903bbd64
parent709062d93cec154abed768a0dde1122bb4d79a6a (diff)
downloadDecky-Framegen-09541fca5470d23bd393cfc0b52f254043eea8b1.tar.gz
Decky-Framegen-09541fca5470d23bd393cfc0b52f254043eea8b1.zip
Modifed every reference to "/home/deck" to a generic home folder, should allow to run it on non-steamos linux distros
-rw-r--r--.vscode/defsettings.json2
-rw-r--r--assets/fgmod-remover.sh6
-rw-r--r--main.py10
-rwxr-xr-xsrc/index.tsx8
4 files changed, 13 insertions, 13 deletions
diff --git a/.vscode/defsettings.json b/.vscode/defsettings.json
index b758817..cb98a5f 100644
--- a/.vscode/defsettings.json
+++ b/.vscode/defsettings.json
@@ -4,7 +4,7 @@
"deckuser" : "deck",
"deckpass" : "gamer",
"deckkey" : "-i ${env:HOME}/.ssh/id_rsa",
- "deckdir" : "/home/deck",
+ "deckdir" : "${env:HOME}",
"pluginname": "Decky-Framegen",
"python.analysis.extraPaths": [
"./py_modules"
diff --git a/assets/fgmod-remover.sh b/assets/fgmod-remover.sh
index 32d4f71..1d12a18 100644
--- a/assets/fgmod-remover.sh
+++ b/assets/fgmod-remover.sh
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
-# Remove /home/deck/fgmod directory if it exists
-if [[ -d "/home/deck/fgmod" ]]; then
- rm -rf "/home/deck/fgmod"
+# Remove ~/fgmod directory if it exists
+if [[ -d "$HOME/fgmod" ]]; then
+ rm -rf "$HOME/fgmod"
fi
# Remove specific files from ~/Downloads if they exist
diff --git a/main.py b/main.py
index 66a81d0..3b05808 100644
--- a/main.py
+++ b/main.py
@@ -14,7 +14,7 @@ class Plugin:
async def run_uninstall_fgmod(self) -> dict:
try:
result = subprocess.run(
- ["/bin/bash", "/home/deck/homebrew/plugins/Decky-Framegen/assets/fgmod-remover.sh"],
+ ["/bin/bash", Path.home() / "homebrew" / "plugins" / "Decky-Framegen" / "assets" / "fgmod-remover.sh"],
capture_output=True,
text=True,
check=True
@@ -25,7 +25,7 @@ class Plugin:
async def run_install_fgmod(self) -> dict:
try:
- assets_dir = Path("/home/deck/homebrew/plugins/Decky-Framegen/assets")
+ assets_dir = Path.home() / "homebrew" / "plugins" / "Decky-Framegen" / "assets"
downloads_dir = Path.home() / "Downloads"
if not assets_dir.exists():
@@ -59,7 +59,7 @@ class Plugin:
timeout=300
)
- fgmod_path = Path("/home/deck/fgmod")
+ fgmod_path = Path.home() / "fgmod"
fgmod_path.mkdir(parents=True, exist_ok=True)
decky.logger.info(f"Script output:\n{process.stdout}")
@@ -97,7 +97,7 @@ class Plugin:
}
async def check_fgmod_path(self) -> dict:
- path = "/home/deck/fgmod/"
+ path = Path.home() / "fgmod"
required_files = [
"amd_fidelityfx_dx12.dll", "dlssg_to_fsr3_amd_is_better.dll", "libxess.dll",
"amd_fidelityfx_vk.dll", "dlssg_to_fsr3.ini", "licenses",
@@ -119,7 +119,7 @@ class Plugin:
# New method to list installed Steam games
async def list_installed_games(self) -> dict:
try:
- steam_root = "/home/deck/.steam/steam"
+ steam_root = Path.home() / ".steam" / "steam"
library_file = Path(steam_root) / "steamapps" / "libraryfolders.vdf"
if not library_file.exists():
diff --git a/src/index.tsx b/src/index.tsx
index 48dfc19..e444fbf 100755
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -171,7 +171,7 @@ function FGModInstallerSection() {
// if (mainRunningApp) {
// try {
// const currentOptions = await SteamClient.Apps.GetLaunchOptionsForApp(mainRunningApp.appid);
-// setIsPatched(currentOptions.includes('/home/deck/fgmod/fgmod %COMMAND%'));
+// setIsPatched(currentOptions.includes('~/fgmod/fgmod %COMMAND%'));
// } catch (error) {
// console.error('Error checking launch options:', error);
// }
@@ -191,7 +191,7 @@ function FGModInstallerSection() {
// await SteamClient.Apps.SetAppLaunchOptions(mainRunningApp.appid, '');
// setResult(`Launch options cleared successfully. Restart the game to restore DLSS default files`);
// } else {
-// await SteamClient.Apps.SetAppLaunchOptions(mainRunningApp.appid, '/home/deck/fgmod/fgmod %COMMAND%');
+// await SteamClient.Apps.SetAppLaunchOptions(mainRunningApp.appid, '~/fgmod/fgmod %COMMAND%');
// setResult(`Launch options set successfully, restart the game to use FSR upscaling and frame gen via DLSS options.`);
// }
// setIsPatched(!isPatched);
@@ -257,7 +257,7 @@ function InstalledGamesSection() {
const handlePatchClick = async (game: { appid: number; name: string }) => {
setClickedGame(game);
try {
- await SteamClient.Apps.SetAppLaunchOptions(game.appid, '/home/deck/fgmod/fgmod %COMMAND%');
+ await SteamClient.Apps.SetAppLaunchOptions(game.appid, '~/fgmod/fgmod %COMMAND%');
setResult(`Launch options set successfully for ${game.name}. You can now select DLSS in the game's menu to use FSR Upscaling and FrameGen equivalents.`);
} catch (error) {
if (error instanceof Error) {
@@ -271,7 +271,7 @@ function InstalledGamesSection() {
const handleUnpatchClick = async (game: { appid: number; name: string }) => {
setClickedGame(game);
try {
- await SteamClient.Apps.SetAppLaunchOptions(game.appid, '/home/deck/fgmod/fgmod-uninstaller.sh %COMMAND%');
+ await SteamClient.Apps.SetAppLaunchOptions(game.appid, '~/fgmod/fgmod-uninstaller.sh %COMMAND%');
setResult(`DLSS mods will uninstall on next launch of ${game.name}. The game is now unpatched.`);
} catch (error) {
if (error instanceof Error) {