|
| 1 | +# Stride Launcher — Overview |
| 2 | + |
| 3 | +The Stride Launcher is the entry point end users run after installing Stride. It is an Avalonia MVVM application that manages the locally installed Stride versions (download, update, uninstall), exposes recent projects and VSIX extensions for Visual Studio, surfaces release notes, news and documentation, and finally starts the selected version of Game Studio. |
| 4 | + |
| 5 | +The launcher's sources live in [sources/launcher/](../../sources/launcher/). The application itself is [Stride.Launcher](../../sources/launcher/Stride.Launcher/), built against `net10.0` with RIDs `linux-x64` and `win-x64`. It is distributed as a NuGet package (`Stride.Launcher`) and wrapped by an Advanced Installer setup on Windows. |
| 6 | + |
| 7 | +## Big picture |
| 8 | + |
| 9 | +```mermaid |
| 10 | +flowchart TD |
| 11 | + User["User"] |
| 12 | + Setup["StrideSetup.exe<br/>Advanced Installer bundle<br/>sources/launcher/Setup/"] |
| 13 | + Prereq["launcher-prerequisites.exe<br/>sources/launcher/Prerequisites/"] |
| 14 | + Exe["Stride.Launcher.exe<br/>Avalonia MVVM app<br/>sources/launcher/Stride.Launcher/"] |
| 15 | + NuGet["NuGet feed<br/>(packages.stride3d.net, nuget.org)"] |
| 16 | + Store["NugetStore<br/>sources/assets/Stride.Core.Packages/"] |
| 17 | + GS["Stride.GameStudio<br/>(selected version)"] |
| 18 | +
|
| 19 | + User -- "runs" --> Setup |
| 20 | + Setup -- "installs" --> Exe |
| 21 | + Setup -- "installs" --> Prereq |
| 22 | + Exe -- "uses" --> Store |
| 23 | + Store -- "fetches packages" --> NuGet |
| 24 | + Exe -- "starts" --> GS |
| 25 | + GS -. "optional: /LauncherWindowHandle" .-> Exe |
| 26 | +``` |
| 27 | + |
| 28 | +The launcher has three responsibilities: |
| 29 | + |
| 30 | +1. **Self-update.** On start, check NuGet for a newer `Stride.Launcher` package and optionally replace the current executable before the UI is shown. See [self-update.md](self-update.md). |
| 31 | +2. **Version management.** List available Stride versions, download/install/uninstall them through `NugetStore`, and track a single "active" version. See [versions.md](versions.md). |
| 32 | +3. **Launch Game Studio.** Locate the main executable of the active version, start it with the right arguments, and optionally auto-close when Game Studio signals back via `/LauncherWindowHandle`. See [lifecycle.md](lifecycle.md). |
| 33 | + |
| 34 | +## Projects |
| 35 | + |
| 36 | +The launcher codebase is small and self-contained under [sources/launcher/](../../sources/launcher/): |
| 37 | + |
| 38 | +| Directory | Role | |
| 39 | +|---|---| |
| 40 | +| [Stride.Launcher/](../../sources/launcher/Stride.Launcher/) | Avalonia MVVM application (`Stride.Launcher.exe`) | |
| 41 | +| [Prerequisites/](../../sources/launcher/Prerequisites/) | Advanced Installer project producing `launcher-prerequisites.exe` (Windows only) | |
| 42 | +| [Setup/](../../sources/launcher/Setup/) | Advanced Installer project producing the user-facing `StrideSetup.exe` bundle (Windows only) | |
| 43 | + |
| 44 | +The launcher depends on two Stride libraries: |
| 45 | + |
| 46 | +- [Stride.Core.Packages](../../sources/assets/Stride.Core.Packages/) — the `NugetStore` abstraction used to talk to NuGet feeds. |
| 47 | +- [Stride.Core.Presentation.Avalonia](../../sources/presentation/Stride.Core.Presentation.Avalonia/) — the shared Avalonia MVVM framework (dispatcher, dialogs, markdown viewer integration, etc.). The WPF equivalent in the editor is `Stride.Core.Presentation.Wpf`. |
| 48 | + |
| 49 | +A handful of files from the editor are linked in directly (not as project references) to keep the launcher dependency graph minimal: |
| 50 | + |
| 51 | +- `EditorPath.cs` — resolves user data paths (`LauncherSettings.conf`, `launcher.lock`, MRU, etc.). |
| 52 | +- `PackageSessionHelper.Solution.cs` — parses `.sln` files to discover the Stride version used by a recent project. |
| 53 | +- The `Stride.Core.MostRecentlyUsedFiles` shared project — shared MRU list infrastructure. |
| 54 | + |
| 55 | +See [projects.md](projects.md) for the full layout and each file's role. |
| 56 | + |
| 57 | +## When you need these systems |
| 58 | + |
| 59 | +> **Decision tree:** |
| 60 | +> |
| 61 | +> - Adding a new UI page/tab or a new version-list entry kind? |
| 62 | +> → **A new ViewModel + View under Stride.Launcher.** See [viewmodels.md](viewmodels.md) and [views.md](views.md). |
| 63 | +> |
| 64 | +> - Changing how a Stride version is downloaded, updated, or uninstalled? |
| 65 | +> → **`StrideVersionViewModel` and `PackageVersionViewModel`** — they drive `NugetStore`. See [versions.md](versions.md). |
| 66 | +> |
| 67 | +> - Changing how the launcher updates itself? |
| 68 | +> → **`SelfUpdater`** and the self-update window. See [self-update.md](self-update.md). |
| 69 | +> |
| 70 | +> - Adding a new command-line argument or action? |
| 71 | +> → **`LauncherArguments` + `Launcher.ProcessArguments`.** See [lifecycle.md](lifecycle.md#command-line-arguments). |
| 72 | +> |
| 73 | +> - Persisting a new user preference? |
| 74 | +> → **`LauncherSettings`** (launcher-owned) or **`GameStudioSettings`** (shared with Game Studio). See [settings.md](settings.md). |
| 75 | +> |
| 76 | +> - Adding a new localized string or URL? |
| 77 | +> → **`Assets/Localization/Strings.resx` / `Urls.resx`** (+ `.ja-JP` variants). See [localization.md](localization.md). |
| 78 | +> |
| 79 | +> - Working on the Windows installer or prerequisites bundle? |
| 80 | +> → **Advanced Installer projects under `Prerequisites/` and `Setup/`.** See [packaging.md](packaging.md). |
| 81 | +> |
| 82 | +> - Running/debugging on Linux and something behaves differently? |
| 83 | +> → **Platform-specific code paths.** See [cross-platform.md](cross-platform.md). |
| 84 | +
|
| 85 | +## Spoke files |
| 86 | + |
| 87 | +| File | Covers | |
| 88 | +|---|---| |
| 89 | +| [projects.md](projects.md) | Directory and file layout, external dependencies, linked files | |
| 90 | +| [lifecycle.md](lifecycle.md) | Entry point, single-instance mutex, command-line arguments, error codes, crash reporting | |
| 91 | +| [viewmodels.md](viewmodels.md) | `MainViewModel`, version view models, recent projects, news/docs/announcement view models | |
| 92 | +| [views.md](views.md) | XAML views, windows, converters, markdown viewer integration | |
| 93 | +| [versions.md](versions.md) | Version discovery, install/uninstall flow through `NugetStore`, framework selection, beta filter, dev redirects | |
| 94 | +| [self-update.md](self-update.md) | Launcher self-update: NuGet update probe, force-reinstall, file swap, restart | |
| 95 | +| [settings.md](settings.md) | `LauncherSettings`, `GameStudioSettings`, config file locations | |
| 96 | +| [localization.md](localization.md) | `Strings.resx` / `Urls.resx`, designer classes, adding a new language | |
| 97 | +| [packaging.md](packaging.md) | `Stride.Launcher.nuspec`, Advanced Installer projects, `StrideSetup.exe`, versioning | |
| 98 | +| [cross-platform.md](cross-platform.md) | Windows-only code paths, Registry usage, Linux/macOS porting status (xplat-launcher) | |
| 99 | +| [port-status.md](port-status.md) | Full delta vs the WPF launcher on `master` — including silent regressions — and a phased roadmap to close the gap | |
0 commit comments