mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
92 Errors left
This commit is contained in:
parent
d56c94c043
commit
4a22f4a739
@ -137,7 +137,7 @@ namespace Wabbajack
|
||||
var folder = KnownFolders.WabbajackAppLocal.Combine("ModListImages");
|
||||
if (!folder.DirectoryExists()) folder.CreateDirectory();
|
||||
|
||||
var path = folder.Combine(Encoding.UTF8.GetBytes(url).Hash().ToHex());
|
||||
var path = folder.Combine((await Encoding.UTF8.GetBytes(url).Hash()).ToHex());
|
||||
await path.WriteAllBytesAsync(data);
|
||||
}
|
||||
|
||||
@ -146,7 +146,7 @@ namespace Wabbajack
|
||||
var folder = KnownFolders.WabbajackAppLocal.Combine("ModListImages");
|
||||
if (!folder.DirectoryExists()) folder.CreateDirectory();
|
||||
|
||||
var path = folder.Combine(Encoding.UTF8.GetBytes(uri).Hash().ToHex());
|
||||
var path = folder.Combine((await Encoding.UTF8.GetBytes(uri).Hash()).ToHex());
|
||||
return path.FileExists() ? (true, new MemoryStream(await path.ReadAllBytesAsync())) : (false, default);
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@ using System.Reactive.Disposables;
|
||||
using System.Reactive.Linq;
|
||||
using System.Windows.Media.Imaging;
|
||||
using DynamicData;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Wabbajack.Compiler;
|
||||
using Wabbajack.Lib.Extensions;
|
||||
using Wabbajack.Lib.Interventions;
|
||||
@ -63,7 +64,7 @@ namespace Wabbajack
|
||||
private readonly ObservableAsPropertyHelper<(int CurrentCPUs, int DesiredCPUs)> _CurrentCpuCount;
|
||||
public (int CurrentCPUs, int DesiredCPUs) CurrentCpuCount => _CurrentCpuCount.Value;
|
||||
|
||||
public CompilerVM(MainWindowVM mainWindowVM) : base(mainWindowVM)
|
||||
public CompilerVM(ILogger<CompilerVM> logger, MainWindowVM mainWindowVM) : base(logger, mainWindowVM)
|
||||
{
|
||||
MWVM = mainWindowVM;
|
||||
|
||||
@ -94,7 +95,7 @@ namespace Wabbajack
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ModManager.MO2:
|
||||
case ModManager.Standard:
|
||||
return new MO2CompilerVM(this);
|
||||
default:
|
||||
return null;
|
||||
@ -143,6 +144,7 @@ namespace Wabbajack
|
||||
resultSelector: (i, b) => i && b)
|
||||
.ObserveOnGuiThread());
|
||||
|
||||
/* TODO
|
||||
UIUtils.BindCpuStatus(
|
||||
this.WhenAny(x => x.Compiler.ActiveCompilation)
|
||||
.SelectMany(c => c?.QueueStatus ?? Observable.Empty<CPUStatus>()),
|
||||
@ -262,6 +264,8 @@ namespace Wabbajack
|
||||
_CurrentCpuCount = this.WhenAny(x => x.Compiler.ActiveCompilation.Queue.CurrentCpuCount)
|
||||
.Switch()
|
||||
.ToGuiProperty(this, nameof(CurrentCpuCount));
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ namespace Wabbajack
|
||||
public ModlistSettingsEditorVM ModlistSettings => _modlistSettings.Value;
|
||||
|
||||
[Reactive]
|
||||
public StatusUpdateTracker StatusTracker { get; private set; }
|
||||
public object StatusTracker { get; private set; }
|
||||
|
||||
public IObservable<bool> CanCompile { get; }
|
||||
|
||||
@ -69,6 +69,7 @@ namespace Wabbajack
|
||||
{
|
||||
try
|
||||
{
|
||||
/* TODO
|
||||
if (loc.FileName == Consts.ModListTxt)
|
||||
{
|
||||
var profileFolder = loc.Parent;
|
||||
@ -79,6 +80,8 @@ namespace Wabbajack
|
||||
{
|
||||
return loc.Parent;
|
||||
}
|
||||
*/
|
||||
return loc.Parent;
|
||||
|
||||
return default;
|
||||
}
|
||||
@ -91,6 +94,7 @@ namespace Wabbajack
|
||||
_moProfile = this.WhenAny(x => x.ModListLocation.TargetPath)
|
||||
.Select(loc =>
|
||||
{
|
||||
/* TODO
|
||||
try
|
||||
{
|
||||
if (loc.FileName == Consts.NativeSettingsJson)
|
||||
@ -104,6 +108,8 @@ namespace Wabbajack
|
||||
{
|
||||
return null;
|
||||
}
|
||||
*/
|
||||
return (string)loc.Parent.FileName;
|
||||
})
|
||||
.ToGuiProperty(this, nameof(MOProfile));
|
||||
|
||||
@ -125,11 +131,14 @@ namespace Wabbajack
|
||||
.Select(u =>
|
||||
{
|
||||
if (u.State.Failed) return null;
|
||||
/* TODO
|
||||
var modlistSettings = _settings.ModlistSettings.TryCreate(u.Path);
|
||||
return new ModlistSettingsEditorVM(modlistSettings)
|
||||
{
|
||||
ModListName = MOProfile
|
||||
};
|
||||
*/
|
||||
return new ModlistSettingsEditorVM(null);
|
||||
})
|
||||
// Interject and save old while loading new
|
||||
.Pairwise()
|
||||
|
@ -1,10 +1,8 @@
|
||||
using System;
|
||||
using ReactiveUI;
|
||||
using System.Linq;
|
||||
using System.Reactive.Disposables;
|
||||
using System.Reactive.Linq;
|
||||
using System.Windows.Media.Imaging;
|
||||
using Wabbajack.Lib;
|
||||
using ReactiveUI.Fody.Helpers;
|
||||
using System.Windows.Media;
|
||||
using DynamicData;
|
||||
@ -15,13 +13,13 @@ using Microsoft.Extensions.Logging;
|
||||
using Microsoft.WindowsAPICodePack.Dialogs;
|
||||
using Microsoft.WindowsAPICodePack.Shell;
|
||||
using Wabbajack.DTOs.JsonConverters;
|
||||
using Wabbajack.Installer;
|
||||
using Wabbajack.Lib.Extensions;
|
||||
using Wabbajack.Lib.Interventions;
|
||||
using Wabbajack.Paths;
|
||||
using Wabbajack.RateLimiter;
|
||||
using Wabbajack.View_Models;
|
||||
using Wabbajack.Paths.IO;
|
||||
using Consts = Wabbajack.Lib.Consts;
|
||||
using KnownFolders = Wabbajack.Paths.IO.KnownFolders;
|
||||
|
||||
namespace Wabbajack;
|
||||
|
||||
@ -103,8 +101,9 @@ public class InstallerVM : BackNavigatingVM, IBackNavigatingVM, ICpuStatusVM
|
||||
public InstallerVM(ILogger<InstallerVM> logger, MainWindowVM mainWindowVM, ServiceProvider serviceProvider) : base(logger, mainWindowVM)
|
||||
{
|
||||
_logger = logger;
|
||||
|
||||
/* TODO
|
||||
var downloadsPath = KnownFolders.Downloads.Path;
|
||||
/* TODO
|
||||
var skyDrivePath = KnownFolders.SkyDrive.Path;
|
||||
|
||||
if (downloadsPath != null && AbsolutePath.EntryPoint.IsChildOf(new AbsolutePath(downloadsPath)))
|
||||
|
@ -10,6 +10,7 @@ using System.Threading.Tasks;
|
||||
using ReactiveUI;
|
||||
using ReactiveUI.Fody.Helpers;
|
||||
using Wabbajack.Common;
|
||||
using Wabbajack.Installer;
|
||||
using Wabbajack.Lib;
|
||||
using Wabbajack.Lib.Interventions;
|
||||
using Wabbajack.Util;
|
||||
@ -24,7 +25,7 @@ namespace Wabbajack
|
||||
public ErrorResponse CanInstall => _CanInstall.Value;
|
||||
|
||||
[Reactive]
|
||||
public AInstaller ActiveInstallation { get; private set; }
|
||||
public IInstaller ActiveInstallation { get; private set; }
|
||||
|
||||
private readonly ObservableAsPropertyHelper<Mo2ModlistInstallationSettings> _CurrentSettings;
|
||||
public Mo2ModlistInstallationSettings CurrentSettings => _CurrentSettings.Value;
|
||||
@ -56,6 +57,7 @@ namespace Wabbajack
|
||||
PathType = FilePickerVM.PathTypeOptions.Folder,
|
||||
PromptTitle = "Select a location for MO2 downloads",
|
||||
};
|
||||
/* TODO
|
||||
DownloadLocation.AdditionalError = this.WhenAny(x => x.DownloadLocation.TargetPath)
|
||||
.Select(x => Utils.IsDirectoryPathValid(x));
|
||||
Location.AdditionalError = Observable.CombineLatest(
|
||||
@ -138,6 +140,7 @@ namespace Wabbajack
|
||||
}
|
||||
})
|
||||
.DisposeWith(CompositeDisposable);
|
||||
*/
|
||||
}
|
||||
|
||||
public void Unload()
|
||||
@ -156,11 +159,12 @@ namespace Wabbajack
|
||||
|
||||
public void AfterInstallNavigation()
|
||||
{
|
||||
Process.Start("explorer.exe", (string)Location.TargetPath);
|
||||
Process.Start("explorer.exe", Location.TargetPath.ToString());
|
||||
}
|
||||
|
||||
public async Task<bool> Install()
|
||||
{
|
||||
/*
|
||||
using (var installer = new MO2Installer(
|
||||
archive: Parent.ModListLocation.TargetPath,
|
||||
modList: Parent.ModList.SourceModList,
|
||||
@ -186,6 +190,8 @@ namespace Wabbajack
|
||||
}
|
||||
});
|
||||
}
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
public IUserIntervention InterventionConverter(IUserIntervention intervention)
|
||||
|
@ -63,7 +63,7 @@ namespace Wabbajack
|
||||
MainWindow = mainWindow;
|
||||
Settings = settings;
|
||||
Installer = new Lazy<InstallerVM>(() => new InstallerVM(serviceProvider.GetService<ILogger<InstallerVM>>(), this, serviceProvider));
|
||||
Compiler = new Lazy<CompilerVM>(() => new CompilerVM(this));
|
||||
Compiler = new Lazy<CompilerVM>(() => new CompilerVM(serviceProvider.GetService<ILogger<CompilerVM>>(), this));
|
||||
SettingsPane = new Lazy<SettingsVM>(() => new SettingsVM(serviceProvider.GetService<ILogger<SettingsVM>>(), this, serviceProvider));
|
||||
Gallery = new Lazy<ModListGalleryVM>(() => new ModListGalleryVM(serviceProvider.GetService<ILogger<ModListGalleryVM>>(), this,
|
||||
serviceProvider.GetService<Client>(), serviceProvider.GetService<GameLocator>(), serviceProvider));
|
||||
|
@ -21,6 +21,7 @@ using Wabbajack.Lib.Downloaders;
|
||||
|
||||
namespace Wabbajack
|
||||
{
|
||||
|
||||
public class LoginManagerVM : BackNavigatingVM
|
||||
{
|
||||
public List<LoginTargetVM> Downloaders { get; }
|
||||
@ -28,12 +29,15 @@ namespace Wabbajack
|
||||
public LoginManagerVM(SettingsVM settingsVM)
|
||||
: base(settingsVM.MWVM)
|
||||
{
|
||||
/*
|
||||
Downloaders = DownloadDispatcher.Downloaders
|
||||
.OfType<INeedsLogin>()
|
||||
.OrderBy(x => x.SiteName)
|
||||
.Select(x => new LoginTargetVM(x))
|
||||
.ToList();
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class LoginTargetVM : ViewModel
|
||||
@ -144,4 +148,5 @@ namespace Wabbajack
|
||||
});
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ using Wabbajack.Lib;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Reactive.Linq;
|
||||
using Wabbajack.Common;
|
||||
using Wabbajack.RateLimiter;
|
||||
|
||||
namespace Wabbajack
|
||||
{
|
||||
|
@ -177,7 +177,7 @@
|
||||
x:Name="MO2CompilerButton"
|
||||
Height="35"
|
||||
Margin="4"
|
||||
IsChecked="{Binding SelectedCompilerType, Converter={StaticResource EqualsToBoolConverter}, ConverterParameter={x:Static wabbacommon:ModManager.MO2}}">
|
||||
IsChecked="{Binding SelectedCompilerType, Converter={StaticResource EqualsToBoolConverter}, ConverterParameter={x:Static local:ModManager.Standard}}">
|
||||
<local:ImageRadioButtonView.Image>
|
||||
<BitmapImage UriSource="../../Resources/MO2Button.png" />
|
||||
</local:ImageRadioButtonView.Image>
|
||||
|
@ -18,17 +18,17 @@ namespace Wabbajack
|
||||
|
||||
private void GitHub_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Utils.OpenWebsite(new Uri("https://github.com/wabbajack-tools/wabbajack"));
|
||||
UIUtils.OpenWebsite(new Uri("https://github.com/wabbajack-tools/wabbajack"));
|
||||
}
|
||||
|
||||
private void Discord_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Utils.OpenWebsite(new Uri("https://discord.gg/wabbajack"));
|
||||
UIUtils.OpenWebsite(new Uri("https://discord.gg/wabbajack"));
|
||||
}
|
||||
|
||||
private void Patreon_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Utils.OpenWebsite(new Uri("https://www.patreon.com/user?u=11907933"));
|
||||
UIUtils.OpenWebsite(new Uri("https://www.patreon.com/user?u=11907933"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Wabbajack.Paths;
|
||||
|
||||
namespace Wabbajack.Lib;
|
||||
|
||||
@ -7,4 +8,5 @@ public static class Consts
|
||||
public static string AppName = "Wabbajack";
|
||||
public static Uri WabbajackBuildServerUri => new("https://build.wabbajack.org");
|
||||
public static Version CurrentMinimumWabbajackVersion { get; set; } = Version.Parse("2.3.0.0");
|
||||
public static RelativePath NativeSettingsJson = "native_settings.json".ToRelativePath();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user