mirror of
https://github.com/xXJSONDeruloXx/Decky-Framegen.git
synced 2026-06-01 18:17:03 +02:00
Modifed every reference to "/home/deck" to a generic home folder, should allow to run it on non-steamos linux distros
This commit is contained in:
Vendored
+1
-1
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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():
|
||||
|
||||
+4
-4
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user