Skip to content

Steam direct launch, GStreamer check, game log excerpts and known-error hints - #1

Merged
abgitdev merged 6 commits into
mainfrom
steam-direct-launch
Nov 25, 2026
Merged

abgitdev merged 6 commits into
mainfrom
steam-direct-launch

Conversation

@abgitdev

Copy link
Copy Markdown
Owner

Five changes, one commit each:

  • Start every Steam game itself instead of through steam.exe -applaunch. Steam started games
    that TrailBridge had not verified without the session's environment, so the headset stayed black.
    TrailBridge now starts the game's own executable, chosen from Steam's launch options or the game
    folder, with SteamAppId set. Existing profiles need no change.
  • Setup checks for GStreamer, which Wine needs to play game videos such as intros. Setup shows
    whether it is installed and links the official package; a session warns once when it is missing.
  • Collapse GStreamer's harmless repeated warnings in the session log into one line with a count.
  • Keep a redacted excerpt of the game's own log (Unity's Player.log or an Unreal game's
    Saved/Logs) with every session. User names, Steam IDs, disk names and the game folder are
    replaced by placeholders. Recent Sessions, Diagnostics and the diagnostic report show it; of the
    excerpts saved without a recording, the latest 50 are kept.
  • Hint at known causes when a session ends: a video the game could not play, a game that needs
    OpenComposite, OpenXR that did not start, and a Wine crash.

Testing

  • make check passes: 1,099 Swift tests with no failures, and the release build.
  • The Windows OpenXR runtime cross-builds without warnings with the pinned CMake 3.31.8 and
    LLVM-MinGW 20261104.
  • Electrician Simulator VR played through the new build. The game's log excerpt was saved with
    placeholders, Setup found the installed GStreamer, and the session ended without hints, as a
    healthy session should.

🤖 Generated with Claude Code

abgitdev and others added 6 commits November 25, 2026 09:47
A profile made by Add Steam Game for a game outside the verified list
ran steam.exe -applaunch APP_ID. Wine returns as soon as Steam accepts
the request, and the game then inherits Steam's environment instead of
the session's BASALT_CONTROL path, so the headset stayed black and the
session ended at once.

BottleManager.profileLaunchCommand now resolves every such profile to
the game's own executable (SteamDirectLaunch): the verified list first,
then Steam's launch options from appcache/appinfo.vdf (versions 39 to
42, read by SteamAppInfo), then the game folder. The game starts with
SteamAppId, SteamGameId and the session's environment, so existing
profiles need no change.

The OpenXR runtime says once why a session stays headless, and the
session log names the executable started directly and adds a hint when
the game ends within 15 seconds of starting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unity games play video through Media Foundation, which the pinned Wine
11.10 build implements with GStreamer. Without GStreamer.framework
installed for all users, Electrician Simulator VR waited forever for its
intro video and the headset stayed black, with nothing in the session
log to say why.

Setup gains a "Video in games (GStreamer)" row. It detects
/Library/Frameworks/GStreamer.framework, shows the version from the
framework's Info.plist and opens the official 1.28.1 package, the one
the Wine build names. The version and link sit next to the Wine pin so
they change together. The row is optional, so games still start without
GStreamer, and the session log then warns once per game session. The
diagnostic report lists the row like every other Setup check. README,
the Setup docs, ReadMeFirst and the third-party notices name the package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Once GStreamer is installed, Wine prints two harmless GLib messages: a
pygobject initialization failure from the plugin loader, and a
GStreamer-Video-CRITICAL assertion that a game can repeat thousands of
times, each after a blank line. They buried the lines that matter.

The session console now shows the first occurrence of each, drops the
blank line GLib writes before them and counts the repeats: one total
line per source when its output closes, and the open totals in a
diagnostic report made during a session. Matching accepts any GLib
program name, process id and timestamp. Saved transcripts keep every
line and the final totals. SessionConsole.isKnownHarmlessNoise lets
later log checks skip these lines. Repeated GPU device errors use the
same per-source counting as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cause of Electrician Simulator VR's black headset, a
WindowsVideoMedia error, was only in the game's own Player.log, so the
session log could not show it.

After every session, once its Wine processes are gone, TrailBridge
finds the game's log: Unity's Player.log, Player-prev.log or
output_log.txt by way of <exe>_Data/app.info, and Unreal's Saved/Logs
in AppData or, failing that, in the game folder. Only files changed
since the game started count. Each file is opened without following
links, must be a regular file, must resolve inside the prefix or the
game folder, and must still be the file found when it is read. If Wine
could not be stopped, the excerpt is still kept and says it may be
incomplete.

The excerpt keeps the last 200 lines and every error line, at most
64 KB, read as UTF-8 or UTF-16 and redacted before any line is clipped.
The redactor now also hides user folders whose names contain spaces,
complete values of identity fields, the user and computer names in
Unreal's LogInit lines, and Steam2 and Steam3 IDs besides SteamID64. A
game folder outside the prefix appears as [game folder]. The excerpt is
saved atomically as <stem>.game.log in the Diagnostics folder, where
the newest 50 standalone excerpts are kept. The session log names it by
its redacted Windows path. Recent Sessions and the Diagnostics page
show it, and the diagnostic report includes it unless that is turned
off. The next launch, a report and quitting wait a few seconds at most
for a capture still running. Nothing leaves the Mac.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The session log now ends a session with a short hint for each error
whose cause is known, found in the game's own log or in the session's
process output:

- a WindowsVideoMedia error: GStreamer is missing (see Setup), or, when
  it is installed, the video failed through Media Foundation in Wine;
- a missing openvr_api DLL or a failed OpenVR initialisation: set up
  OpenComposite through the game card's OpenVR Support;
- an xrCreateInstance failure in a session whose runtime never
  connected: the game could not start OpenXR;
- "wineserver crashed": restart the game, and attach the diagnostic
  report if it happens again.

The rules are data in KnownErrorHint and are matched as lines arrive,
so a trimmed console or Clear loses nothing. One finalizer per session
gives each hint once, after the game's own log has been read. The app's
own lines, excerpt headers and GStreamer's harmless warnings never
match, and Unity's refused request for OpenXR 1.1 gives no hint once
the runtime connects. The hints are kept with the session's history
record and listed in the diagnostic report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test compared the Russian GStreamer hint with a Russian sentence.
It now checks that the Russian hint is not the English sentence and
does not use the English place names. The loop above already checks
that every language names its own places.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@abgitdev abgitdev mentioned this pull request Nov 25, 2026
@abgitdev
abgitdev merged commit b6fb57a into main Nov 25, 2026
3 of 4 checks passed
@abgitdev
abgitdev deleted the steam-direct-launch branch November 26, 2026 00:43
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