mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fixes for 3.4.0.0
This commit is contained in:
parent
292bfb899f
commit
b19d1aa175
@ -1,11 +1,14 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
using Avalonia;
|
||||
using Avalonia.ReactiveUI;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Wabbajack.Common;
|
||||
using Wabbajack.Configuration;
|
||||
using Wabbajack.Downloaders.Http;
|
||||
using Wabbajack.DTOs;
|
||||
using Wabbajack.DTOs.JsonConverters;
|
||||
@ -16,7 +19,9 @@ using Wabbajack.Networking.Http;
|
||||
using Wabbajack.Networking.Http.Interfaces;
|
||||
using Wabbajack.Networking.NexusApi;
|
||||
using Wabbajack.Paths;
|
||||
using Wabbajack.Paths.IO;
|
||||
using Wabbajack.RateLimiter;
|
||||
using Wabbajack.Services.OSIntegrated;
|
||||
using Wabbajack.Services.OSIntegrated.TokenProviders;
|
||||
|
||||
namespace Wabbajack.Launcher;
|
||||
@ -36,6 +41,20 @@ internal class Program
|
||||
services.AddNexusApi();
|
||||
services.AddDTOConverters();
|
||||
services.AddDTOSerializer();
|
||||
|
||||
services.AddSingleton(s => new Services.OSIntegrated.Configuration
|
||||
{
|
||||
EncryptedDataLocation = KnownFolders.WabbajackAppLocal.Combine("encrypted"),
|
||||
ModListsDownloadLocation = KnownFolders.EntryPoint.Combine("downloaded_mod_lists"),
|
||||
SavedSettingsLocation = KnownFolders.WabbajackAppLocal.Combine("saved_settings"),
|
||||
LogLocation = KnownFolders.LauncherAwarePath.Combine("logs"),
|
||||
ImageCacheLocation = KnownFolders.WabbajackAppLocal.Combine("image_cache")
|
||||
});
|
||||
|
||||
services.AddSingleton<SettingsManager>();
|
||||
services.AddSingleton<ResourceSettingsManager>();
|
||||
services.AddSingleton<MainSettings>(s => GetAppSettings(s, MainSettings.SettingsFileName));
|
||||
|
||||
services.AddSingleton<MainWindowViewModel>();
|
||||
services.AddSingleton<HttpClient>();
|
||||
services.AddSingleton<ITokenProvider<NexusApiState>, NexusApiTokenProvider>();
|
||||
@ -62,6 +81,19 @@ internal class Program
|
||||
BuildAvaloniaApp()
|
||||
.StartWithClassicDesktopLifetime(args);
|
||||
}
|
||||
|
||||
private static MainSettings GetAppSettings(IServiceProvider provider, string name)
|
||||
{
|
||||
var settingsManager = provider.GetRequiredService<SettingsManager>();
|
||||
var settings = Task.Run(() => settingsManager.Load<MainSettings>(name)).Result;
|
||||
if (settings.Upgrade())
|
||||
{
|
||||
settingsManager.Save(MainSettings.SettingsFileName, settings).FireAndForget();
|
||||
}
|
||||
|
||||
return settings;
|
||||
}
|
||||
|
||||
public static IServiceProvider Services { get; set; }
|
||||
|
||||
// Avalonia configuration, don't remove; also used by visual designer.
|
||||
|
@ -6,10 +6,9 @@ SET /p VERSION=<VERSION.txt
|
||||
mkdir c:\tmp\publish-wj
|
||||
|
||||
dotnet clean
|
||||
dotnet restore
|
||||
dotnet publish Wabbajack.App.Wpf\Wabbajack.App.Wpf.csproj --runtime win-x64 --configuration Release /p:Platform=x64 -o c:\tmp\publish-wj\app /p:PublishReadyToRun=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained /p:DebugType=embedded
|
||||
dotnet publish Wabbajack.Launcher\Wabbajack.Launcher.csproj --runtime win-x64 --configuration Release /p:Platform=x64 -o c:\tmp\publish-wj\launcher /p:PublishReadyToRun=true /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained /p:DebugType=embedded
|
||||
dotnet publish c:\oss\Wabbajack\Wabbajack.CLI\Wabbajack.CLI.csproj --runtime win-x64 --configuration Release /p:Platform=x64 -o c:\tmp\publish-wj\app --self-contained /p:DebugType=embedded
|
||||
dotnet publish Wabbajack.App.Wpf\Wabbajack.App.Wpf.csproj --framework "net8.0-windows" --runtime win-x64 --configuration Release /p:Platform=x64 -o c:\tmp\publish-wj\app /p:PublishReadyToRun=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained /p:DebugType=embedded
|
||||
dotnet publish Wabbajack.Launcher\Wabbajack.Launcher.csproj --framework "net8.0-windows" --runtime win-x64 --configuration Release /p:Platform=x64 -o c:\tmp\publish-wj\launcher /p:PublishSingleFile=true /p:PublishReadyToRun=true /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained /p:DebugType=embedded
|
||||
dotnet publish c:\oss\Wabbajack\Wabbajack.CLI\Wabbajack.CLI.csproj --framework "net8.0-windows" --runtime win-x64 --configuration Release /p:Platform=x64 -o c:\tmp\publish-wj\app --self-contained /p:DebugType=embedded
|
||||
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /fd sha256 /tr http://ts.ssl.com /td sha256 /sha1 8c26a8e0bf3e70eb89721cc4d86a87137153ccba c:\tmp\publish-wj\app\Wabbajack.exe
|
||||
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /fd sha256 /tr http://ts.ssl.com /td sha256 /sha1 8c26a8e0bf3e70eb89721cc4d86a87137153ccba c:\tmp\publish-wj\launcher\Wabbajack.exe
|
||||
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /fd sha256 /tr http://ts.ssl.com /td sha256 /sha1 8c26a8e0bf3e70eb89721cc4d86a87137153ccba c:\tmp\publish-wj\app\wabbajack-cli.exe
|
||||
|
Loading…
Reference in New Issue
Block a user