mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Install compile install works for SMEFT
This commit is contained in:
@ -89,17 +89,17 @@ public class InstallCompileInstallVerify : IVerb
|
|||||||
|
|
||||||
|
|
||||||
_logger.LogInformation("Inferring settings");
|
_logger.LogInformation("Inferring settings");
|
||||||
var inferedSettings = await _inferencer.InferFromRootPath(installPath);
|
var inferredSettings = await _inferencer.InferFromRootPath(installPath);
|
||||||
if (inferedSettings == null)
|
if (inferredSettings == null)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("Error inferencing settings for {MachineUrl}", machineUrl);
|
_logger.LogInformation("Error inferencing settings for {MachineUrl}", machineUrl);
|
||||||
return 2;
|
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);
|
result = await compiler.Begin(token);
|
||||||
if (!result)
|
if (!result)
|
||||||
return result ? 0 : 3;
|
return result ? 0 : 3;
|
||||||
@ -109,7 +109,7 @@ public class InstallCompileInstallVerify : IVerb
|
|||||||
|
|
||||||
var comparison = await StandardInstaller.LoadFromFile(_dtos, wabbajackPath);
|
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))
|
if (CompareModlists(comparison, modlist2))
|
||||||
return 3;
|
return 3;
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ public class InstallCompileInstallVerify : IVerb
|
|||||||
Install = installPath2,
|
Install = installPath2,
|
||||||
ModList = modlist2,
|
ModList = modlist2,
|
||||||
Game = modlist2.GameType,
|
Game = modlist2.GameType,
|
||||||
ModlistArchive = inferedSettings.OutputFile,
|
ModlistArchive = inferredSettings.OutputFile,
|
||||||
GameFolder = _gameLocator.GameLocation(modlist2.GameType)
|
GameFolder = _gameLocator.GameLocation(modlist2.GameType)
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -143,6 +143,8 @@ public class InstallCompileInstallVerify : IVerb
|
|||||||
var found = false;
|
var found = false;
|
||||||
foreach (var missing in aDirectives.Where(ad => !bDirectives.ContainsKey(ad.Key)))
|
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);
|
_logger.LogWarning("File {To} is missing in recompiled list", missing.Key);
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,8 @@ public class CompilerSettingsInferencer
|
|||||||
|
|
||||||
_logger.LogInformation("Finding Always Enabled mods");
|
_logger.LogInformation("Finding Always Enabled mods");
|
||||||
cs.AlwaysEnabled = Array.Empty<RelativePath>();
|
cs.AlwaysEnabled = Array.Empty<RelativePath>();
|
||||||
// Find Always Enabled mods
|
|
||||||
|
// Find mod tags
|
||||||
foreach (var modFolder in mo2Folder.Combine("mods").EnumerateDirectories())
|
foreach (var modFolder in mo2Folder.Combine("mods").EnumerateDirectories())
|
||||||
{
|
{
|
||||||
var iniFile = modFolder.Combine("meta.ini");
|
var iniFile = modFolder.Combine("meta.ini");
|
||||||
@ -80,9 +81,13 @@ public class CompilerSettingsInferencer
|
|||||||
|
|
||||||
var data = iniFile.LoadIniFile();
|
var data = iniFile.LoadIniFile();
|
||||||
var generalModData = data["General"];
|
var generalModData = data["General"];
|
||||||
if ((generalModData["notes"]?.Contains("WABBAJACK_ALWAYS_ENABLE") ?? false) ||
|
if ((generalModData["notes"]?.Contains(Consts.WABBAJACK_ALWAYS_ENABLE) ?? false) ||
|
||||||
(generalModData["comments"]?.Contains("WABBAJACK_ALWAYS_ENABLE") ?? false))
|
(generalModData["comments"]?.Contains(Consts.WABBAJACK_ALWAYS_ENABLE) ?? false))
|
||||||
cs.AlwaysEnabled = cs.AlwaysEnabled.Append(modFolder.RelativeTo(mo2Folder)).ToArray();
|
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");
|
_logger.LogInformation("Finding other profiles");
|
||||||
|
Reference in New Issue
Block a user