- tweak: change mirror
This commit is contained in:
1
.idea/.idea.Nebula/.idea/vcs.xml
generated
1
.idea/.idea.Nebula/.idea/vcs.xml
generated
@@ -2,5 +2,6 @@
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/Robust.LoaderApi" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -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<ServerHubRecord[]> Hub = ConVarBuilder.Build<ServerHubRecord[]>("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<string> CurrentLang = ConVarBuilder.Build<string>("launcher.language", CultureInfo.CurrentCulture.Name);
|
||||
public static readonly ConVar<string> ILSpyUrl = ConVarBuilder.Build<string>("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<string> ILSpyVersion = ConVarBuilder.Build<string>("dotnet.version", "10");
|
||||
}
|
||||
@@ -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<LoadingContextViewModel>();
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -8,14 +8,14 @@ public static class CurrentConVar
|
||||
{
|
||||
public static readonly ConVar<string[]> EngineManifestUrl =
|
||||
ConVarBuilder.Build<string[]>("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<string[]> EngineModuleManifestUrl =
|
||||
ConVarBuilder.Build<string[]>("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"
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user