From 0571be6408016fc4e1850ed08d1a91698942962c Mon Sep 17 00:00:00 2001 From: Etaash Mathamsetty Date: Mon, 18 Nov 2024 20:24:20 -0500 Subject: [PATCH] some sideload fixes --- src/backend/storeManagers/sideload/games.ts | 6 ++++-- src/backend/storeManagers/storeManagerCommon/games.ts | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/backend/storeManagers/sideload/games.ts b/src/backend/storeManagers/sideload/games.ts index ca256f71d8..02f51cf815 100644 --- a/src/backend/storeManagers/sideload/games.ts +++ b/src/backend/storeManagers/sideload/games.ts @@ -23,6 +23,7 @@ import { notify } from '../../dialog/dialog' import { launchGame } from 'backend/storeManagers/storeManagerCommon/games' import { GOGCloudSavesLocation } from 'common/types/gog' import { InstallResult, RemoveArgs } from 'common/types/game_manager' +import { removeNonSteamGame } from 'backend/shortcuts/nonesteamgame/nonesteamgame' export function getGameInfo(appName: string): GameInfo { const store = libraryStore.get('games', []) @@ -127,7 +128,8 @@ export async function uninstall({ notify({ title, body: i18next.t('notify.uninstalled') }) - removeShortcutsUtil(gameInfo) + await removeShortcutsUtil(gameInfo) + await removeNonSteamGame({ gameInfo }) sendGameStatusUpdate({ appName, @@ -232,7 +234,7 @@ export async function install( args: InstallArgs ): Promise { logWarning( - `forceUninstall not implemented on Sideload Game Manager. called for appName = ${appName}` + `install not implemented on Sideload Game Manager. called for appName = ${appName}` ) return { status: 'error' } } diff --git a/src/backend/storeManagers/storeManagerCommon/games.ts b/src/backend/storeManagers/storeManagerCommon/games.ts index 43c84846e3..4dfad46a25 100644 --- a/src/backend/storeManagers/storeManagerCommon/games.ts +++ b/src/backend/storeManagers/storeManagerCommon/games.ts @@ -217,11 +217,15 @@ export async function launchGame( } const env = { - ...process.env, ...setupWrapperEnvVars({ appName, appRunner: runner }), ...setupEnvVars(gameSettings, gameInfo.install.install_path) } + if (wrappers.length > 0) { + extraArgs.unshift(...wrappers, executable) + executable = extraArgs.shift()! + } + await callRunner( extraArgs, {