diff --git a/Wabbajack.CLI/Verbs/InstallCompileInstallVerify.cs b/Wabbajack.CLI/Verbs/InstallCompileInstallVerify.cs index 19bcfe47..821a0200 100644 --- a/Wabbajack.CLI/Verbs/InstallCompileInstallVerify.cs +++ b/Wabbajack.CLI/Verbs/InstallCompileInstallVerify.cs @@ -89,17 +89,17 @@ public class InstallCompileInstallVerify : IVerb _logger.LogInformation("Inferring settings"); - var inferedSettings = await _inferencer.InferFromRootPath(installPath); - if (inferedSettings == null) + var inferredSettings = await _inferencer.InferFromRootPath(installPath); + if (inferredSettings == null) { _logger.LogInformation("Error inferencing settings for {MachineUrl}", machineUrl); return 2; } - inferedSettings.UseGamePaths = true; + inferredSettings.UseGamePaths = true; - var compiler = MO2Compiler.Create(_serviceProvider, inferedSettings); + var compiler = MO2Compiler.Create(_serviceProvider, inferredSettings); result = await compiler.Begin(token); if (!result) return result ? 0 : 3; @@ -109,7 +109,7 @@ public class InstallCompileInstallVerify : IVerb var comparison = await StandardInstaller.LoadFromFile(_dtos, wabbajackPath); - var modlist2 = await StandardInstaller.LoadFromFile(_dtos, inferedSettings.OutputFile); + var modlist2 = await StandardInstaller.LoadFromFile(_dtos, inferredSettings.OutputFile); if (CompareModlists(comparison, modlist2)) return 3; @@ -119,7 +119,7 @@ public class InstallCompileInstallVerify : IVerb Install = installPath2, ModList = modlist2, Game = modlist2.GameType, - ModlistArchive = inferedSettings.OutputFile, + ModlistArchive = inferredSettings.OutputFile, GameFolder = _gameLocator.GameLocation(modlist2.GameType) }); @@ -143,6 +143,8 @@ public class InstallCompileInstallVerify : IVerb var found = false; foreach (var missing in aDirectives.Where(ad => !bDirectives.ContainsKey(ad.Key))) { + if (missing.Key.Extension == Ext.Meta) + continue; _logger.LogWarning("File {To} is missing in recompiled list", missing.Key); found = true; } diff --git a/Wabbajack.Compiler/CompilerSettingsInferencer.cs b/Wabbajack.Compiler/CompilerSettingsInferencer.cs index 0e1a633c..df916cf2 100644 --- a/Wabbajack.Compiler/CompilerSettingsInferencer.cs +++ b/Wabbajack.Compiler/CompilerSettingsInferencer.cs @@ -72,7 +72,8 @@ public class CompilerSettingsInferencer _logger.LogInformation("Finding Always Enabled mods"); cs.AlwaysEnabled = Array.Empty(); - // Find Always Enabled mods + + // Find mod tags foreach (var modFolder in mo2Folder.Combine("mods").EnumerateDirectories()) { var iniFile = modFolder.Combine("meta.ini"); @@ -80,9 +81,13 @@ public class CompilerSettingsInferencer var data = iniFile.LoadIniFile(); var generalModData = data["General"]; - if ((generalModData["notes"]?.Contains("WABBAJACK_ALWAYS_ENABLE") ?? false) || - (generalModData["comments"]?.Contains("WABBAJACK_ALWAYS_ENABLE") ?? false)) + if ((generalModData["notes"]?.Contains(Consts.WABBAJACK_ALWAYS_ENABLE) ?? false) || + (generalModData["comments"]?.Contains(Consts.WABBAJACK_ALWAYS_ENABLE) ?? false)) cs.AlwaysEnabled = cs.AlwaysEnabled.Append(modFolder.RelativeTo(mo2Folder)).ToArray(); + + if ((generalModData["notes"]?.Contains(Consts.WABBAJACK_NOMATCH_INCLUDE) ?? false) || + (generalModData["comments"]?.Contains(Consts.WABBAJACK_NOMATCH_INCLUDE) ?? false)) + cs.NoMatchInclude = cs.NoMatchInclude.Append(modFolder.RelativeTo(mo2Folder)).ToArray(); } _logger.LogInformation("Finding other profiles");