Skip to content

Commit 0f6d011

Browse files
committed
[Fix] Setup GOG games with Proton + ScummVM patch (#1472)
* [Fix] ScummVM windows games on linux * fix: setup gog games with proton
1 parent 7a6733d commit 0f6d011

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

electron/gog/setup.ts

+10-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { copySync } from 'fs-extra'
1010
import path from 'node:path'
1111
import { GOGLibrary } from './library'
1212
import { GameInfo, InstalledInfo } from '../types'
13-
import { execAsync, isOnline } from '../utils'
13+
import { execAsync, isOnline, quoteIfNecessary } from '../utils'
1414
import { GameConfig } from '../game_config'
1515
import { logError, logInfo, LogPrefix, logWarning } from '../logger/logger'
1616
import { userHome, isWindows, steamCompatFolder } from '../constants'
@@ -60,13 +60,13 @@ async function setup(
6060

6161
const commandPrefix = isWindows
6262
? ''
63-
: `${isCrossover ? crossoverEnv : prefix} ${gameSettings.wineVersion.bin} ${
64-
isProton ? 'runinprefix' : ''
65-
}`
63+
: `${isCrossover ? crossoverEnv : prefix} ${quoteIfNecessary(
64+
gameSettings.wineVersion.bin
65+
)} ${isProton ? 'runinprefix' : ''}`
6666
// Make sure Proton initialized prefix correctly
6767
if (isProton) {
6868
await execAsync(
69-
`${prefix} ${gameSettings.wineVersion.bin} run reg /?` // This is a help command for reg, it's enough to initialize a prefix
69+
`${prefix} ${quoteIfNecessary(gameSettings.wineVersion.bin)} run reg /?` // This is a help command for reg, it's enough to initialize a prefix
7070
).catch()
7171
}
7272
// Funny part begins here
@@ -234,9 +234,12 @@ async function setup(
234234
}
235235
case 'setIni': {
236236
const filePath = handlePathVars(
237-
actionArguments?.filename,
237+
actionArguments?.filename?.replace(
238+
'{app}',
239+
gameInfo.install.install_path
240+
),
238241
pathsValues
239-
)
242+
).replaceAll('\\', '/')
240243
if (!filePath || !existsSync(filePath)) {
241244
logError("Setup: setIni file doesn't exists", LogPrefix.Gog)
242245
break

0 commit comments

Comments
 (0)