- tweak: dotnet 10 update
This commit is contained in:
@@ -54,5 +54,7 @@ public static class LauncherConVar
|
||||
|
||||
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/v9.0/ILSpy_binaries_9.0.0.7889-x64.zip");
|
||||
"https://github.com/icsharpcode/ILSpy/releases/download/v10.0-preview2/ILSpy_selfcontained_10.0.0.8282-preview2-x64.zip");
|
||||
|
||||
public static readonly ConVar<string> ILSpyVersion = ConVarBuilder.Build<string>("dotnet.version", "10");
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
@@ -15,24 +14,24 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AsyncImageLoader.Avalonia" Version="3.3.0"/>
|
||||
<PackageReference Include="Avalonia" Version="11.2.1"/>
|
||||
<PackageReference Include="Avalonia.Desktop" Version="11.2.1"/>
|
||||
<PackageReference Include="Avalonia.Svg.Skia" Version="11.2.0.2" />
|
||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.1"/>
|
||||
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.2.1"/>
|
||||
<PackageReference Include="AsyncImageLoader.Avalonia"/>
|
||||
<PackageReference Include="Avalonia"/>
|
||||
<PackageReference Include="Avalonia.Desktop"/>
|
||||
<PackageReference Include="Avalonia.Svg.Skia"/>
|
||||
<PackageReference Include="Avalonia.Themes.Fluent"/>
|
||||
<PackageReference Include="Avalonia.Fonts.Inter"/>
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<PackageReference Include="Avalonia.Diagnostics" Version="11.2.1">
|
||||
<PackageReference Include="Avalonia.Diagnostics">
|
||||
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
|
||||
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1"/>
|
||||
<PackageReference Include="Fluent.Net" Version="1.0.63" />
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0"/>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0"/>
|
||||
<PackageReference Include="libsodium" Version="1.0.20"/>
|
||||
<PackageReference Include="Robust.Natives" Version="0.2.3" />
|
||||
<PackageReference Include="Avalonia.Controls.ItemsRepeater" Version="11.1.5" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm"/>
|
||||
<PackageReference Include="Fluent.Net"/>
|
||||
<PackageReference Include="JetBrains.Annotations"/>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection"/>
|
||||
<PackageReference Include="libsodium"/>
|
||||
<PackageReference Include="Robust.Natives"/>
|
||||
<PackageReference Include="Avalonia.Controls.ItemsRepeater"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="BuildCheck" AfterTargets="AfterBuild">
|
||||
|
||||
@@ -29,16 +29,16 @@ public sealed partial class DecompilerService
|
||||
[GenerateProperty] private EngineService EngineService {get;}
|
||||
[GenerateProperty] private DebugService DebugService {get;}
|
||||
|
||||
private HttpClient _httpClient = new HttpClient();
|
||||
private readonly HttpClient _httpClient = new();
|
||||
private ILogger _logger;
|
||||
|
||||
private static string fullPath = Path.Join(FileService.RootPath,"ILSpy");
|
||||
private static string executePath = Path.Join(fullPath, "ILSpy.exe");
|
||||
private string FullPath => Path.Join(FileService.RootPath,$"ILSpy.{ConfigurationService.GetConfigValue(LauncherConVar.ILSpyVersion)}");
|
||||
private string ExecutePath => Path.Join(FullPath, "ILSpy.exe");
|
||||
|
||||
public async void OpenDecompiler(string arguments){
|
||||
await EnsureILSpy();
|
||||
var startInfo = new ProcessStartInfo(){
|
||||
FileName = executePath,
|
||||
FileName = ExecutePath,
|
||||
Arguments = arguments
|
||||
};
|
||||
Process.Start(startInfo);
|
||||
@@ -84,7 +84,7 @@ public sealed partial class DecompilerService
|
||||
private void InitialiseInDesignMode(){}
|
||||
|
||||
private async Task EnsureILSpy(){
|
||||
if(!Directory.Exists(fullPath))
|
||||
if(!Directory.Exists(FullPath))
|
||||
await Download();
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public sealed partial class DecompilerService
|
||||
PopupMessageService.Popup(loading);
|
||||
using var response = await _httpClient.GetAsync(ConfigurationService.GetConfigValue(LauncherConVar.ILSpyUrl));
|
||||
using var zipArchive = new ZipArchive(await response.Content.ReadAsStreamAsync());
|
||||
Directory.CreateDirectory(fullPath);
|
||||
zipArchive.ExtractToDirectory(fullPath);
|
||||
Directory.CreateDirectory(FullPath);
|
||||
zipArchive.ExtractToDirectory(FullPath);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user