heroic-unwrapped: Apply patch for upstream bugfix PR

+73
+2
pkgs/by-name/he/heroic-unwrapped/package.nix
··· 50 patches = [ 51 # Make Heroic create Steam shortcuts (to non-steam games) with the correct path to heroic. 52 ./fix-non-steam-shortcuts.patch 53 ]; 54 55 env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
··· 50 patches = [ 51 # Make Heroic create Steam shortcuts (to non-steam games) with the correct path to heroic. 52 ./fix-non-steam-shortcuts.patch 53 + # Fixes incorrect path to GalaxyCommunication.exe 54 + ./pr-4885.patch 55 ]; 56 57 env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
+71
pkgs/by-name/he/heroic-unwrapped/pr-4885.patch
···
··· 1 + From a98cc23b288e13665c8698eec56e0653613946d7 Mon Sep 17 00:00:00 2001 2 + From: Aidan Gauland <aidalgol@fastmail.net> 3 + Date: Tue, 19 Aug 2025 09:45:55 +1200 4 + Subject: [PATCH] [Fix] Run GalaxyComm executable path through fixAsarPath 5 + 6 + --- 7 + src/backend/constants/paths.ts | 4 ++++ 8 + src/backend/launcher.ts | 15 +++++---------- 9 + 2 files changed, 9 insertions(+), 10 deletions(-) 10 + 11 + diff --git a/src/backend/constants/paths.ts b/src/backend/constants/paths.ts 12 + index 1d05ce5b58..2e9cff1197 100644 13 + --- a/src/backend/constants/paths.ts 14 + +++ b/src/backend/constants/paths.ts 15 + @@ -44,6 +44,10 @@ export const fakeEpicExePath = fixAsarPath( 16 + join(publicDir, 'bin', 'x64', 'win32', 'EpicGamesLauncher.exe') 17 + ) 18 + 19 + +export const galaxyCommunicationExePath = fixAsarPath( 20 + + join(publicDir, 'bin', 'x64', 'win32', 'GalaxyCommunication.exe') 21 + +) 22 + + 23 + export const webviewPreloadPath = fixAsarPath( 24 + join('file://', publicDir, 'webviewPreload.js') 25 + ) 26 + diff --git a/src/backend/launcher.ts b/src/backend/launcher.ts 27 + index a239cff927..2262dc35b2 100644 28 + --- a/src/backend/launcher.ts 29 + +++ b/src/backend/launcher.ts 30 + @@ -80,7 +80,7 @@ import { 31 + defaultWinePrefix, 32 + fixesPath, 33 + flatpakHome, 34 + - publicDir, 35 + + galaxyCommunicationExePath, 36 + runtimePath, 37 + userHome 38 + } from './constants/paths' 39 + @@ -888,28 +888,23 @@ async function prepareWineLaunch( 40 + 41 + try { 42 + if (runner === 'gog' && experimentalFeatures?.cometSupport !== false) { 43 + - const communicationSource = join( 44 + - publicDir, 45 + - 'bin/x64/win32/GalaxyCommunication.exe' 46 + - ) 47 + - 48 + - const galaxyCommPath = 49 + + const galaxyCommWinePath = 50 + 'C:\\ProgramData\\GOG.com\\Galaxy\\redists\\GalaxyCommunication.exe' 51 + const communicationDest = await getWinePath({ 52 + - path: galaxyCommPath, 53 + + path: galaxyCommWinePath, 54 + gameSettings, 55 + variant: 'unix' 56 + }) 57 + 58 + if (!existsSync(communicationDest)) { 59 + mkdirSync(dirname(communicationDest), { recursive: true }) 60 + - await copyFile(communicationSource, communicationDest) 61 + + await copyFile(galaxyCommunicationExePath, communicationDest) 62 + await runWineCommand({ 63 + commandParts: [ 64 + 'sc', 65 + 'create', 66 + 'GalaxyCommunication', 67 + - `binpath=${galaxyCommPath}` 68 + + `binpath=${galaxyCommWinePath}` 69 + ], 70 + gameSettings, 71 + protonVerb: 'runinprefix'