Skip to content

Steam no EAC launch + fix Epic launch#172

Open
VirxEC wants to merge 4 commits into
masterfrom
steam-no-eac
Open

Steam no EAC launch + fix Epic launch#172
VirxEC wants to merge 4 commits into
masterfrom
steam-no-eac

Conversation

@VirxEC

@VirxEC VirxEC commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Steam – No EAC (Windows + Linux)

This version successfully loads my player settings and stuff unlike the Epic no EAC launch and has replaced the only-with-EAC launch we had previously.

  • Windows (Steam.Windows.cs): Replaces -applaunch with direct executable launch. Discovers the Rocket League install path by reading Steam library folders from the registry and libraryfolders.vdf. Sets SteamAppId/SteamGameId environment variables so Steamworks logs us in.
  • Linux (Steam.Linux.cs): New implementation that discovers Steam roots via symlinks, XDG paths, Flatpak/Snap, and PATH. Finds the installed Rocket League and the configured (or newest) Proton version, then launches the game via proton run with the necessary STEAM_COMPAT_* environment variables.
  • Proton detection: Reads Steam's config.vdf for the configured compatibility tool, falls back to the numerically newest Proton installation, with special handling for Hotfix/Experimental builds.

Epic – Launch fixes (Windows)

Still doesn't load player settings beyond the username, but should launch much more reliably. It should be noted that player settings ARE loaded when launching Epic RL without EAC from the launcher manually, so we're probably missing something.

  • Epic.Windows.cs: Refactored to delete the old launch log before starting, read both the executable path and auth arguments from WinReadLog.GetGamePathAndAuth(), and launch the game executable directly instead of wrapping with cmd.exe /c.
  • WinReadLog.cs: Added DeleteLog(), FileShare.ReadWrite for concurrent access, and IOException handling to retry while the log is still being written.

Both Steam and Epic now default to launching without EAC which is probably a good step towards #156

Bumped version to v5.0.0-rc.15 (change to v1.0.0-rc.15?)

VirxEC added 4 commits June 25, 2026 18:37
Bump version to v5.0.0-rc.15.
Delete old launch log before reading and launch the game directly
via its executable path instead of wrapping with cmd.exe.

@NicEastvillage NicEastvillage left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice. Environment variables were the next avenue I was going to investigate. Happy to see it is so simple here.

I tested Steam launching on Windows, and it works, as long as Steam is already running. What launcher/OS combinations did you test?

Comment on lines +124 to +130
// Let Steamworks initialize by providing the AppId,
// so the game can authenticate with the running Steam client.
rocketLeague.StartInfo.Environment["SteamAppId"] = SteamGameId;
rocketLeague.StartInfo.Environment["SteamGameId"] = SteamGameId;

Logger.LogInformation($"Starting Rocket League without EAC: {gamePath} {args}");
rocketLeague.Start();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We are assuming Steam is running. We should start Steam if it isn't.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Things work if Steam isn't launched, we just don't get logged in. But I'll look into detecting if steam is running or not.

Comment on lines +14 to +17
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
throw new PlatformNotSupportedException(
"Getting Windows path on non-Windows platform"
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Useless. We are in an #if WINDOWS directive.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, but when I deleted it, I got like 5 warnings about the following code being Windows only. Very annoying. I guess I'll just ignore the warnings. (This function was copy+pasted from the old code.)

Comment on lines +12 to +19
if (IsRocketLeagueRunningWithArgs())
return;

if (IsRocketLeagueRunning())
{
Logger.LogError("Please close Rocket League so RLBot can start it in RLBot mode.");
return;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We do not have these two checks for the other launchers. Maybe we should? Check before doing any launching.

}

// Start with a fresh Launch.log so we don't read stale data from a previous run.
WinReadLog logReader = new();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

WinReadLog should be a static class. It holds no state. You can also move it to the LaunchManager folder. Arguably, WinProcArgs.cs can go there too.

Comment on lines +7 to +30
private static void LaunchGameViaLegendary()
{
Process legendary = RunCommandInShell(
"legendary launch Sugar -rlbot RLBot_ControllerURL=127.0.0.1:23233 RLBot_PacketSendRate=240 -nomovie"
);
legendary.Start();
}

private static void LaunchGameViaHeroic()
{
Process heroic;

#if WINDOWS
heroic = RunCommandInShell(
"start \"\" \"heroic://launch?appName=Sugar&runner=legendary&arg=-rlbot&arg=RLBot_ControllerURL%3D127.0.0.1%3A23233&arg=RLBot_PacketSendRate%3D240&arg=-nomovie\""
);
#else
heroic = RunCommandInShell(
"xdg-open 'heroic://launch?appName=Sugar&runner=legendary&arg=-rlbot&arg=RLBot_ControllerURL%3D127.0.0.1%3A23233&arg=RLBot_PacketSendRate%3D240&arg=-nomovie'"
);
#endif

heroic.Start();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Legendary and Heroic are launching with EAC, from what I can see. Hopefully, these just need the -noeac flag.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Can we save those platforms for a later PR?

Comment on lines +97 to +102
catch (IOException)
{
// Rocket League may still be writing to the log file.
// Return null so the caller retries.
return null;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If this doesn't fix the issue, then it is likely because we are blocking RocketLeague from writing in the first place. We could check the last edited time first in that case.

Alternatively, we dig around in Heroic or Legendary to see how they authenticate. Start here https://github.com/legendary-gl/legendary/blob/master/legendary/api/egs.py.

@VirxEC VirxEC Jun 26, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

we dig around in Heroic or Legendary to see how they authenticate

Yes, but this PR is mostly focused on Steam, can we defer that to a follow-up PR?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I just wanted to quickly push a fix so people stop complaining about how Epic launch is completely broken on their system.

Comment on lines +108 to +112
string? gamePath = FindWindowsRocketLeaguePath();
if (gamePath == null)
throw new FileNotFoundException(
"Could not find Rocket League installation. Ensure Rocket League is installed via Steam."
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like that you are thoroughly searching for the installation path using Steam's library data. So this is just a fun fact: We could get the path from Launch.log also when using Steam. It would be less code, but it assumes that RL has been started at least once.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think we should test out this method because hopefully it's more reliable. Perhaps we can investigate this in the future? I am hoping this current method proves fast and reliable.

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