Skip to content

run_wine_session: initialize and stop the prefix with $WINE - #217

Closed
Andretuta wants to merge 1 commit into
mainfrom
old-pr/9952
Closed

Andretuta wants to merge 1 commit into
mainfrom
old-pr/9952

Conversation

@Andretuta

Copy link
Copy Markdown
Collaborator

Carried over from old PR 9952 by SkippySteve in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9952, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
SkippySteve: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Claim: https://github.com/ItsNotRexed/Leonida/issues/9677#issuecomment-7116873558

scripts/run_wine_session.sh ran wineboot and wineserver from PATH, while run_wine_tests.py runs the tests with $WINE. With WINE set to Proton's or UMU-Proton's files/bin/wine:

  • on a host without a system Wine, the script stopped at timeout: failed to run command 'wineboot' (exit 127), and the exit trap printed wineserver: command not found;
  • on a host with a system Wine, the prefix was initialized by that other Wine, and the trap stopped the wrong wineserver.

The script now runs "$WINE" wineboot --init (default wine, as run_wine_tests.py does) and, at exit, stops $WINESERVER, else the wineserver next to $WINE, else wineserver on PATH (the same lookup winetricks uses). A WINE that can't be found is reported with status 127. CI doesn't set WINE, so it still uses the Wine on PATH and its wineserver. docs/testing.md says so in one sentence.

Tests

  • tests/test_run_wine_session.py (new, fake wine/wineserver scripts, including a path with a space): 4 tests pass; against the old script all 4 fail.
  • Arch Linux, UMU-Proton 11.0-2e, no system Wine: WINE=<UMU-Proton>/files/bin/wine WINEPREFIX=$(mktemp -d) bash scripts/run_wine_session.sh "$WINE" cmd /c echo … initializes the prefix, prints the echo, exits 0, and leaves no wineserver running. The old script exits 127 here.
  • bash -n, scripts/check_no_game_data.py clean.

No game files used. AI-assisted.

The session script ran wineboot and wineserver from PATH while
run_wine_tests.py runs the tests with $WINE. With WINE set to Proton's or
UMU-Proton's files/bin/wine, the prefix was initialized by another Wine, or
the script stopped at 'wineboot: command not found' on a host without a
system Wine, and the exit trap stopped the wrong wineserver.

Run "$WINE" wineboot --init and stop $WINESERVER, else the wineserver next
to $WINE, else wineserver on PATH; report a missing $WINE with status 127.
DesertGamer pushed a commit to DesertGamer/leonida that referenced this pull request Nov 24, 2026
… numbers

Review of this pull request pointed out that the status text was behind issue ProjectLeonida#14 and that the PE loader row claimed more than plain main does.

The status paragraph now says that the retail executable is measured only with open pull requests or local stand-ins on top of main, that seven open pull requests take main to the title's frame loop with a black picture, and that the 900 s integration run had every pipeline stubbed and rendered nothing. The PE loader row says plain main ends in CRT startup on the Intel host. The bare numbers left over from the old tracker (ProjectLeonida#146, ProjectLeonida#217, ProjectLeonida#330, ProjectLeonida#664, ProjectLeonida#857, ProjectLeonida#1706, ProjectLeonida#1707, ProjectLeonida#1924, #2947, #3119) are removed, since they are gone or name unrelated items here.
@MoonEyes

Copy link
Copy Markdown
Collaborator

Thanks a lot for carrying this over, @Andretuta. The same change is in #1241: it carries SkippySteve's commit from old-pr/9952 with the same diff to scripts/run_wine_session.sh, docs/testing.md and tests/test_run_wine_session.py, and it was claimed in #14 as OLD-9952.

I am closing this draft so the review happens in one place. Please continue the discussion on #1241, or reopen this one if you see something it misses.

AI-assisted (Claude Code, Claude Opus 5.5)

@MoonEyes MoonEyes closed this Nov 27, 2026
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.

3 participants