diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9a4d677c..eee53bfd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
### Changelog
+#### Version - 3.0.0.6 -
+* Upgrade several dependency libraries
+* Provide a better error message when someone attempts to compile before logging into the Nexus (or installing a list)
+* Add `Ignore` as another compiler option
+* Add button to re-infer compiler settings
+* Show `Selected MO2 Profile` in the compiler settings
+
+
#### Version - 3.0.0.5 - 8/22/2022
* No longer rehashes files on every compile (faster Add Roots step during compilation)
* Editing paths in the install/compile settings won't crash the app
diff --git a/Wabbajack.App.Blazor/Wabbajack.App.Blazor.csproj b/Wabbajack.App.Blazor/Wabbajack.App.Blazor.csproj
index 76e1bd7f..c2d73a9d 100644
--- a/Wabbajack.App.Blazor/Wabbajack.App.Blazor.csproj
+++ b/Wabbajack.App.Blazor/Wabbajack.App.Blazor.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/Wabbajack.App.Wpf/View Models/Compilers/CompilerVM.cs b/Wabbajack.App.Wpf/View Models/Compilers/CompilerVM.cs
index b0dc1bad..cc4cbed5 100644
--- a/Wabbajack.App.Wpf/View Models/Compilers/CompilerVM.cs
+++ b/Wabbajack.App.Wpf/View Models/Compilers/CompilerVM.cs
@@ -87,6 +87,7 @@ namespace Wabbajack
[Reactive] public RelativePath[] AlwaysEnabled { get; set; } = Array.Empty();
[Reactive] public RelativePath[] NoMatchInclude { get; set; } = Array.Empty();
[Reactive] public RelativePath[] Include { get; set; } = Array.Empty();
+ [Reactive] public RelativePath[] Ignore { get; set; } = Array.Empty();
[Reactive] public string[] OtherProfiles { get; set; } = Array.Empty();
@@ -96,6 +97,7 @@ namespace Wabbajack
public ReactiveCommand ExecuteCommand { get; }
+ public ReactiveCommand ReInferSettingsCommand { get; set; }
public LogStream LoggerProvider { get; }
public ReadOnlyObservableCollection StatusList => _resourceMonitor.Tasks;
@@ -129,6 +131,14 @@ namespace Wabbajack
SubCompilerVM = new MO2CompilerVM(this);
ExecuteCommand = ReactiveCommand.CreateFromTask(async () => await StartCompilation());
+ ReInferSettingsCommand = ReactiveCommand.CreateFromTask(async () => await ReInferSettings(),
+ this.WhenAnyValue(vm => vm.Source)
+ .ObserveOnGuiThread()
+ .Select(v => v != default)
+ .CombineLatest(this.WhenAnyValue(vm => vm.ModListName)
+ .ObserveOnGuiThread()
+ .Select(p => !string.IsNullOrWhiteSpace(p)))
+ .Select(v => v.First && v.Second));
ModlistLocation = new FilePickerVM
{
@@ -184,6 +194,26 @@ namespace Wabbajack
});
}
+
+
+ private async Task ReInferSettings()
+ {
+ var newSettings = await _inferencer.InferModListFromLocation(
+ Source.Combine("profiles", SelectedProfile, "modlist.txt"));
+
+ if (newSettings == null)
+ {
+ _logger.LogError("Cannot infer settings");
+ return;
+ }
+
+ Include = newSettings.Include;
+ Ignore = newSettings.Ignore;
+ AlwaysEnabled = newSettings.AlwaysEnabled;
+ NoMatchInclude = newSettings.NoMatchInclude;
+ OtherProfiles = newSettings.AdditionalProfiles;
+ }
+
private ErrorResponse Validate()
{
var errors = new List();
@@ -236,6 +266,7 @@ namespace Wabbajack
AlwaysEnabled = settings.AlwaysEnabled;
NoMatchInclude = settings.NoMatchInclude;
Include = settings.Include;
+ Ignore = settings.Ignore;
}
@@ -385,7 +416,8 @@ namespace Wabbajack
AlwaysEnabled = AlwaysEnabled,
AdditionalProfiles = OtherProfiles,
NoMatchInclude = NoMatchInclude,
- Include = Include
+ Include = Include,
+ Ignore = Ignore
};
}
@@ -431,6 +463,17 @@ namespace Wabbajack
Include = Include.Where(p => p != path).ToArray();
}
+
+ public void AddIgnore(RelativePath path)
+ {
+ Ignore = (Ignore ?? Array.Empty()).Append(path).Distinct().ToArray();
+ }
+
+ public void RemoveIgnore(RelativePath path)
+ {
+ Ignore = Ignore.Where(p => p != path).ToArray();
+ }
+
#endregion
}
}
diff --git a/Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml b/Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml
index 54f675ec..c1fb0b94 100644
--- a/Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml
+++ b/Wabbajack.App.Wpf/Views/Compilers/CompilerView.xaml
@@ -101,6 +101,9 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Wabbajack.Launcher/Wabbajack.Launcher.csproj b/Wabbajack.Launcher/Wabbajack.Launcher.csproj
index 9c2cf121..3a51c5a2 100644
--- a/Wabbajack.Launcher/Wabbajack.Launcher.csproj
+++ b/Wabbajack.Launcher/Wabbajack.Launcher.csproj
@@ -21,7 +21,7 @@
-
+
diff --git a/Wabbajack.Networking.NexusApi/NexusApi.cs b/Wabbajack.Networking.NexusApi/NexusApi.cs
index 4ca13bcc..88e7e95e 100644
--- a/Wabbajack.Networking.NexusApi/NexusApi.cs
+++ b/Wabbajack.Networking.NexusApi/NexusApi.cs
@@ -174,11 +174,16 @@ public class NexusApi
var userAgent =
$"{_appInfo.ApplicationSlug}/{_appInfo.Version} ({_appInfo.OSVersion}; {_appInfo.Platform})";
+ if (!ApiKey.HaveToken())
+ throw new Exception("Please log into the Nexus before attempting to use Wabbajack");
+
+ var token = (await ApiKey.Get())!;
+
msg.RequestUri = new Uri($"https://api.nexusmods.com/{string.Format(uri, parameters)}");
msg.Headers.Add("User-Agent", userAgent);
msg.Headers.Add("Application-Name", _appInfo.ApplicationSlug);
msg.Headers.Add("Application-Version", _appInfo.Version);
- msg.Headers.Add("apikey", (await ApiKey.Get())!.ApiKey);
+ msg.Headers.Add("apikey", token.ApiKey);
msg.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
return msg;
}
diff --git a/Wabbajack.Paths/RelativePath.cs b/Wabbajack.Paths/RelativePath.cs
index 31452a0b..58d31eb9 100644
--- a/Wabbajack.Paths/RelativePath.cs
+++ b/Wabbajack.Paths/RelativePath.cs
@@ -68,7 +68,7 @@ public struct RelativePath : IPath, IEquatable, IComparable
-
+
diff --git a/Wabbajack.Server/Wabbajack.Server.csproj b/Wabbajack.Server/Wabbajack.Server.csproj
index 4a3c79ce..f6517cf1 100644
--- a/Wabbajack.Server/Wabbajack.Server.csproj
+++ b/Wabbajack.Server/Wabbajack.Server.csproj
@@ -12,7 +12,7 @@
-
+