Skip to content

Commit

Permalink
Fixes related to "Installing Prerequisites" status (#3393)
Browse files Browse the repository at this point in the history
  • Loading branch information
arielj authored Jan 6, 2024
1 parent 16bb04f commit d5d1482
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
9 changes: 1 addition & 8 deletions src/backend/storeManagers/gog/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ import {
import { copySync } from 'fs-extra'
import path from 'node:path'
import { GameInfo, InstalledInfo } from 'common/types'
import {
checkWineBeforeLaunch,
getShellPath,
sendGameStatusUpdate,
spawnAsync
} from '../../utils'
import { checkWineBeforeLaunch, getShellPath, spawnAsync } from '../../utils'
import { GameConfig } from '../../game_config'
import { logError, logInfo, LogPrefix, logWarning } from '../../logger/logger'
import { isWindows } from '../../constants'
Expand Down Expand Up @@ -52,8 +47,6 @@ async function setup(
LogPrefix.Gog
)

sendGameStatusUpdate({ appName, runner: 'gog', status: 'prerequisites' })

const gameSettings = GameConfig.get(appName).config
if (!isWindows) {
const isWineOkToLaunch = await checkWineBeforeLaunch(appName, gameSettings)
Expand Down
4 changes: 3 additions & 1 deletion src/backend/storeManagers/nile/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export default async function setup(
'Running setup instructions, if you notice issues with launching a game, please report it on our Discord server',
LogPrefix.Nile
)
sendGameStatusUpdate({ appName, runner: 'nile', status: 'prerequisites' })

const gameSettings = GameConfig.get(appName).config
if (!isWindows) {
Expand All @@ -76,6 +75,9 @@ export default async function setup(
}

logDebug(['PostInstall:', fuel.PostInstall], LogPrefix.Nile)

sendGameStatusUpdate({ appName, runner: 'nile', status: 'prerequisites' })

// Actual setup logic
for (const action of fuel.PostInstall) {
const exeArguments = action.Args ?? []
Expand Down
4 changes: 3 additions & 1 deletion src/backend/tools/ipc_handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ipcMain } from 'electron'
import { Winetricks, runWineCommandOnGame } from '.'
import path from 'path'
import { isWindows } from 'backend/constants'
import { execAsync } from 'backend/utils'
import { execAsync, sendGameStatusUpdate } from 'backend/utils'

ipcMain.handle(
'runWineCommandForGame',
Expand Down Expand Up @@ -48,6 +48,8 @@ ipcMain.handle('callTool', async (event, { tool, exe, appName, runner }) => {
}
break
}

sendGameStatusUpdate({ appName, runner, status: 'done' })
})

ipcMain.on('winetricksInstall', async (event, { runner, appName, component }) =>
Expand Down

0 comments on commit d5d1482

Please sign in to comment.