Cross-platform Stride.Launcher#3027
Conversation
7b72320 to
03f94a4
Compare
| /// Returns path of Launcher (we can't use Assembly.GetEntryAssembly().Location in .NET Core, especially with self-publish). | ||
| /// </summary> | ||
| /// <returns></returns> | ||
| internal static string? GetExecutablePath() => Environment.ProcessPath; |
There was a problem hiding this comment.
nitpick: Could this property not be used directly?
There was a problem hiding this comment.
I think I just replaced code from the previous implementation to make it cross-platform without changing the overall structure. We could inline it manually.
On the other hand, the method name is a bit more explicit. It's likely inlined anyway by the compiler, so it's just a matter of preference.
| } | ||
|
|
||
| // Avalonia configuration, don't remove; also used by visual designer. | ||
| public static AppBuilder BuildAvaloniaApp() |
There was a problem hiding this comment.
nitpick: This method seems to be unused. It would be great to integrate with RunNewApp somehow
There was a problem hiding this comment.
It's used by the Avalonia plugin. It's needed for the designer.
03f94a4 to
e96d938
Compare
|
@Jklawreszuk I have merged back master to this PR's branch. It's mostly working but it would be nice to also support (un-)installing the Stride packages on Linux even if we can't fully use it there yet. Did you want to contribute to it? The branch is on this repo, so feel free to push commits if you want. |
|
I am sorry, but it took some time to review all the files.Overall, it looks great! A quite accurate implementation of the original Launcher. However, I have a few comments:
Other than that I didnt notice nothing unusual 😅 |
|
@Kryptos-FR Once the changes have been merged, I will try to adapt Launcher to Linux if necessary. But I think that installing/uninstalling packages works correctly, no? |
|
I don't remember if it does work. I assume since it's restoring packages it should. I guess we'll know soon. |
e96d938 to
e161999
Compare
ab329f3 to
482bd28
Compare
Use MarkView.Avalonia library for markdown
e161999 to
4950387
Compare
|
@Kryptos-FR Have you tested it on Windows? It seems to work fine on Linux. They only issue I see is the empty button in the release notes page |
Complete the launcher README with build, versioning and layout notes, and add a hub-and-spoke documentation set under docs/launcher/ covering architecture, view models, views, version management, self-update, settings, localization, packaging, lifecycle and cross-platform notes.
Captures the full delta between the current Avalonia branch and the WPF launcher on master — including silent regressions that are not marked with TODO/FIXME — and a phased roadmap to close the gap for cross-platform parity. Notes Stride.Metrics and PrivacyPolicyHelper as deliberate, permanent removals.
…ncher port roadmap Adds a test-infrastructure phase covering bootstrap of Stride.Launcher.Tests, view-model and Avalonia-headless integration tests, and CI wiring for both Windows and Linux.
… right-click offset Right-click events on the Button inside each row were not reliably bubbling up to the outer Border's ContextMenu on Linux. Moving the ContextMenu to the Button directly — and adding VerticalAlignment="Stretch" — ensures the menu opens wherever the row is visually hit-tested.
- Mark 'Show in Explorer' as fixed (cross-platform since commit c2555d0): update 'already ported' bullet and strike through the regression entry with the three-platform implementation detail - Correct slide animation duration from 0.5s to 1s in both the Fixed description and the Phase 3 roadmap entries (1s was intentional)
|
Looking at PR desc:
I wasn't sure, Is it ready for review or still WIP? |
|
I would say, it is ready for review and testing on both Windows and Linux. I think I have one or two small fixes to push that I did on another branch. |
- Add cross-platform IPC: Windows HWND broadcast + Linux named pipe - Update launcher documentation (port-status.md, cross-platform.md)
- Add editor selector ComboBox to choose between WPF and Avalonia GameStudio - Auto-install companion editor package (WPF/Avalonia) after primary install - Query NuGet store directly for installed editor paths (works across sessions) - Persist preferred editor choice in launcher settings - Add EditorNameConverter for friendly display names - Disable editor/framework selectors during install - Update launcher documentation (port-status.md)
On Linux (and other non-Windows platforms): - CanStart requires the Avalonia editor to be present; Start button stays greyed out for versions that only have a WPF (Stride.GameStudio) package. - UpdateAvailableEditors re-evaluates CanStart after editor discovery, since UpdateStatus runs before AvailableEditors is populated. - EditorNameConverter returns 'Game Studio' without '(Avalonia)' qualifier, as there is no WPF alternative to distinguish from. - TryInstallCompanionsAsync skips the Stride.GameStudio (WPF) companion install on non-Windows platforms. The EditorSelector ComboBox is already hidden when AvailableEditors.Count <= 1, so the dropdown never appears on Linux.
Jklawreszuk
left a comment
There was a problem hiding this comment.
I would say that LGTM! It's great that you added the documentation - it'll be useful to anyone who wants to revisit the code. As for the Launcher, I haven't noticed any significant visual glitches or anything like that.
What I tested on Linux:
- Installing/Uninstalling multiple instances of GameStudio - works as intended
- Including installing xenko versions - works ? (However, xenko is located in .../stride/sources/launcher/Stride.Launcher/bin/Debug/xenko/version/xenko.version.nupkg)
- Clicking in all the urls, release notes - works
|
I'll admit I didn't try to install any Xenko versions. I'll look at it. |
|
The right question should actually be: do we still want to include any older Xenko versions in the launcher? It's not open-source and very obsolete. cc @xen2 |
|
I would say, not necessary anymore. |
- Drop all Xenko package references (Names.Xenko, GameStudioNames.Xenko, MainPackageIds entries for Xenko/Xenko.GameStudio) since backward compatibility with pre-Stride packages is no longer needed - Simplify PackageFilterExtensions to only match Stride.GameStudio and Stride.GameStudio.Avalonia.Desktop - Remove CheckDeprecatedSourcesCommand (prompted users to add the old Xenko NuGet source) and its AskAddNugetDeprecatedSource string resource - Remove old Xenko executable fallback paths from StrideVersionViewModel - Remove the 'Show/Hide beta versions' toggle button: it existed solely to surface old Xenko (major < 3) packages; with those gone the button had no effect. Removes ShowBetaVersions, IsBeta, IsBetaVersion, the toggle button AXAML, and the ToggleShowBetaVersions/ToggleHideBetaVersions string resources - Update NugetStore.MainPackageIds to include Stride.GameStudio.Avalonia.Desktop - Update launcher README
Update all docs under docs/launcher/ to match the code changes: - cross-platform.md: remove Xenko.GameStudio.exe from Windows fallbacks - lifecycle.md: remove Bin/Windows/Xenko.GameStudio.exe legacy path - README.md: s/Stride\/Xenko versions/Stride versions/ - versions.md: remove 'Beta filter' section (ShowBetaVersions / IsBetaVersion), update StrideStoreAlternateVersionViewModel description, remove Xenko.GameStudio.exe mention, update RemoveUnusedPackages description - viewmodels.md: remove IsBeta from StrideVersionViewModel description, remove 'e.g. legacy Xenko ID' from StrideStoreAlternateVersionViewModel - port-status.md: remove ShowBetaVersions toggle bullet
Replace the verbose in-progress tracking doc with a focused reviewer reference. Drop all resolved regression history and done roadmap items. Keep only: - What's ported (brief feature list) - Deliberate changes table (so reviewers don't revert intentional choices) - Open items: .NET 10.0 probe decision + post-merge future work - Cross-references
|
@xen2 I removed references to Xenko and updated the related documentation (under docs/launcher). |
I wasn't sure if this was now ready for final review/test/merge? (otherwise feel free to mark as draft) |
@Kryptos-FR so was this ready for merging? |
|
@xen2 it's ready for final review and merging, assuming we fix the conflicts. |
Resolve launcher (Avalonia) vs WPF conflicts; take master's xunit runner; add Stride.Cli to launcher solution; implement multi-checkbox dialog for Avalonia.
|
@Kryptos-FR I did a merge from master, don't hesitate to check if anything looks wrong. |
|
@xen2 there are a couple of build issues. I will fix them. edit: fix the build issues in .cs code caused by the merge. However I now get a |
9c29b2e to
11559ae
Compare
|
@xen2 merged master and fixed the conflicts. I wondering if the Launcher should also be optionally installed through the Stride CLI ( |
I was also hesitating about that. I think first we want to decide how we distribute the launcher in the future:
|
|
Imo the Stride CLI is reasonable as a .NET tool, as it is going to be used by programmers used to work with the console. However, the launcher is more oriented towards the general public, and requiring someone that only wants to try Stride to go to the console to write commands is a barrier many people won't pass through. Another issue some people have (although it is minor imho) is that Stride is not "installed" in the usual sense, but downloaded and referenced from the NuGet cache. I've talked with several people that have used other engines and find this highly confusing (specially if they are not very versed in NuGet). |

PR Details
New Launcher using Avalonia instead of WPF. Still needs some love.
Related Issue
#1503
Types of changes
Checklist