From 63a4b39aa9cb34bd978e7813dd33c76eb06e9d01 Mon Sep 17 00:00:00 2001 From: CinkaFox Date: Wed, 8 Apr 2026 21:58:51 +0300 Subject: [PATCH] - tweak: change mirror --- .idea/.idea.Nebula/.idea/vcs.xml | 1 + Nebula.Launcher/LauncherConVar.cs | 6 +++--- Nebula.Launcher/Services/DecompilerService.cs | 13 +++++++++++-- Nebula.Shared/CurrentConVar.cs | 4 ++-- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.idea/.idea.Nebula/.idea/vcs.xml b/.idea/.idea.Nebula/.idea/vcs.xml index 94a25f7..f67c618 100644 --- a/.idea/.idea.Nebula/.idea/vcs.xml +++ b/.idea/.idea.Nebula/.idea/vcs.xml @@ -2,5 +2,6 @@ + \ No newline at end of file diff --git a/Nebula.Launcher/LauncherConVar.cs b/Nebula.Launcher/LauncherConVar.cs index 488f26c..37541d5 100644 --- a/Nebula.Launcher/LauncherConVar.cs +++ b/Nebula.Launcher/LauncherConVar.cs @@ -36,7 +36,7 @@ public static class LauncherConVar new AuthServerCredentials( "WizDen", [ - "https://harpy.durenko.tatar/auth-api/", + "https://feline.durenko.tatar/auth-api/", "https://auth.spacestation14.com/", "https://auth.fallback.spacestation14.com/", ]), @@ -48,13 +48,13 @@ public static class LauncherConVar ]); public static readonly ConVar Hub = ConVarBuilder.Build("launcher.hub.v2", [ - new ServerHubRecord("WizDen", "https://harpy.durenko.tatar/hub-api/api/servers"), + new ServerHubRecord("WizDen", "https://feline.durenko.tatar/hub-api/api/servers"), new ServerHubRecord("AltHub","https://hub.singularity14.co.uk/api/servers") ]); public static readonly ConVar CurrentLang = ConVarBuilder.Build("launcher.language", CultureInfo.CurrentCulture.Name); public static readonly ConVar ILSpyUrl = ConVarBuilder.Build("decompiler.url", - "https://github.com/icsharpcode/ILSpy/releases/download/v10.0-preview2/ILSpy_selfcontained_10.0.0.8282-preview2-x64.zip"); + "https://feline.durenko.tatar/ILSpy_selfcontained_10.0.0.8330-x64.zip"); public static readonly ConVar ILSpyVersion = ConVarBuilder.Build("dotnet.version", "10"); } \ No newline at end of file diff --git a/Nebula.Launcher/Services/DecompilerService.cs b/Nebula.Launcher/Services/DecompilerService.cs index 43902b5..34f3855 100644 --- a/Nebula.Launcher/Services/DecompilerService.cs +++ b/Nebula.Launcher/Services/DecompilerService.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.IO.Compression; +using System.IO.Pipelines; using System.Linq; using System.Net.Http; using System.Threading; @@ -15,6 +16,7 @@ using Nebula.Shared.FileApis.Interfaces; using Nebula.Shared.Models; using Nebula.Shared.Services; using Nebula.Shared.Services.Logging; +using Nebula.Shared.Utils; using Nebula.SharedModels; namespace Nebula.Launcher.Services; @@ -91,10 +93,17 @@ public sealed partial class DecompilerService private async Task Download(){ using var loading = ViewHelperService.GetViewModel(); loading.LoadingName = "Download ILSpy"; - loading.CreateLoadingContext().SetJobsCount(1); + var context = loading.CreateLoadingContext(); PopupMessageService.Popup(loading); using var response = await _httpClient.GetAsync(ConfigurationService.GetConfigValue(LauncherConVar.ILSpyUrl)); - using var zipArchive = new ZipArchive(await response.Content.ReadAsStreamAsync()); + Console.WriteLine(response.StatusCode); + context.SetJobsCount(response.Content.Headers.ContentLength ?? 1000); + + using var stream = await response.Content.ReadAsStreamAsync(); + using var memoryStream = new MemoryStream(); + stream.CopyTo(memoryStream, context); + + using var zipArchive = new ZipArchive(memoryStream); Directory.CreateDirectory(FullPath); zipArchive.ExtractToDirectory(FullPath); } diff --git a/Nebula.Shared/CurrentConVar.cs b/Nebula.Shared/CurrentConVar.cs index ca6e7b2..bcf6809 100644 --- a/Nebula.Shared/CurrentConVar.cs +++ b/Nebula.Shared/CurrentConVar.cs @@ -8,14 +8,14 @@ public static class CurrentConVar { public static readonly ConVar EngineManifestUrl = ConVarBuilder.Build("engine.manifestUrl", [ - "https://harpy.durenko.tatar/manifests/manifest", + "https://feline.durenko.tatar/engine-cdn/manifest.json", "https://robust-builds.fallback.cdn.spacestation14.com/manifest.json" ]); public static readonly ConVar EngineModuleManifestUrl = ConVarBuilder.Build("engine.moduleManifestUrl", [ - "https://harpy.durenko.tatar/manifests/modules", + "https://feline.durenko.tatar/engine-cdn/modules.json", "https://robust-builds.fallback.cdn.spacestation14.com/modules.json" ]);