- add: DotNet runtime download

This commit is contained in:
2025-06-15 13:48:56 +03:00
parent 30a526a746
commit 22a6b3157d
9 changed files with 236 additions and 46 deletions

View File

@@ -1,3 +1,4 @@
using System.Collections.Generic;
using Nebula.Launcher.Models;
using Nebula.Launcher.ViewModels.Pages;
using Nebula.Shared.Services;
@@ -32,4 +33,6 @@ public static class LauncherConVar
public static readonly ConVar<string> CurrentLang = ConVarBuilder.Build<string>("launcher.language", "en-US");
public static readonly ConVar<string> ILSpyUrl = ConVarBuilder.Build<string>("decompiler.url",
"https://github.com/icsharpcode/ILSpy/releases/download/v9.0/ILSpy_binaries_9.0.0.7889-x64.zip");
}

View File

@@ -39,6 +39,11 @@ public sealed partial class ContentBrowserViewModel : ViewModelBase, IContentHol
public void OnBackEnter()
{
if (CurrentEntry.Parent is null)
{
SetHubRoot();
return;
}
CurrentEntry.Parent?.GoCurrent();
}
@@ -116,6 +121,8 @@ public sealed partial class ContentBrowserViewModel : ViewModelBase, IContentHol
public void SetHubRoot()
{
ServerText = string.Empty;
SearchText = string.Empty;
var root = ViewHelperService.GetViewModel<ServerListContentEntry>();
root.InitHubList(this);
CurrentEntry = root;

View File

@@ -55,6 +55,7 @@ public partial class ServerEntryModelView : ViewModelBase, IFilterConsumer
[GenerateProperty] private RestService RestService { get; } = default!;
[GenerateProperty] private MainViewModel MainViewModel { get; } = default!;
[GenerateProperty] private FavoriteServerListProvider FavoriteServerListProvider { get; } = default!;
[GenerateProperty] private DotnetResolverService DotnetResolverService { get; } = default!;
public ServerStatus Status { get; private set; } =
new(
@@ -210,10 +211,10 @@ public partial class ServerEntryModelView : ViewModelBase, IFilterConsumer
await RunnerService.PrepareRun(buildInfo, loadingContext, CancellationService.Token);
var path = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location);
Process = Process.Start(new ProcessStartInfo
{
FileName = "dotnet.exe",
FileName = await DotnetResolverService.EnsureDotnet(),
Arguments = Path.Join(path, "Nebula.Runner.dll"),
Environment =
{