Skip to content

Commit a4aa2bd

Browse files
authored
[Fix] Run GalaxyComm executable path through fixAsarPath (#4885)
1 parent d2f0ed1 commit a4aa2bd

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

src/backend/constants/paths.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ export const fakeEpicExePath = fixAsarPath(
4444
join(publicDir, 'bin', 'x64', 'win32', 'EpicGamesLauncher.exe')
4545
)
4646

47+
export const galaxyCommunicationExePath = fixAsarPath(
48+
join(publicDir, 'bin', 'x64', 'win32', 'GalaxyCommunication.exe')
49+
)
50+
4751
export const webviewPreloadPath = fixAsarPath(
4852
join('file://', publicDir, 'webviewPreload.js')
4953
)

src/backend/launcher.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ import {
8080
defaultWinePrefix,
8181
fixesPath,
8282
flatpakHome,
83-
publicDir,
83+
galaxyCommunicationExePath,
8484
runtimePath,
8585
userHome
8686
} from './constants/paths'
@@ -888,28 +888,23 @@ async function prepareWineLaunch(
888888

889889
try {
890890
if (runner === 'gog' && experimentalFeatures?.cometSupport !== false) {
891-
const communicationSource = join(
892-
publicDir,
893-
'bin/x64/win32/GalaxyCommunication.exe'
894-
)
895-
896-
const galaxyCommPath =
891+
const galaxyCommWinePath =
897892
'C:\\ProgramData\\GOG.com\\Galaxy\\redists\\GalaxyCommunication.exe'
898893
const communicationDest = await getWinePath({
899-
path: galaxyCommPath,
894+
path: galaxyCommWinePath,
900895
gameSettings,
901896
variant: 'unix'
902897
})
903898

904899
if (!existsSync(communicationDest)) {
905900
mkdirSync(dirname(communicationDest), { recursive: true })
906-
await copyFile(communicationSource, communicationDest)
901+
await copyFile(galaxyCommunicationExePath, communicationDest)
907902
await runWineCommand({
908903
commandParts: [
909904
'sc',
910905
'create',
911906
'GalaxyCommunication',
912-
`binpath=${galaxyCommPath}`
907+
`binpath=${galaxyCommWinePath}`
913908
],
914909
gameSettings,
915910
protonVerb: 'runinprefix'

0 commit comments

Comments
 (0)