Repository navigation
Games: find Steam and Epic Games on Windows - #65
Merged
Merged
Conversation
Steam is also looked for where the registry says it is, a game's program is searched a few folders deep (Unreal games included), the Epic Games Launcher's manifests are read, and the focused app is recognised for games in deep folders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…value size Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows, "Add from installed games" came up empty or missed games. Going through the path end to end, I found these causes:
Program Files (x86)\Steam. If Steam lives anywhere else (another drive, a custom folder) nothing was found. It now also reads the install folder from the registry (HKCU\Software\Valve\SteamSteamPath,HKLM\...\WOW6432Node\Valve\SteamInstallPath) before falling back to the default folders.bin\x64(Cyberpunk and many others) or in an Unreal<Game>\Binaries\Win64was dropped silently. It now looks three levels deep, prefers Unreal-Win64-Shipping.exe(that is the process that owns the window, the small exe in the root only starts it), and skips installers, crash reporters, redistributables and anti-cheat helpers. The old skip list matched anything containing "crash", which hid games like Crash Bandicoot; it is narrower now.%ProgramData%\Epic\EpicGamesLauncher\Data\Manifests\*.item(ProgramData from the environment, not hardcoded): DisplayName, LaunchExecutable, InstallLocation, skipping DLC, unfinished installs and entries with no program. Listed as "Epic".libraryfolders.vdf parsing (old and new layout, doubled backslashes) was already correct, now covered by tests with Windows style fixtures. Rule matching against the running exe is case insensitive already, so nothing to change there. Nothing in the frontend filtered games out; I only updated the "No games found" text.
Tests: new unit tests with fixture files in
crates/perihub-core/tests/fixtures/gamesthat run on Linux (Windows paths, both vdf layouts, registry folder plus second library, nested and Unreal exes, Epic manifests including a BOM, DLC and an unfinished install).cargo test -p perihub-corepasses, clippy and fmt are clean. The Windows only code (registry read, focus buffer) was type-checked for x86_64-pc-windows-msvc in a small scratch crate, since hidapi's C build does not cross compile here. I could not run it on a real Windows machine: the registry read, a real Epic manifest set and a real Steam library still need a check there. The Epic manifest field names (MainWindowProcessName,MainGameAppName) come from my knowledge of the format, not from a manifest I could open here.🤖 Generated with Claude Code