Skip to content

[PROTON]: use run verb for setup commands #3505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/backend/launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ async function prepareWineLaunch(
sendFrontendMessage('gameStatusUpdate', {
appName,
runner: 'gog',
status: 'playing'
status: 'launching'
})
}
if (runner === 'nile') {
Expand Down Expand Up @@ -436,7 +436,7 @@ async function installFixes(appName: string, runner: Runner) {
await runWineCommandOnGame(appName, {
commandParts: [fullPath],
wait: true,
protonVerb: 'waitforexitandrun'
protonVerb: 'run'
})
}
}
Expand Down
16 changes: 11 additions & 5 deletions src/backend/storeManagers/legendary/setup.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { join } from 'path'
import { getGameInfo, runWineCommandOnGame } from './games'
import { getGameInfo } from './games'
import { getInstallInfo } from './library'
import { sendGameStatusUpdate } from 'backend/utils'
import { enable, getStatus, isEnabled } from './eos_overlay/eos_overlay'
import { split } from 'shlex'
import { logError } from 'backend/logger/logger'
import { runWineCommand } from 'backend/launcher'
import { GameConfig } from 'backend/game_config'

export const legendarySetup = async (appName: string) => {
const gameInfo = getGameInfo(appName)
Expand All @@ -19,16 +21,19 @@ export const legendarySetup = async (appName: string) => {
context: 'EPIC'
})

const gameSettings = GameConfig.get(appName).config

// Fixes games like Fallout New Vegas and Dishonored: Death of the Outsider
await runWineCommandOnGame(appName, {
await runWineCommand({
gameSettings,
commandParts: [
'reg',
'add',
'HKEY_CLASSES_ROOT\\com.epicgames.launcher',
'/f'
],
wait: true,
protonVerb: 'waitforexitandrun'
protonVerb: 'run'
})

const winPlatforms = ['Windows', 'Win32', 'windows']
Expand All @@ -42,7 +47,8 @@ export const legendarySetup = async (appName: string) => {
info.manifest.prerequisites &&
info.manifest.prerequisites.path.length > 0
) {
await runWineCommandOnGame(appName, {
await runWineCommand({
gameSettings,
commandParts: [
join(
gameInfo.install.install_path ?? '',
Expand All @@ -51,7 +57,7 @@ export const legendarySetup = async (appName: string) => {
...split(info.manifest.prerequisites.args)
],
wait: true,
protonVerb: 'waitforexitandrun'
protonVerb: 'run'
})
}
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion src/backend/storeManagers/nile/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default async function setup(
gameInstallPath: basePath,
commandParts: [action.Command, ...exeArguments],
wait: true,
protonVerb: 'waitforexitandrun',
protonVerb: 'run',
startFolder: basePath
})
}
Expand Down
10 changes: 5 additions & 5 deletions src/backend/tools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export const DXVK = {
gameSettings,
commandParts: unregisterDll,
wait: true,
protonVerb: 'waitforexitandrun'
protonVerb: 'run'
})
})
dlls32.forEach(async (dll) => {
Expand All @@ -276,7 +276,7 @@ export const DXVK = {
gameSettings,
commandParts: unregisterDll,
wait: true,
protonVerb: 'waitforexitandrun'
protonVerb: 'run'
})
})
return true
Expand Down Expand Up @@ -339,7 +339,7 @@ export const DXVK = {
gameSettings,
commandParts: registerDll,
wait: true,
protonVerb: 'waitforexitandrun'
protonVerb: 'run'
})
})
dlls32.forEach(async (dll) => {
Expand All @@ -359,7 +359,7 @@ export const DXVK = {
gameSettings,
commandParts: registerDll,
wait: true,
protonVerb: 'waitforexitandrun'
protonVerb: 'run'
})
})

Expand Down Expand Up @@ -398,7 +398,7 @@ export const DXVK = {
gameSettings,
commandParts: regModNvngx,
wait: true,
protonVerb: 'waitforexitandrun'
protonVerb: 'run'
})
} else {
logWarning(
Expand Down