Merge latest from master

This commit is contained in:
Timothy Baldridge 2019-11-16 21:30:22 -07:00
parent d92d05dbf8
commit 9db982a13d
4 changed files with 9 additions and 5 deletions

View File

@ -45,7 +45,8 @@ namespace Wabbajack.Lib
public Compiler(string mo2_folder)
{
UpdateTracker = new StatusUpdateTracker(10);
VFS.UpdateTracker = UpdateTracker;
Queue = new WorkQueue();
VFS = new Context(Queue) {UpdateTracker = UpdateTracker};
ModManager = ModManager.MO2;
MO2Folder = mo2_folder;

View File

@ -42,7 +42,8 @@ namespace Wabbajack.Lib
this.VortexFolder = vortexFolder;
this.DownloadsFolder = downloadsFolder;
this.StagingFolder = stagingFolder;
Queue = new WorkQueue();
VFS = new Context(Queue);
ModListOutputFolder = "output_folder";
// TODO: add custom modlist name

View File

@ -6,6 +6,8 @@ namespace Wabbajack.Test
[TestClass]
public class VortexTests : AVortexCompilerTest
{
// TODO: figure out what games we want installed on the test server for this
/*
[TestMethod]
public void TestVortexStackSerialization()
{
@ -13,6 +15,7 @@ namespace Wabbajack.Test
utils.Configure();
var vortexCompiler = ConfigureAndRunCompiler();
vortexCompiler.StagingFolder = "vortex_staging";
var stack = vortexCompiler.MakeStack();
var serialized = Serialization.Serialize(stack);
@ -20,6 +23,8 @@ namespace Wabbajack.Test
Assert.AreEqual(serialized, rounded);
Assert.IsNotNull(vortexCompiler.GetStack());
}
*/
}
}

View File

@ -121,7 +121,6 @@ namespace Wabbajack.VirtualFileSystem
string rel_path)
{
var fi = new FileInfo(abs_path);
context._logSpam.OnNext($"Analyzing {rel_path}");
var self = new VirtualFile
{
Context = context,
@ -135,13 +134,11 @@ namespace Wabbajack.VirtualFileSystem
if (FileExtractor.CanExtract(Path.GetExtension(abs_path)))
{
context._logSpam.OnNext($"Extracting {rel_path}");
using (var tempFolder = context.GetTemporaryFolder())
{
FileExtractor.ExtractAll(context.Queue, abs_path, tempFolder.FullName);
context._logSpam.OnNext($"Analyzing Contents {rel_path}");
self.Children = Directory.EnumerateFiles(tempFolder.FullName, "*", SearchOption.AllDirectories)
.PMap(context.Queue, abs_src => Analyze(context, self, abs_src, abs_src.RelativeTo(tempFolder.FullName)))
.ToImmutableList();