Skip to content

Detect Star Citizen installs on any drive and custom library folders (C#) - #9

Merged
ckuma merged 1 commit into
mainfrom
feat/csharp-detect-custom-paths
Jun 17, 2026
Merged

Detect Star Citizen installs on any drive and custom library folders (C#)#9
ckuma merged 1 commit into
mainfrom
feat/csharp-detect-custom-paths

Conversation

@ckuma

@ckuma ckuma commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary

Ports the install-detection improvements (PR #7) to the C# / WinForms app for parity.

DetectInstallations() previously checked only <drive>:\Program Files\Roberts Space Industries\StarCitizen across drives C-G. So even though it scanned G, a custom library folder like G:\Games\StarCitizen was never found and the app fell back to "No installations found".

Changes (Form1.cs)

  • Scan every fixed drive via DriveInfo.GetDrives() instead of a hardcoded C-G list.
  • Cover common custom roots: Games\Roberts Space Industries\StarCitizen, Games\StarCitizen, bare StarCitizen, plus the original two.
  • Read the authoritative path from the RSI Launcher log (%APPDATA%\rsilauncher\logs\log.log) — the only reliable source for a fully custom library folder.
  • All candidates are still verified against <env>\logbackups on disk, so stale/moved installs are dropped.

Verification

  • Built locally with the exact CI flags (/p:TreatWarningsAsErrors=true /p:RunAnalyzersDuringBuild=true) — builds clean, no warnings.
  • Validated the ported regex against a real launcher log via the .NET engine: it extracts G:\Games\StarCitizen (and a stale C:\… entry that is correctly discarded because its logbackups no longer exists), yielding LIVE (G:) — matching the Python implementation.

…(C#)

Port the Python detection improvements to the C# (WinForms) app.
DetectInstallations previously only checked the fixed layout
"<drive>:\Program Files\Roberts Space Industries\StarCitizen" on drives
C-G, so an install in a custom library folder (e.g. G:\Games\StarCitizen)
was never found.

- Scan every fixed drive via DriveInfo, not a hardcoded list.
- Cover common custom roots (Games\StarCitizen, bare StarCitizen, etc.).
- Read the authoritative install path from the RSI Launcher log
  (%APPDATA%\rsilauncher\logs\log.log). All candidates are still verified
  against <env>\logbackups on disk before being offered.
@ckuma
ckuma merged commit a2d6109 into main Jun 17, 2026
5 checks passed
@ckuma
ckuma deleted the feat/csharp-detect-custom-paths branch June 17, 2026 18:55
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.

1 participant