Skip to content

Cross-platform Stride.Launcher#3027

Open
Kryptos-FR wants to merge 47 commits into
masterfrom
feature/launcher-avalonia-cherrypick
Open

Cross-platform Stride.Launcher#3027
Kryptos-FR wants to merge 47 commits into
masterfrom
feature/launcher-avalonia-cherrypick

Conversation

@Kryptos-FR

@Kryptos-FR Kryptos-FR commented Dec 30, 2025

Copy link
Copy Markdown
Member

PR Details

New Launcher using Avalonia instead of WPF. Still needs some love.

Related Issue

#1503

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

@Kryptos-FR Kryptos-FR added the area-Launcher Stride Launcher label Dec 30, 2025
@Kryptos-FR Kryptos-FR force-pushed the feature/launcher-avalonia-cherrypick branch 3 times, most recently from 7b72320 to 03f94a4 Compare December 30, 2025 18:49
/// 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;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: Could this property not be used directly?

@Kryptos-FR Kryptos-FR Jan 5, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: This method seems to be unused. It would be great to integrate with RunNewApp somehow

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used by the Avalonia plugin. It's needed for the designer.

@Kryptos-FR Kryptos-FR force-pushed the feature/launcher-avalonia-cherrypick branch from 03f94a4 to e96d938 Compare January 7, 2026 20:45
@Kryptos-FR

Kryptos-FR commented Jan 8, 2026

Copy link
Copy Markdown
Member Author

@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.

@Jklawreszuk

Jklawreszuk commented Jan 13, 2026

Copy link
Copy Markdown
Collaborator

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:

  • The ‘See release notes’ feature does not work - also an empty button is displayed. A hint that might be helpful - MarkdownScrollViewer.Markdown property is always null.
  • It would be nice to implement a custom title bar like in the original, but this can be done in a separate PR.

Other than that I didnt notice nothing unusual 😅

@Jklawreszuk

Copy link
Copy Markdown
Collaborator

@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?

@Kryptos-FR

Copy link
Copy Markdown
Member Author

I don't remember if it does work. I assume since it's restoring packages it should.

I guess we'll know soon.

@Kryptos-FR Kryptos-FR force-pushed the feature/launcher-avalonia-cherrypick branch from e96d938 to e161999 Compare April 7, 2026 20:55
@xen2 xen2 force-pushed the master branch 2 times, most recently from ab329f3 to 482bd28 Compare April 16, 2026 07:56
@Kryptos-FR Kryptos-FR force-pushed the feature/launcher-avalonia-cherrypick branch from e161999 to 4950387 Compare April 21, 2026 15:19
@Kryptos-FR Kryptos-FR marked this pull request as ready for review April 21, 2026 15:20
@Jklawreszuk

Copy link
Copy Markdown
Collaborator

@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
image

Kryptos-FR and others added 6 commits April 25, 2026 07:31
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.
@Kryptos-FR Kryptos-FR force-pushed the feature/launcher-avalonia-cherrypick branch from f5ba39f to 9f482bb Compare April 27, 2026 21:22
Kryptos-FR added 6 commits May 2, 2026 22:54
- InstallLatestVersion: add missing return after 'already in progress'
  dialog so DownloadCommand.Execute() is not called while a download is
  already running (MainViewModel.cs)

- AnnouncementViewModel: clear MainViewModel.Announcement when Validated
  becomes true so the overlay actually slides out when the user clicks OK;
  the Announcement setter now subscribes/unsubscribes PropertyChanged on
  the incoming view model (MainViewModel.cs)

- SelfUpdater: gate the force-reinstall probe inside
  if (OperatingSystem.IsWindows()); on Linux the probe was silently
  downloading StrideSetup.exe and then crashing at Process.Start
  (SelfUpdater.cs)

docs/launcher/port-status.md updated with struck-through entries for all
three fixes and the Phase 4 self-update item revised accordingly.
The commented-out RevokeAllPrivacyPolicy() call in UninstallAsync was a
placeholder from the WPF-to-Avalonia port. Telemetry and the privacy-policy
consent flow were permanently removed when the port started, so any residual
registry keys or settings files left by the old WPF launcher are harmless
orphans that do not need to be scrubbed.

- Remove the commented line and its FIXME: xplat-launcher marker (Launcher.cs)
- Update cross-platform.md: drop the 'keep it for now' note
- Update port-status.md: mark Phase 2 item 4 closed; update the
  Deliberate changes table row for privacy policy
…pleted is intentional

MinimalApp.OnFrameworkInitializationCompleted is empty by design: the
crash-report and already-running-instance dialog paths in Launcher.cs
each construct and wire their window directly inside their own AppMain
callback, so no framework-level initialisation (no MainViewModel, no
markdown pipeline, no services) is needed.

- Update 'Features removed without a replacement' section to explain the
  design rather than flag it as a concern
- Close Phase 2 item 3 ('Review MinimalApp paths')
… 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)
@xen2

xen2 commented May 15, 2026

Copy link
Copy Markdown
Member

Looking at PR desc:

Still needs some love.

I wasn't sure, Is it ready for review or still WIP?
Otherwise, let me know when it is!

@Kryptos-FR

Copy link
Copy Markdown
Member Author

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 Jklawreszuk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@Kryptos-FR

Copy link
Copy Markdown
Member Author

I'll admit I didn't try to install any Xenko versions. I'll look at it.

@Kryptos-FR

Copy link
Copy Markdown
Member Author

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

@xen2

xen2 commented May 24, 2026

Copy link
Copy Markdown
Member

I would say, not necessary anymore.
We can get rid of those last vestige from the codebase.

- 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
@Kryptos-FR

Copy link
Copy Markdown
Member Author

@xen2 I removed references to Xenko and updated the related documentation (under docs/launcher).

@xen2

xen2 commented Jun 3, 2026

Copy link
Copy Markdown
Member

Still needs some love.

I wasn't sure if this was now ready for final review/test/merge? (otherwise feel free to mark as draft)

@xen2

xen2 commented Jun 25, 2026

Copy link
Copy Markdown
Member

Still needs some love.

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?

@Kryptos-FR

Copy link
Copy Markdown
Member Author

@xen2 it's ready for final review and merging, assuming we fix the conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Launcher Stride Launcher

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants