Skip to content

Commit aaa6001

Browse files
committed
docs: update overlay with heroic
for impatient type
1 parent 6291280 commit aaa6001

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

docs/wiki/Overlay.md

+40-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ This section describes how to use Galaxy overlay with comet.
1313
```
1414
comet --from-heroic --username <username> overlay --force
1515
```
16-
- Start comet (right now you need latest build from git)
16+
- `HEROIC_APP_NAME` environment variable allows comet to load metadata for given app and give context to overlay itself. (this is required for welcome popup and in-game invites)
17+
- Start comet, at least v0.3.0
1718
- Run the game
1819

1920
## Running the game
@@ -32,6 +33,44 @@ GAMEID=0 STEAM_COMPAT_INSTALL_PATH=/game/install/location umu-run galaxy.exe gam
3233
- galaxy.exe - main executable of galaxy-helper. It should be located together with its `libgalaxyunixlib.dll.so`. The exe doesn't need to be in your current directory - just ensure to provide full path to its location.
3334
- game.exe - normal command you'd run to start the game.
3435

36+
## Doing this in Heroic (LINUX)
37+
Until overlay support ships in Heroic itself its still possible to add injection code.
38+
You need to create custom wrapper script that will modify the launch command to include path to `galaxy.exe` before game executable itself. Make sure the executable is in location that is accessible from within umu container.
39+
40+
```bash
41+
#!/bin/bash
42+
43+
# Static path to insert
44+
INSERT_PATH="/path/to/galaxy.exe"
45+
46+
NEW_ARGS=()
47+
PREV_MATCHED=false
48+
49+
for arg in "$@"; do
50+
if [[ "$PREV_MATCHED" == true ]]; then
51+
NEW_ARGS+=("$INSERT_PATH")
52+
PREV_MATCHED=false
53+
fi
54+
NEW_ARGS+=("$arg")
55+
if [[ "$arg" == *"umu-run" || "$arg" == *"umu-run.py" ]]; then
56+
PREV_MATCHED=true
57+
fi
58+
done
59+
60+
# If the last argument was umu-run or umu-run.py, add the path at the end
61+
if [[ "$PREV_MATCHED" == true ]]; then
62+
NEW_ARGS+=("$INSERT_PATH")
63+
fi
64+
65+
# Print the new command for debugging
66+
echo "Modified command: " "${NEW_ARGS[@]}"
67+
68+
# Execute the modified command
69+
exec "${NEW_ARGS[@]}"
70+
71+
72+
```
73+
3574
## Current limitations
3675

3776
- Game invitations may not work

0 commit comments

Comments
 (0)