Skip to content

Look for info file in root dir as well for GOG V1 API#545

Merged
utkarshdalal merged 1 commit intoutkarshdalal:masterfrom
unbelievableflavour:gog-v1-api-info-fix
Feb 17, 2026
Merged

Look for info file in root dir as well for GOG V1 API#545
utkarshdalal merged 1 commit intoutkarshdalal:masterfrom
unbelievableflavour:gog-v1-api-info-fix

Conversation

@unbelievableflavour
Copy link
Contributor

@unbelievableflavour unbelievableflavour commented Feb 17, 2026


Summary by cubic

Improves GOG V1 game detection by checking the install root for goggame-*.info and the executable before scanning subfolders. Fixes executable path resolution to be relative to the install root so games launch correctly.

  • Bug Fixes
    • Search install root first for V1 info/exe, then scan subdirectories.
    • Compute the executable’s relative path from the install root instead of the game directory’s parent.

Written for commit 7b87d7f. Summary will update on new commits.

Summary by CodeRabbit

  • Bug Fixes
    • Improved executable detection for games with legacy (V1) installation layouts by performing V1 probing earlier in the discovery process.
    • Tightened path resolution so the primary game executable is resolved relative to the installation root, ensuring games are located and launched from the correct install directory.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

This change moves V1 executable probing earlier in GOG install detection and updates relative-path resolution to compute the main executable path against the install root instead of the game directory's parent, altering when and how V1 layouts are recognized and resolved.

Changes

Cohort / File(s) Summary
Executable discovery / GOG manager
app/src/main/java/app/gamenative/service/gog/GOGManager.kt
Added an early V1 structure probe in getInstalledExe to return immediately if found; changed getMainExecutableFromGOGInfo to compute the executable's relative path against the install root (installPath) rather than the game directory's parent.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I hop through folders, sniff and seek,
V1 found early — no need to peek.
Root-relative steps, tidy and neat,
Executable paths now match and meet.
— A rabbit's happy code-beat

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding support for checking the install root directory for GOG V1 API info files, which aligns with the PR's primary objective of improving V1 game detection.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
app/src/main/java/app/gamenative/service/gog/GOGManager.kt (1)

586-596: Good addition of early V1 detection at install root.

The early-exit path for V1 layouts is a clean improvement. One small nit: exe on line 588 is never reassigned, so it can be val.

Suggested fix
-            var exe = getGameExecutable(installPath, installDirFile)
+            val exe = getGameExecutable(installPath, installDirFile)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/main/java/app/gamenative/service/gog/GOGManager.kt` around lines 586
- 596, The local variable "exe" in GOGManager.kt is declared as var but never
reassigned; change it to an immutable val to reflect intent and improve
readability: replace "var exe = getGameExecutable(installPath, installDirFile)"
with an immutable declaration and keep the subsequent early-return logic using
that value (referenced in getGameExecutable and installDirFile).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@app/src/main/java/app/gamenative/service/gog/GOGManager.kt`:
- Around line 586-596: The local variable "exe" in GOGManager.kt is declared as
var but never reassigned; change it to an immutable val to reflect intent and
improve readability: replace "var exe = getGameExecutable(installPath,
installDirFile)" with an immutable declaration and keep the subsequent
early-return logic using that value (referenced in getGameExecutable and
installDirFile).

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@utkarshdalal utkarshdalal merged commit d48c038 into utkarshdalal:master Feb 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants