@@ -14,7 +14,6 @@ import {
14
14
changeGameInstallPath ,
15
15
installState ,
16
16
removeFromInstalledConfig ,
17
- fetchFuelJSON ,
18
17
getInstallMetadata
19
18
} from './library'
20
19
import {
@@ -24,7 +23,7 @@ import {
24
23
logInfo ,
25
24
logsDisabled
26
25
} from 'backend/logger/logger'
27
- import { gamesConfigPath , isLinux , isWindows } from 'backend/constants'
26
+ import { gamesConfigPath , isWindows } from 'backend/constants'
28
27
import { GameConfig } from 'backend/game_config'
29
28
import {
30
29
createAbortController ,
@@ -573,21 +572,9 @@ export async function forceUninstall(appName: string) {
573
572
}
574
573
575
574
export async function stop ( appName : string , stopWine ?: boolean ) {
576
- const pattern = isLinux ? appName : 'nile'
575
+ const pattern = process . platform === 'linux' ? appName : 'nile'
577
576
killPattern ( pattern )
578
- // Try to find the .exe name to stop the game, if running
579
- const fuel = fetchFuelJSON ( appName )
580
- if ( fuel ) {
581
- // Find the executable name in order to pkill it
582
- // Killing nile is not enough as it doesn't manage the games it launches
583
- const { Command : exeName } = fuel . Main
584
- // Remove `.exe` extension for Windows to be able to kill the process
585
- const processName =
586
- isWindows && exeName . endsWith ( '.exe' ) ? exeName . slice ( 0 , - 4 ) : exeName
587
- killPattern ( processName )
588
- } else {
589
- logError ( [ 'Could not fetch `fuel.json` for' , appName ] , LogPrefix . Nile )
590
- }
577
+
591
578
if ( stopWine && ! isNative ( ) ) {
592
579
const gameSettings = await getSettings ( appName )
593
580
await shutdownWine ( gameSettings )
0 commit comments