Skip to content

fix(wine): select the client root that actually holds bin/ - #24

Merged
panxuc merged 2 commits into
panxuc:masterfrom
Aibeto:fix/client-root-detection
Oct 15, 2026
Merged

panxuc merged 2 commits into
panxuc:masterfrom
Aibeto:fix/client-root-detection

Conversation

@Aibeto

@Aibeto Aibeto commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

uur run aborted with "WebView2 bootstrapper missing from the client directory" on a complete install.

find_client_dir searched depth-first for GameViewerServer.exe and returned the first hit, special-casing only a parent named bin. NetEase ships the payload twice: as <root>/bin/ and as a sibling <root>/<version>/. When readdir order reached <root>/<version>/ first, that directory was returned as the client root. It has no bin/ subdirectory, so every join("bin") lookup missed -- the WebView2 bootstrapper and the terminal proxies -- and the session bailed out. deploy_terminal_proxy then created a spurious bin/ inside the version directory and wrote proxies into it.

Now every directory holding GameViewer.exe is collected and ranked: bin/GameViewerServer.exe scores highest because that is the layout uur drives, then bin/MicrosoftEdgeWebview2Setup.exe, then a top-level server. Ties break on path depth, then lexically, so the choice no longer depends on readdir order. A versioned copy is still used when it is the only candidate.

Adds four tests covering both layouts, readdir stability, and the fallback.

`uur run` aborted with "WebView2 bootstrapper missing from the client
directory" on a complete install.

`find_client_dir` searched depth-first for `GameViewerServer.exe` and
returned the first hit, special-casing only a parent named `bin`. NetEase
ships the payload twice: as `<root>/bin/` and as a sibling
`<root>/<version>/`. When readdir order reached `<root>/<version>/` first,
that directory was returned as the client root. It has no `bin/`
subdirectory, so every `join("bin")` lookup missed -- the WebView2
bootstrapper and the terminal proxies -- and the session bailed out.
`deploy_terminal_proxy` then created a spurious `bin/` inside the version
directory and wrote proxies into it.

Now every directory holding `GameViewer.exe` is collected and ranked:
`bin/GameViewerServer.exe` scores highest because that is the layout uur
drives, then `bin/MicrosoftEdgeWebview2Setup.exe`, then a top-level
server. Ties break on path depth, then lexically, so the choice no longer
depends on readdir order. A versioned copy is still used when it is the
only candidate.

Adds four tests covering both layouts, readdir stability, and the
fallback.
@Aibeto

Aibeto commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

need review again
remind in #28

@panxuc
panxuc merged commit bfecaa5 into panxuc:master Oct 15, 2026
6 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