Repository navigation
feat(cli): find the Avalonia Game Studio - #3691
Closed
Kryptos-FR wants to merge 5 commits into
Closed
Kryptos-FR wants to merge 5 commits into
Kryptos-FR wants to merge 5 commits into
Conversation
A checkout builds both Game Studios as two dev packages of the same version. Their rows get a WPF or AVALONIA badge next to LOCAL, and the editor is named on the Start button and in a recent project's Open with menu. A click on a project that both match opens it with the active one.
The CLI only looked at the Stride.GameStudio package, so a version with only the Avalonia Game Studio (Stride.GameStudio.Avalonia.Desktop) was never listed, and `stride studio` opened WPF on Windows and found nothing elsewhere. - `sdk list` lists a version once with its Game Studios: "4.5.0-dev (WPF, Avalonia)". - `studio --editor wpf|avalonia` opens the Game Studio from its own package. The default is WPF on Windows when the version has it, else Avalonia; asking for one the version doesn't have, or WPF off Windows, says so. - `sdk uninstall` removes every Game Studio of the version, and the dependencies no other version uses.
Once a Wine prefix is set up (Windows .NET, d3dcompiler_47, fonts), the WPF Game Studio starts with a plain `wine Stride.GameStudio.exe <solution>`. Off Windows, `stride studio --editor wpf`, or a version that has only the WPF Game Studio, now runs it that way when wine is on the PATH: the exe is found in the Windows-only TFM folder, the solution path goes through the Z: drive, and the editor picks its .NET runtime in the prefix itself. Without wine, the error says what is needed. Avalonia stays the default off Windows when the version has it.
The Game Studios, their packages and their names (WPF, Avalonia) move to sources/shared/GameStudioEditor.cs, linked into the CLI and the launcher. The launcher's GameStudioNames constants, its WPF/Avalonia names and its main package filter now come from it.
A prefix can drop the Z: drive (winecfg, sandboxed prefixes), so the solution path given to the WPF Game Studio under Wine now comes from `wine winepath -w`, which follows the prefix's drives. The Z: drive is the fallback when winepath fails or takes over 30 seconds (it is left to finish: the first wine command of a new prefix creates it).
Member
Author
|
Closed in favor of #3693 to be part of a stack. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Details
The CLI only knew the WPF Game Studio package (
Stride.GameStudio). The Avalonia Game Studio, in its own package (Stride.GameStudio.Avalonia.Desktop), was never listed, andstride studioopened WPF on Windows and found nothing elsewhere.stride sdk listlists each version once with its Game Studios:4.5.0-dev (WPF, Avalonia).stride studio --editor wpf|avaloniaopens either one. The default is WPF on Windows when the version has it, else Avalonia.wineis on the PATH:wine Stride.GameStudio.exe <solution>, with the path converted bywinepath(Z:as fallback). Setting up the Wine prefix is up to the user.stride sdk uninstallremoves every Game Studio package of the version.sources/shared/GameStudioEditor.csholds the Game Studio ids and names, shared by the CLI and the launcher.Not included:
sdk install/updatestill fetch onlyStride.GameStudio, since no feed publishes the Avalonia package yet.Related Issue
None. Follow-up to #3690.
Types of changes
Checklist
sources/launcher/README.md)Tested on Linux against stand-in installs, with a stub Avalonia app and a stub
wine. Not yet tested on Windows or with a real Wine launch through the CLI.