Skip to content

Commit

Permalink
2.5.3.26
Browse files Browse the repository at this point in the history
  • Loading branch information
halgari committed Aug 5, 2022
1 parent 175677a commit d0709ff
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
### Changelog

#### Version - 2.5.3.26 - 8/4/2022
* Use the new VectorPlexis domain
* Use the new LoversLab API domain

#### Version - 2.5.3.25 - 6/29/2022
* Correctly modify Witcher 3 settings to the game accepts the values

Expand Down
22 changes: 22 additions & 0 deletions Wabbajack.App.Wpf/View Models/Compilers/CompilerVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Media;
using System.Windows.Threading;
using DynamicData;
using Microsoft.WindowsAPICodePack.Dialogs;
using ReactiveUI.Fody.Helpers;
Expand All @@ -24,6 +25,7 @@
using Wabbajack.Networking.WabbajackClientApi;
using Wabbajack.Paths;
using Wabbajack.Paths.IO;
using Wabbajack.RateLimiter;
using Wabbajack.Services.OSIntegrated;

namespace Wabbajack
Expand All @@ -47,6 +49,9 @@ public class CompilerVM : BackNavigatingVM, ICpuStatusVM
private readonly ResourceMonitor _resourceMonitor;
private readonly CompilerSettingsInferencer _inferencer;
private readonly Client _wjClient;

[Reactive] public string StatusText { get; set; }
[Reactive] public Percent StatusProgress { get; set; }

[Reactive]
public CompilerState State { get; set; }
Expand Down Expand Up @@ -109,6 +114,9 @@ public CompilerVM(ILogger<CompilerVM> logger, DTOSerializer dtos, SettingsManage
_inferencer = inferencer;
_wjClient = wjClient;

StatusText = "Compiler Settings";
StatusProgress = Percent.Zero;

BackCommand =
ReactiveCommand.CreateFromTask(async () =>
{
Expand Down Expand Up @@ -241,6 +249,16 @@ private async Task StartCompilation()

var compiler = MO2Compiler.Create(_serviceProvider, mo2Settings);

compiler.OnStatusUpdate += (sender, update) =>
{
RxApp.MainThreadScheduler.Schedule(update, (scheduler, update) =>
{
StatusText = update.StatusText;
StatusProgress = update.StepsProgress;
return Disposable.Empty;
});
};

await compiler.Begin(token);

if (PublishUpdate)
Expand All @@ -256,6 +274,10 @@ private async Task StartCompilation()
}
catch (Exception ex)
{
StatusText = "Compilation Failed";
StatusProgress = Percent.Zero;


State = CompilerState.Errored;
_logger.LogInformation(ex, "Failed Compilation : {Message}", ex.Message);
}
Expand Down
12 changes: 12 additions & 0 deletions Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,18 @@ public CompilerView()
this.Bind(ViewModel, vm => vm.MachineUrl, view => view.MachineUrl.Text)
.DisposeWith(disposables);

this.Bind(ViewModel, vm => vm.StatusText, view => view.TopProgressBar.Title)
.DisposeWith(disposables);

ViewModel.WhenAnyValue(vm => vm.StatusText)
.BindToStrict(this, view => view.TopProgressBar.Title)
.DisposeWith(disposables);

ViewModel.WhenAnyValue(vm => vm.StatusProgress)
.Select(d => d.Value)
.BindToStrict(this, view => view.TopProgressBar.ProgressPercent)
.DisposeWith(disposables);

ViewModel.WhenAnyValue(vm => vm.AlwaysEnabled)
.WhereNotNull()
.Select(itms => itms.Select(itm => new RemovableItemViewModel(itm.ToString(), () => ViewModel.RemoveAlwaysEnabled(itm))).ToArray())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class LoversLabDownloader : AIPS4OAuth2Downloader<LoversLabDownloader, Lo
public LoversLabDownloader(ILogger<LoversLabDownloader> logger, ITokenProvider<LoversLabLoginState> loginInfo,
HttpClient client,
IHttpDownloader downloader, ApplicationInfo appInfo) : base(logger, loginInfo, client, downloader, appInfo,
new Uri("https://loverslab.com"), "Lovers Lab")
new Uri("https://api.loverslab.com"), "Lovers Lab")
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class
public VectorPlexusDownloader(ILogger<VectorPlexusDownloader> logger,
ITokenProvider<VectorPlexusLoginState> loginInfo, HttpClient client,
IHttpDownloader downloader, ApplicationInfo appInfo)
: base(logger, loginInfo, client, downloader, appInfo, new Uri("https://vectorplexus.com"), "Vector Plexus")
: base(logger, loginInfo, client, downloader, appInfo, new Uri("https://vectorplexis.com"), "Vector Plexus")
{
}
}

0 comments on commit d0709ff

Please sign in to comment.