mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix typos + inconsistencies in logs
This commit is contained in:
parent
955924fdac
commit
877989ba16
BIN
Branding/PNGs/WabbaFilled.png
Normal file
BIN
Branding/PNGs/WabbaFilled.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 187 KiB |
BIN
Branding/PNGs/WabbaInverted.png
Normal file
BIN
Branding/PNGs/WabbaInverted.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 160 KiB |
BIN
Branding/WabbajackGraphics/Emotes/WabbaPopcorn.png
Normal file
BIN
Branding/WabbajackGraphics/Emotes/WabbaPopcorn.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
Binary file not shown.
Before Width: | Height: | Size: 308 KiB |
Binary file not shown.
@ -110,7 +110,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>ESP cleaning</li>
|
<li>ESP cleaning</li>
|
||||||
|
|
||||||
<li>form 44 conversion</li>
|
<li>Form 44 conversion</li>
|
||||||
|
|
||||||
<li>ESP to ESL conversion</li>
|
<li>ESP to ESL conversion</li>
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ namespace Wabbajack.BuildServer
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.Log(LogLevel.Information, $"Starting Job: {job.Payload.Description}");
|
Logger.Log(LogLevel.Information, $"Starting job: {job.Payload.Description}");
|
||||||
JobResult result;
|
JobResult result;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -57,7 +57,7 @@ namespace Wabbajack.BuildServer
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Logger.Log(LogLevel.Error, ex, $"Error getting or updating Job");
|
Logger.Log(LogLevel.Error, ex, $"Error getting or updating job");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ namespace Wabbajack.BuildServer.Models.Jobs
|
|||||||
public override string Description => "Add missing modlist archives to indexer";
|
public override string Description => "Add missing modlist archives to indexer";
|
||||||
public override async Task<JobResult> Execute(DBContext db, AppSettings settings)
|
public override async Task<JobResult> Execute(DBContext db, AppSettings settings)
|
||||||
{
|
{
|
||||||
Utils.Log("Starting modlist indexing");
|
Utils.Log("Starting ModList indexing");
|
||||||
var modlists = await ModlistMetadata.LoadFromGithub();
|
var modlists = await ModlistMetadata.LoadFromGithub();
|
||||||
|
|
||||||
using (var queue = new WorkQueue())
|
using (var queue = new WorkQueue())
|
||||||
@ -56,7 +56,7 @@ namespace Wabbajack.BuildServer.Models.Jobs
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Utils.Log($"No changes detected from downloaded modlist");
|
Utils.Log($"No changes detected from downloaded ModList");
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.Log($"Loading {modlist_path}");
|
Utils.Log($"Loading {modlist_path}");
|
||||||
@ -79,7 +79,7 @@ namespace Wabbajack.BuildServer.Models.Jobs
|
|||||||
|
|
||||||
var jobs = missing.Select(a => new Job {Payload = new IndexJob {Archive = a}, Priority = Job.JobPriority.Low});
|
var jobs = missing.Select(a => new Job {Payload = new IndexJob {Archive = a}, Priority = Job.JobPriority.Low});
|
||||||
|
|
||||||
Utils.Log($"Writing jobs to the DB");
|
Utils.Log($"Writing jobs to the database");
|
||||||
await db.Jobs.InsertManyAsync(jobs, new InsertManyOptions {IsOrdered = false});
|
await db.Jobs.InsertManyAsync(jobs, new InsertManyOptions {IsOrdered = false});
|
||||||
Utils.Log($"Done adding archives for {installer.Name}");
|
Utils.Log($"Done adding archives for {installer.Name}");
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ namespace Wabbajack.BuildServer.Models.Jobs
|
|||||||
{
|
{
|
||||||
public class GetNexusUpdatesJob : AJobPayload
|
public class GetNexusUpdatesJob : AJobPayload
|
||||||
{
|
{
|
||||||
public override string Description => "Poll the nexus for updated mods, and clean any references to those mods";
|
public override string Description => "Poll the Nexus for updated mods, and clean any references to those mods";
|
||||||
|
|
||||||
public override async Task<JobResult> Execute(DBContext db, AppSettings settings)
|
public override async Task<JobResult> Execute(DBContext db, AppSettings settings)
|
||||||
{
|
{
|
||||||
|
27
Wabbajack.BuildServer/Properties/launchSettings.json
Normal file
27
Wabbajack.BuildServer/Properties/launchSettings.json
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"iisSettings": {
|
||||||
|
"windowsAuthentication": false,
|
||||||
|
"anonymousAuthentication": true,
|
||||||
|
"iisExpress": {
|
||||||
|
"applicationUrl": "http://localhost:51578/",
|
||||||
|
"sslPort": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"profiles": {
|
||||||
|
"IIS Express": {
|
||||||
|
"commandName": "IISExpress",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Wabbajack.BuildServer": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"applicationUrl": "http://localhost:51579/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -108,13 +108,13 @@ namespace Wabbajack.Common.StoreHandlers
|
|||||||
|
|
||||||
if (gameMeta == null)
|
if (gameMeta == null)
|
||||||
{
|
{
|
||||||
Utils.Log($"GOG Game \"{gameName}\"({gameID}) is not supported, skipping");
|
Utils.Log($"GOG Game \"{gameName}\" ({gameID}) is not supported, skipping");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
game.Game = gameMeta.Game;
|
game.Game = gameMeta.Game;
|
||||||
|
|
||||||
Utils.Log($"Found GOG Game: \"{game.Name}\"({game.ID}) at {game.Path}");
|
Utils.Log($"Found GOG Game: \"{game.Name}\" ({game.ID}) at {game.Path}");
|
||||||
|
|
||||||
Games.Add(game);
|
Games.Add(game);
|
||||||
});
|
});
|
||||||
|
@ -119,7 +119,7 @@ namespace Wabbajack.Common.StoreHandlers
|
|||||||
|
|
||||||
if (SteamUniverses.Count == 0)
|
if (SteamUniverses.Count == 0)
|
||||||
{
|
{
|
||||||
Utils.Log("Could not find any Steam Libraries!");
|
Utils.Log("Could not find any Steam Libraries");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,14 +166,14 @@ namespace Wabbajack.Common.StoreHandlers
|
|||||||
|
|
||||||
if (gameMeta == null)
|
if (gameMeta == null)
|
||||||
{
|
{
|
||||||
Utils.Log($"Steam Game {game.Name}({game.ID}) is not supported, skipping");
|
Utils.Log($"Steam Game \"{game.Name}\" ({game.ID}) is not supported, skipping");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
game.Game = gameMeta.Game;
|
game.Game = gameMeta.Game;
|
||||||
game.Universe = u;
|
game.Universe = u;
|
||||||
|
|
||||||
Utils.Log($"Found Steam Game: \"{game.Name}\"({game.ID}) at {game.Path}");
|
Utils.Log($"Found Steam Game: \"{game.Name}\" ({game.ID}) at {game.Path}");
|
||||||
|
|
||||||
LoadWorkshopItems(game);
|
LoadWorkshopItems(game);
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ namespace Wabbajack.Common.StoreHandlers
|
|||||||
if (Path.GetFileName(f) != $"appworkshop{game.ID}.acf")
|
if (Path.GetFileName(f) != $"appworkshop{game.ID}.acf")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Utils.Log($"Found workshop item file {f} for \"{game.Name}\"");
|
Utils.Log($"Found Steam Workshop item file {f} for \"{game.Name}\"");
|
||||||
|
|
||||||
var lines = File.ReadAllLines(f);
|
var lines = File.ReadAllLines(f);
|
||||||
var end = false;
|
var end = false;
|
||||||
@ -282,7 +282,7 @@ namespace Wabbajack.Common.StoreHandlers
|
|||||||
currentItem.Game = game;
|
currentItem.Game = game;
|
||||||
game.WorkshopItems.Add(currentItem);
|
game.WorkshopItems.Add(currentItem);
|
||||||
|
|
||||||
Utils.Log($"Found WorkshopItem {currentItem.ItemID}");
|
Utils.Log($"Found Steam Workshop item {currentItem.ItemID}");
|
||||||
|
|
||||||
currentItem = null;
|
currentItem = null;
|
||||||
end = true;
|
end = true;
|
||||||
|
@ -82,9 +82,9 @@ namespace Wabbajack.Lib
|
|||||||
|
|
||||||
public void ExportModList()
|
public void ExportModList()
|
||||||
{
|
{
|
||||||
Utils.Log($"Exporting ModList to : {ModListOutputFile}");
|
Utils.Log($"Exporting ModList to {ModListOutputFile}");
|
||||||
|
|
||||||
// Modify readme and modlist image to relative paths if they exist
|
// Modify readme and ModList image to relative paths if they exist
|
||||||
if (File.Exists(ModListImage))
|
if (File.Exists(ModListImage))
|
||||||
{
|
{
|
||||||
ModList.Image = "modlist-image.png";
|
ModList.Image = "modlist-image.png";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
@ -322,7 +322,7 @@ namespace Wabbajack.Lib
|
|||||||
var available = DriveInfo(g.Key).FreeBytesAvailable;
|
var available = DriveInfo(g.Key).FreeBytesAvailable;
|
||||||
if (required - contains > available)
|
if (required - contains > available)
|
||||||
throw new NotEnoughDiskSpaceException(
|
throw new NotEnoughDiskSpaceException(
|
||||||
$"This modlist requires {required.ToFileSizeString()} on {g.Key} but only {available.ToFileSizeString()} is available.");
|
$"This ModList requires {required.ToFileSizeString()} on {g.Key} but only {available.ToFileSizeString()} is available.");
|
||||||
});
|
});
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
@ -334,9 +334,9 @@ namespace Wabbajack.Lib
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task OptimizeModlist()
|
public async Task OptimizeModlist()
|
||||||
{
|
{
|
||||||
Utils.Log("Optimizing Modlist directives");
|
Utils.Log("Optimizing ModList directives");
|
||||||
|
|
||||||
// Clone the modlist so our changes don't modify the original data
|
// Clone the ModList so our changes don't modify the original data
|
||||||
ModList = ModList.Clone();
|
ModList = ModList.Clone();
|
||||||
|
|
||||||
var indexed = ModList.Directives.ToDictionary(d => d.To);
|
var indexed = ModList.Directives.ToDictionary(d => d.To);
|
||||||
@ -346,11 +346,11 @@ namespace Wabbajack.Lib
|
|||||||
.PMap(Queue, UpdateTracker, f =>
|
.PMap(Queue, UpdateTracker, f =>
|
||||||
{
|
{
|
||||||
var relative_to = f.RelativeTo(OutputFolder);
|
var relative_to = f.RelativeTo(OutputFolder);
|
||||||
Utils.Status($"Checking if modlist file {relative_to}");
|
Utils.Status($"Checking if ModList file {relative_to}");
|
||||||
if (indexed.ContainsKey(relative_to) || f.IsInPath(DownloadFolder))
|
if (indexed.ContainsKey(relative_to) || f.IsInPath(DownloadFolder))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Utils.Log($"Deleting {relative_to} it's not part of this modlist");
|
Utils.Log($"Deleting {relative_to} it's not part of this ModList");
|
||||||
File.Delete(f);
|
File.Delete(f);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -399,7 +399,7 @@ namespace Wabbajack.Lib
|
|||||||
Utils.Log("Error when trying to clean empty folders. This doesn't really matter.");
|
Utils.Log("Error when trying to clean empty folders. This doesn't really matter.");
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateTracker.NextStep("Updating Modlist");
|
UpdateTracker.NextStep("Updating ModList");
|
||||||
Utils.Log($"Optimized {ModList.Directives.Count} directives to {indexed.Count} required");
|
Utils.Log($"Optimized {ModList.Directives.Count} directives to {indexed.Count} required");
|
||||||
var requiredArchives = indexed.Values.OfType<FromArchive>()
|
var requiredArchives = indexed.Values.OfType<FromArchive>()
|
||||||
.GroupBy(d => d.ArchiveHashPath[0])
|
.GroupBy(d => d.ArchiveHashPath[0])
|
||||||
|
@ -24,7 +24,7 @@ namespace Wabbajack.Lib.CompilationSteps
|
|||||||
!File.Exists(gameFile)) return null;
|
!File.Exists(gameFile)) return null;
|
||||||
|
|
||||||
Utils.Log(
|
Utils.Log(
|
||||||
$"A ESM named {filename} was found in a mod that shares a name with a core game ESMs, it is assumed this is a cleaned ESM and it will be binary patched.");
|
$"An ESM named {filename} was found in a mod that shares a name with one of the core game ESMs, it is assumed this is a cleaned ESM and it will be binary patched");
|
||||||
var result = source.EvolveTo<CleanedESM>();
|
var result = source.EvolveTo<CleanedESM>();
|
||||||
result.SourceESMHash = _compiler.VFS.Index.ByRootPath[gameFile].Hash;
|
result.SourceESMHash = _compiler.VFS.Index.ByRootPath[gameFile].Hash;
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ namespace Wabbajack.Lib.Downloaders
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Utils.Log($"You must manually visit {Url} and download {a.Name} file by hand.");
|
Utils.Log($"You must manually visit {Url} and download {a.Name} file by hand");
|
||||||
Utils.Log($"Waiting for {a.Name}");
|
Utils.Log($"Waiting for {a.Name}");
|
||||||
downloader._watcher.EnableRaisingEvents = true;
|
downloader._watcher.EnableRaisingEvents = true;
|
||||||
var watcher = downloader._fileEvents
|
var watcher = downloader._fileEvents
|
||||||
|
@ -146,7 +146,7 @@ namespace Wabbajack.Lib.Downloaders
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Utils.Log($"{a.Name} - Error Getting Nexus Download URL - {ex.Message}");
|
Utils.Log($"{a.Name} - Error getting Nexus download URL - {ex.Message}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,7 +183,7 @@ namespace Wabbajack.Lib.Downloaders
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Utils.Log($"{ModName} - {GameName} - {ModID} - {FileID} - Error Getting Nexus Download URL - {ex}");
|
Utils.Log($"{ModName} - {GameName} - {ModID} - {FileID} - Error getting Nexus download URL - {ex}");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,8 +54,8 @@ namespace Wabbajack.Lib
|
|||||||
if (GameFolder == null)
|
if (GameFolder == null)
|
||||||
{
|
{
|
||||||
await Utils.Log(new CriticalFailureIntervention(
|
await Utils.Log(new CriticalFailureIntervention(
|
||||||
$"In order to do a proper install Wabbajack needs to know where your {game.MO2Name} folder resides. We tried looking the" +
|
$"In order to do a proper install Wabbajack needs to know where your {game.MO2Name} folder resides. We tried looking the " +
|
||||||
"game location up in the windows registry but were unable to find it, please make sure you launch the game once before running this installer. ",
|
"game location up in the Windows Registry but were unable to find it, please make sure you launch the game once before running this installer. ",
|
||||||
"Could not find game location")).Task;
|
"Could not find game location")).Task;
|
||||||
Utils.Log("Exiting because we couldn't find the game folder.");
|
Utils.Log("Exiting because we couldn't find the game folder.");
|
||||||
return false;
|
return false;
|
||||||
@ -82,7 +82,7 @@ namespace Wabbajack.Lib
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cancel.IsCancellationRequested) return false;
|
if (cancel.IsCancellationRequested) return false;
|
||||||
UpdateTracker.NextStep("Optimizing Modlist");
|
UpdateTracker.NextStep("Optimizing ModList");
|
||||||
await OptimizeModlist();
|
await OptimizeModlist();
|
||||||
|
|
||||||
if (cancel.IsCancellationRequested) return false;
|
if (cancel.IsCancellationRequested) return false;
|
||||||
@ -321,13 +321,13 @@ namespace Wabbajack.Lib
|
|||||||
|
|
||||||
if (!Directory.Exists(path)) return ErrorResponse.Success;
|
if (!Directory.Exists(path)) return ErrorResponse.Success;
|
||||||
|
|
||||||
// Check folder does not have a wabbajack modlist
|
// Check folder does not have a Wabbajack ModList
|
||||||
foreach (var file in Directory.EnumerateFiles(path))
|
foreach (var file in Directory.EnumerateFiles(path))
|
||||||
{
|
{
|
||||||
if (!File.Exists(file)) continue;
|
if (!File.Exists(file)) continue;
|
||||||
if (System.IO.Path.GetExtension(file).Equals(ExtensionManager.Extension))
|
if (System.IO.Path.GetExtension(file).Equals(ExtensionManager.Extension))
|
||||||
{
|
{
|
||||||
return ErrorResponse.Fail($"Cannot install into a folder with a Wabbajack modlist inside of it.");
|
return ErrorResponse.Fail($"Cannot install into a folder with a Wabbajack ModList inside of it");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ namespace Wabbajack.Lib.ModListRegistry
|
|||||||
public static async Task<List<ModlistMetadata>> LoadFromGithub()
|
public static async Task<List<ModlistMetadata>> LoadFromGithub()
|
||||||
{
|
{
|
||||||
var client = new HttpClient();
|
var client = new HttpClient();
|
||||||
Utils.Log("Loading ModLists from Github");
|
Utils.Log("Loading ModLists from GitHub");
|
||||||
var metadataResult = client.GetStringAsync(Consts.ModlistMetadataURL);
|
var metadataResult = client.GetStringAsync(Consts.ModlistMetadataURL);
|
||||||
var summaryResult = client.GetStringAsync(Consts.ModlistSummaryURL);
|
var summaryResult = client.GetStringAsync(Consts.ModlistSummaryURL);
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ namespace Wabbajack.Lib.NexusApi
|
|||||||
|
|
||||||
public static async Task<string> SetupNexusLogin(IWebDriver browser, Action<string> updateStatus, CancellationToken cancel)
|
public static async Task<string> SetupNexusLogin(IWebDriver browser, Action<string> updateStatus, CancellationToken cancel)
|
||||||
{
|
{
|
||||||
updateStatus("Please Log Into the Nexus");
|
updateStatus("Please log into the Nexus");
|
||||||
await browser.NavigateTo(new Uri("https://users.nexusmods.com/auth/continue?client_id=nexus&redirect_uri=https://www.nexusmods.com/oauth/callback&response_type=code&referrer=//www.nexusmods.com"));
|
await browser.NavigateTo(new Uri("https://users.nexusmods.com/auth/continue?client_id=nexus&redirect_uri=https://www.nexusmods.com/oauth/callback&response_type=code&referrer=//www.nexusmods.com"));
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
@ -111,7 +111,7 @@ namespace Wabbajack.Lib.NexusApi
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
updateStatus("Please Authorize Wabbajack to Download Mods");
|
updateStatus("Please authorize Wabbajack to download Nexus mods");
|
||||||
var api_key = new TaskCompletionSource<string>();
|
var api_key = new TaskCompletionSource<string>();
|
||||||
websocket.OnMessage += (sender, msg) => { api_key.SetResult(msg.Data); };
|
websocket.OnMessage += (sender, msg) => { api_key.SetResult(msg.Data); };
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ namespace Wabbajack.Lib.NexusApi
|
|||||||
{
|
{
|
||||||
var dailyRemaining = int.Parse(response.Headers.GetValues("x-rl-daily-remaining").First());
|
var dailyRemaining = int.Parse(response.Headers.GetValues("x-rl-daily-remaining").First());
|
||||||
var hourlyRemaining = int.Parse(response.Headers.GetValues("x-rl-hourly-remaining").First());
|
var hourlyRemaining = int.Parse(response.Headers.GetValues("x-rl-hourly-remaining").First());
|
||||||
Utils.Log($"Nexus Requests Remaining: {dailyRemaining} daily - {hourlyRemaining} hourly");
|
Utils.Log($"Nexus requests remaining: {dailyRemaining} daily - {hourlyRemaining} hourly");
|
||||||
|
|
||||||
lock (RemainingLock)
|
lock (RemainingLock)
|
||||||
{
|
{
|
||||||
|
@ -11,8 +11,8 @@ using Path = Alphaleonis.Win32.Filesystem.Path;
|
|||||||
namespace Wabbajack.Lib.Validation
|
namespace Wabbajack.Lib.Validation
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Core class for rights management. Given a Wabbajack modlist this class will return a list of all the
|
/// Core class for rights management. Given a Wabbajack ModList this class will return a list of all the
|
||||||
/// know rights violations of the modlist
|
/// known rights violations of the ModList
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ValidateModlist
|
public class ValidateModlist
|
||||||
{
|
{
|
||||||
@ -39,18 +39,18 @@ namespace Wabbajack.Lib.Validation
|
|||||||
public async Task LoadListsFromGithub()
|
public async Task LoadListsFromGithub()
|
||||||
{
|
{
|
||||||
var client = new HttpClient();
|
var client = new HttpClient();
|
||||||
Utils.Log("Loading Nexus Mod Permissions");
|
Utils.Log("Loading Nexus mod permissions");
|
||||||
using (var result = await client.GetStreamAsync(Consts.ModPermissionsURL))
|
using (var result = await client.GetStreamAsync(Consts.ModPermissionsURL))
|
||||||
{
|
{
|
||||||
AuthorPermissions = result.FromYaml<Dictionary<string, Author>>();
|
AuthorPermissions = result.FromYaml<Dictionary<string, Author>>();
|
||||||
Utils.Log($"Loaded permissions for {AuthorPermissions.Count} authors");
|
Utils.Log($"Loaded permissions for {AuthorPermissions.Count} authors");
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.Log("Loading Server Whitelist");
|
Utils.Log("Loading server whitelist");
|
||||||
using (var result = await client.GetStreamAsync(Consts.ServerWhitelistURL))
|
using (var result = await client.GetStreamAsync(Consts.ServerWhitelistURL))
|
||||||
{
|
{
|
||||||
ServerWhitelist = result.FromYaml<ServerWhitelist>();
|
ServerWhitelist = result.FromYaml<ServerWhitelist>();
|
||||||
Utils.Log($"Loaded permissions for {ServerWhitelist.AllowedPrefixes.Count} servers and {ServerWhitelist.GoogleIDs.Count} GDrive files");
|
Utils.Log($"Loaded permissions for {ServerWhitelist.AllowedPrefixes.Count} servers and {ServerWhitelist.GoogleIDs.Count} Google Drive files");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -66,12 +66,11 @@ namespace Wabbajack.Lib.Validation
|
|||||||
errors.Do(e => Utils.Log(e));
|
errors.Do(e => Utils.Log(e));
|
||||||
if (errors.Count() > 0)
|
if (errors.Count() > 0)
|
||||||
{
|
{
|
||||||
Utils.Log($"{errors.Count()} validation errors found, cannot continue.");
|
|
||||||
throw new Exception($"{errors.Count()} validation errors found, cannot continue.");
|
throw new Exception($"{errors.Count()} validation errors found, cannot continue.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Utils.Log("No Validation failures");
|
Utils.Log("No validation failures");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,7 +140,7 @@ namespace Wabbajack.Lib.Validation
|
|||||||
if (!(archive.permissions.CanExtractBSAs ?? true) &&
|
if (!(archive.permissions.CanExtractBSAs ?? true) &&
|
||||||
p.ArchiveHashPath.Skip(1).ButLast().Any(a => Consts.SupportedBSAs.Contains(Path.GetExtension(a).ToLower())))
|
p.ArchiveHashPath.Skip(1).ButLast().Any(a => Consts.SupportedBSAs.Contains(Path.GetExtension(a).ToLower())))
|
||||||
{
|
{
|
||||||
ValidationErrors.Push($"{p.To} from {url} is set to disallow BSA Extraction");
|
ValidationErrors.Push($"{p.To} from {url} is set to disallow BSA extraction");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -157,7 +156,7 @@ namespace Wabbajack.Lib.Validation
|
|||||||
if (!(permissions.CanUseInOtherGames ?? true))
|
if (!(permissions.CanUseInOtherGames ?? true))
|
||||||
{
|
{
|
||||||
ValidationErrors.Push(
|
ValidationErrors.Push(
|
||||||
$"The modlist is for {nexus} but {m.Name} is for game type {((NexusDownloader.State)m.State).GameName} and is not allowed to be converted to other game types");
|
$"The ModList is for {nexus} but {m.Name} is for game type {((NexusDownloader.State)m.State).GameName} and is not allowed to be converted to other game types");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -335,14 +335,14 @@ namespace Wabbajack.Lib
|
|||||||
if (ActiveArchives.Contains(archive))
|
if (ActiveArchives.Contains(archive))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Utils.Log($"Adding Archive {archive} to ActiveArchives");
|
Utils.Log($"Adding archive {archive} to ActiveArchives");
|
||||||
ActiveArchives.Add(archive);
|
ActiveArchives.Add(archive);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task CreateMetaFiles()
|
private async Task CreateMetaFiles()
|
||||||
{
|
{
|
||||||
Utils.Log("Getting Nexus api_key, please click authorize if a browser window appears");
|
Utils.Log("Getting Nexus API key, please click authorize if a browser window appears");
|
||||||
var nexusClient = await NexusApiClient.Get();
|
var nexusClient = await NexusApiClient.Get();
|
||||||
|
|
||||||
var archives = Directory.EnumerateFiles(DownloadsFolder, "*", SearchOption.TopDirectoryOnly).Where(f =>
|
var archives = Directory.EnumerateFiles(DownloadsFolder, "*", SearchOption.TopDirectoryOnly).Where(f =>
|
||||||
@ -423,7 +423,7 @@ namespace Wabbajack.Lib
|
|||||||
var filePath = Path.Combine(DownloadsFolder, $"steamWorkshopItem_{item.ItemID}.meta");
|
var filePath = Path.Combine(DownloadsFolder, $"steamWorkshopItem_{item.ItemID}.meta");
|
||||||
if (File.Exists(filePath))
|
if (File.Exists(filePath))
|
||||||
{
|
{
|
||||||
Utils.Log($"File {filePath} already exists, skipping...");
|
Utils.Log($"File {filePath} already exists, skipping");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ namespace Wabbajack.Lib
|
|||||||
var metric = Metrics.Send("begin_install", ModList.Name);
|
var metric = Metrics.Send("begin_install", ModList.Name);
|
||||||
var result = await Utils.Log(new YesNoIntervention(
|
var result = await Utils.Log(new YesNoIntervention(
|
||||||
"Vortex Support is still experimental and may produce unexpected results. " +
|
"Vortex Support is still experimental and may produce unexpected results. " +
|
||||||
"If anything fails go to the special vortex support channels on the discord. @erri120#2285 " +
|
"If anything fails please go to the special Vortex support channels on the Wabbajack Discord and contact @erri120#2285 " +
|
||||||
"for support.", "Continue with experimental feature?")).Task;
|
"for support.", "Continue with experimental feature?")).Task;
|
||||||
if (result == ConfirmationIntervention.Choice.Abort)
|
if (result == ConfirmationIntervention.Choice.Abort)
|
||||||
{
|
{
|
||||||
@ -115,7 +115,7 @@ namespace Wabbajack.Lib
|
|||||||
|
|
||||||
var result = await Utils.Log(new YesNoIntervention("Some mods from this ModList must be installed directly into " +
|
var result = await Utils.Log(new YesNoIntervention("Some mods from this ModList must be installed directly into " +
|
||||||
"the game folder. Do you want to do this manually or do you want Wabbajack " +
|
"the game folder. Do you want to do this manually or do you want Wabbajack " +
|
||||||
"to do this for you?", "Install game folder mods?")).Task;
|
"to do this for you?", "Move mods into game folder?")).Task;
|
||||||
|
|
||||||
if (result != ConfirmationIntervention.Choice.Continue)
|
if (result != ConfirmationIntervention.Choice.Continue)
|
||||||
return;
|
return;
|
||||||
@ -173,7 +173,7 @@ namespace Wabbajack.Lib
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var result = await Utils.Log(new YesNoIntervention(
|
var result = await Utils.Log(new YesNoIntervention(
|
||||||
"The ModList you are installing requires Steam Workshop Items to exist. " +
|
"The ModList you are installing requires Steam Workshop items to exist. " +
|
||||||
"You can check the Workshop Items in the manifest of this ModList. Wabbajack can start Steam for you " +
|
"You can check the Workshop Items in the manifest of this ModList. Wabbajack can start Steam for you " +
|
||||||
"and download the Items automatically. Do you want to proceed with this step?",
|
"and download the Items automatically. Do you want to proceed with this step?",
|
||||||
"Download Steam Workshop Items?")).Task;
|
"Download Steam Workshop Items?")).Task;
|
||||||
|
@ -36,7 +36,7 @@ namespace Wabbajack.Test
|
|||||||
Helpers.Init();
|
Helpers.Init();
|
||||||
Utils.LogMessages.OfType<IInfo>().Subscribe(onNext: msg => TestContext.WriteLine(msg.ShortDescription));
|
Utils.LogMessages.OfType<IInfo>().Subscribe(onNext: msg => TestContext.WriteLine(msg.ShortDescription));
|
||||||
Utils.LogMessages.OfType<IUserIntervention>().Subscribe(msg =>
|
Utils.LogMessages.OfType<IUserIntervention>().Subscribe(msg =>
|
||||||
TestContext.WriteLine("ERROR: User intervetion required: " + msg.ShortDescription));
|
TestContext.WriteLine("ERROR: User intervention required: " + msg.ShortDescription));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ namespace Wabbajack.Test
|
|||||||
{
|
{
|
||||||
Utils.LogMessages.OfType<IInfo>().Subscribe(onNext: msg => TestContext.WriteLine(msg.ShortDescription));
|
Utils.LogMessages.OfType<IInfo>().Subscribe(onNext: msg => TestContext.WriteLine(msg.ShortDescription));
|
||||||
Utils.LogMessages.OfType<IUserIntervention>().Subscribe(msg =>
|
Utils.LogMessages.OfType<IUserIntervention>().Subscribe(msg =>
|
||||||
TestContext.WriteLine("ERROR: User intervetion required: " + msg.ShortDescription));
|
TestContext.WriteLine("ERROR: User intervention required: " + msg.ShortDescription));
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
|
@ -78,7 +78,7 @@ namespace Wabbajack
|
|||||||
{
|
{
|
||||||
ExistCheckOption = FilePickerVM.CheckOptions.IfPathNotEmpty,
|
ExistCheckOption = FilePickerVM.CheckOptions.IfPathNotEmpty,
|
||||||
PathType = FilePickerVM.PathTypeOptions.Folder,
|
PathType = FilePickerVM.PathTypeOptions.Folder,
|
||||||
PromptTitle = "Select the folder to place the resulting modlist.wabbajack file",
|
PromptTitle = "Select the folder to export the compiled Wabbajack ModList to",
|
||||||
};
|
};
|
||||||
|
|
||||||
// Load settings
|
// Load settings
|
||||||
|
@ -47,13 +47,13 @@ namespace Wabbajack
|
|||||||
{
|
{
|
||||||
ExistCheckOption = FilePickerVM.CheckOptions.On,
|
ExistCheckOption = FilePickerVM.CheckOptions.On,
|
||||||
PathType = FilePickerVM.PathTypeOptions.File,
|
PathType = FilePickerVM.PathTypeOptions.File,
|
||||||
PromptTitle = "Select modlist"
|
PromptTitle = "Select a ModList"
|
||||||
};
|
};
|
||||||
DownloadLocation = new FilePickerVM()
|
DownloadLocation = new FilePickerVM()
|
||||||
{
|
{
|
||||||
ExistCheckOption = FilePickerVM.CheckOptions.On,
|
ExistCheckOption = FilePickerVM.CheckOptions.On,
|
||||||
PathType = FilePickerVM.PathTypeOptions.Folder,
|
PathType = FilePickerVM.PathTypeOptions.Folder,
|
||||||
PromptTitle = "Select download location",
|
PromptTitle = "Select a downloads location",
|
||||||
};
|
};
|
||||||
|
|
||||||
_mo2Folder = this.WhenAny(x => x.ModListLocation.TargetPath)
|
_mo2Folder = this.WhenAny(x => x.ModListLocation.TargetPath)
|
||||||
@ -85,15 +85,15 @@ namespace Wabbajack
|
|||||||
})
|
})
|
||||||
.ToProperty(this, nameof(MOProfile));
|
.ToProperty(this, nameof(MOProfile));
|
||||||
|
|
||||||
// Wire missing Mo2Folder to signal error state for Modlist Location
|
// Wire missing Mo2Folder to signal error state for ModList Location
|
||||||
ModListLocation.AdditionalError = this.WhenAny(x => x.Mo2Folder)
|
ModListLocation.AdditionalError = this.WhenAny(x => x.Mo2Folder)
|
||||||
.Select<string, IErrorResponse>(moFolder =>
|
.Select<string, IErrorResponse>(moFolder =>
|
||||||
{
|
{
|
||||||
if (Directory.Exists(moFolder)) return ErrorResponse.Success;
|
if (Directory.Exists(moFolder)) return ErrorResponse.Success;
|
||||||
return ErrorResponse.Fail($"MO2 Folder could not be located from the given modlist location.{Environment.NewLine}Make sure your modlist is inside a valid MO2 distribution.");
|
return ErrorResponse.Fail($"MO2 folder could not be located from the given ModList location.{Environment.NewLine}Make sure your ModList is inside a valid MO2 distribution.");
|
||||||
});
|
});
|
||||||
|
|
||||||
// Load custom modlist settings per MO2 profile
|
// Load custom ModList settings per MO2 profile
|
||||||
_modlistSettings = Observable.CombineLatest(
|
_modlistSettings = Observable.CombineLatest(
|
||||||
(this).WhenAny(x => x.ModListLocation.ErrorState),
|
(this).WhenAny(x => x.ModListLocation.ErrorState),
|
||||||
(this).WhenAny(x => x.ModListLocation.TargetPath),
|
(this).WhenAny(x => x.ModListLocation.TargetPath),
|
||||||
|
@ -116,7 +116,7 @@ namespace Wabbajack
|
|||||||
{
|
{
|
||||||
ExistCheckOption = FilePickerVM.CheckOptions.On,
|
ExistCheckOption = FilePickerVM.CheckOptions.On,
|
||||||
PathType = FilePickerVM.PathTypeOptions.File,
|
PathType = FilePickerVM.PathTypeOptions.File,
|
||||||
PromptTitle = "Select a modlist to install"
|
PromptTitle = "Select a ModList to install"
|
||||||
};
|
};
|
||||||
|
|
||||||
// Swap to proper sub VM based on selected type
|
// Swap to proper sub VM based on selected type
|
||||||
@ -174,12 +174,12 @@ namespace Wabbajack
|
|||||||
.Select(modList => modList?.ModManager)
|
.Select(modList => modList?.ModManager)
|
||||||
.ToProperty(this, nameof(TargetManager));
|
.ToProperty(this, nameof(TargetManager));
|
||||||
|
|
||||||
// Add additional error check on modlist
|
// Add additional error check on ModList
|
||||||
ModListLocation.AdditionalError = this.WhenAny(x => x.ModList)
|
ModListLocation.AdditionalError = this.WhenAny(x => x.ModList)
|
||||||
.Select<ModListVM, IErrorResponse>(modList =>
|
.Select<ModListVM, IErrorResponse>(modList =>
|
||||||
{
|
{
|
||||||
if (modList == null) return ErrorResponse.Fail("Modlist path resulted in a null object.");
|
if (modList == null) return ErrorResponse.Fail("ModList path resulted in a null object.");
|
||||||
if (modList.Error != null) return ErrorResponse.Fail("Modlist is corrupt", modList.Error);
|
if (modList.Error != null) return ErrorResponse.Fail("ModList is corrupt", modList.Error);
|
||||||
return ErrorResponse.Success;
|
return ErrorResponse.Success;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ namespace Wabbajack
|
|||||||
|
|
||||||
Slideshow = new SlideShow(this);
|
Slideshow = new SlideShow(this);
|
||||||
|
|
||||||
// Set display items to modlist if configuring or complete,
|
// Set display items to ModList if configuring or complete,
|
||||||
// or to the current slideshow data if installing
|
// or to the current slideshow data if installing
|
||||||
_image = Observable.CombineLatest(
|
_image = Observable.CombineLatest(
|
||||||
this.WhenAny(x => x.ModList.Error),
|
this.WhenAny(x => x.ModList.Error),
|
||||||
|
@ -101,7 +101,7 @@ namespace Wabbajack
|
|||||||
var entry = ar.GetEntry(Readme);
|
var entry = ar.GetEntry(Readme);
|
||||||
if (entry == null)
|
if (entry == null)
|
||||||
{
|
{
|
||||||
Utils.Log($"Tried to open a non-existant readme: {Readme}");
|
Utils.Log($"Tried to open a non-existent readme: {Readme}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
using (var e = entry.Open())
|
using (var e = entry.Open())
|
||||||
|
@ -91,7 +91,7 @@ namespace Wabbajack
|
|||||||
.Shuffle(_random)
|
.Shuffle(_random)
|
||||||
.AsObservableChangeSet(x => x.ModID);
|
.AsObservableChangeSet(x => x.ModID);
|
||||||
})
|
})
|
||||||
// Switch to the new list after every modlist change
|
// Switch to the new list after every ModList change
|
||||||
.Switch()
|
.Switch()
|
||||||
// Filter out any NSFW slides if we don't want them
|
// Filter out any NSFW slides if we don't want them
|
||||||
.AutoRefreshOnObservable(slide => this.WhenAny(x => x.ShowNSFW))
|
.AutoRefreshOnObservable(slide => this.WhenAny(x => x.ShowNSFW))
|
||||||
|
Loading…
Reference in New Issue
Block a user