@@ -10,7 +10,7 @@ import { copySync } from 'fs-extra'
10
10
import path from 'node:path'
11
11
import { GOGLibrary } from './library'
12
12
import { GameInfo , InstalledInfo } from '../types'
13
- import { execAsync , isOnline } from '../utils'
13
+ import { execAsync , isOnline , quoteIfNecessary } from '../utils'
14
14
import { GameConfig } from '../game_config'
15
15
import { logError , logInfo , LogPrefix , logWarning } from '../logger/logger'
16
16
import { userHome , isWindows , steamCompatFolder } from '../constants'
@@ -60,13 +60,13 @@ async function setup(
60
60
61
61
const commandPrefix = isWindows
62
62
? ''
63
- : `${ isCrossover ? crossoverEnv : prefix } ${ gameSettings . wineVersion . bin } ${
64
- isProton ? 'runinprefix' : ''
65
- } `
63
+ : `${ isCrossover ? crossoverEnv : prefix } ${ quoteIfNecessary (
64
+ gameSettings . wineVersion . bin
65
+ ) } ${ isProton ? 'runinprefix' : '' } `
66
66
// Make sure Proton initialized prefix correctly
67
67
if ( isProton ) {
68
68
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
70
70
) . catch ( )
71
71
}
72
72
// Funny part begins here
@@ -234,9 +234,12 @@ async function setup(
234
234
}
235
235
case 'setIni' : {
236
236
const filePath = handlePathVars (
237
- actionArguments ?. filename ,
237
+ actionArguments ?. filename ?. replace (
238
+ '{app}' ,
239
+ gameInfo . install . install_path
240
+ ) ,
238
241
pathsValues
239
- )
242
+ ) . replaceAll ( '\\' , '/' )
240
243
if ( ! filePath || ! existsSync ( filePath ) ) {
241
244
logError ( "Setup: setIni file doesn't exists" , LogPrefix . Gog )
242
245
break
0 commit comments