heroic: apply patch to fix Steam shortcuts

This commit is contained in:
Aidan Gauland 2023-08-19 08:06:17 +12:00
parent 4523c65f95
commit f8fa19a5da
No known key found for this signature in database
GPG key ID: 16E68DD2D0E77C91
2 changed files with 15 additions and 0 deletions

View file

@ -42,6 +42,8 @@ in stdenv.mkDerivation rec {
# Reverts part of upstream PR 2761 so that we don't have to use a non-free Electron fork.
# https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/pull/2761
./remove-drm-support.patch
# Make Heroic create Steam shortcuts (to non-steam games) with the correct path to heroic.
./fix-non-steam-shortcuts.patch
];
configurePhase = ''

View file

@ -0,0 +1,13 @@
diff --git a/src/backend/shortcuts/nonesteamgame/nonesteamgame.ts b/src/backend/shortcuts/nonesteamgame/nonesteamgame.ts
index ebef6aa4..c8bd853d 100644
--- a/src/backend/shortcuts/nonesteamgame/nonesteamgame.ts
+++ b/src/backend/shortcuts/nonesteamgame/nonesteamgame.ts
@@ -252,7 +252,7 @@ async function addNonSteamGame(props: {
// add new Entry
const newEntry = {} as ShortcutEntry
newEntry.AppName = props.gameInfo.title
- newEntry.Exe = `"${app.getPath('exe')}"`
+ newEntry.Exe = `"heroic"`
newEntry.StartDir = `"${process.cwd()}"`
if (isFlatpak) {