diff --git a/CHANGELOG.md b/CHANGELOG.md
index 59029231..2bafd5fe 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,15 +5,18 @@
game mods, and will be patched from the ESMs found in the game folder. **Note:** if you have also cleaned the files in the Skyrim
folder, this will result in a broken install. The ESMs in the game folder should be the original ESMs, the cleaned
ESMs should go into their own mod. These files currently only include:
- * Update.esm
- * Dragonborn.esm
- * HearthFires.esm
- * Dawnguard.esm
-* ModOrganizer.ini is now interpreted and included as part of the install. As part of the install users will be asked
-to point to their game folder, and then all the references to the MO2 folder or Game folder in ModOrganizer.ini will
+ * `Update.esm`
+ * `Dragonborn.esm`
+ * `HearthFires.esm`
+ * `Dawnguard.esm`
+* `ModOrganizer.ini` is now interpreted and included as part of the install. As part of the install users will be asked
+to point to their game folder, and then all the references to the MO2 folder or Game folder in `ModOrganizer.ini` will
be remapped to the new locations.
* Progress bars were added to several install/hashing and compilation instructions
* 7zip routines were rewritten to use subprocesses instead of a C# library. This will result in slower indexing and installation
but should have full compatability with all usable archive formats. It should also reduce total memory usage during extraction.
* Added the ability to endorse all used mods at the completion of an install
-* Custom LOOT rules are now included in a special folder in MO2 after install. Users can use this to quickly import new LOOT rules.
\ No newline at end of file
+* Custom LOOT rules are now included in a special folder in MO2 after install. Users can use this to quickly import new LOOT rules.
+* Moved the VFS cache from using BSON to a custom binary encoding. Much faster read/write times and greatly reduced memory usage.
+**Note:** This means that modlist authors will have to re-index their archives with this version. This is automatic but the first
+compilation will take quite some time while the cache reindexes.
\ No newline at end of file
diff --git a/Compression.BSA/BSABuilder.cs b/Compression.BSA/BSABuilder.cs
index e89093e8..ad303d69 100644
--- a/Compression.BSA/BSABuilder.cs
+++ b/Compression.BSA/BSABuilder.cs
@@ -6,6 +6,8 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
+using File = Alphaleonis.Win32.Filesystem.File;
+using Path = Alphaleonis.Win32.Filesystem.Path;
namespace Compression.BSA
{
diff --git a/Compression.BSA/BSAReader.cs b/Compression.BSA/BSAReader.cs
index b3e044a4..92b3d002 100644
--- a/Compression.BSA/BSAReader.cs
+++ b/Compression.BSA/BSAReader.cs
@@ -5,6 +5,7 @@ using System.IO;
using System.Text;
using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
using K4os.Compression.LZ4.Streams;
+using File = Alphaleonis.Win32.Filesystem.File;
namespace Compression.BSA
{
diff --git a/Compression.BSA/Compression.BSA.csproj b/Compression.BSA/Compression.BSA.csproj
index b174d7b9..372343a5 100644
--- a/Compression.BSA/Compression.BSA.csproj
+++ b/Compression.BSA/Compression.BSA.csproj
@@ -50,6 +50,9 @@
MinimumRecommendedRules.ruleset
+
+ ..\packages\AlphaFS.2.2.6\lib\net452\AlphaFS.dll
+
..\packages\SharpZipLib.1.2.0\lib\net45\ICSharpCode.SharpZipLib.dll
@@ -77,6 +80,7 @@
..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll
+
diff --git a/Compression.BSA/Utils.cs b/Compression.BSA/Utils.cs
index 57f12c80..1524e9e2 100644
--- a/Compression.BSA/Utils.cs
+++ b/Compression.BSA/Utils.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Text;
+using Path = Alphaleonis.Win32.Filesystem.Path;
namespace Compression.BSA
{
diff --git a/Compression.BSA/packages.config b/Compression.BSA/packages.config
index c59cc70f..4d29cdb4 100644
--- a/Compression.BSA/packages.config
+++ b/Compression.BSA/packages.config
@@ -1,5 +1,6 @@
+
diff --git a/VirtualFileSystem/VirtualFileSystem.cs b/VirtualFileSystem/VirtualFileSystem.cs
index 6f7b176f..36658dbb 100644
--- a/VirtualFileSystem/VirtualFileSystem.cs
+++ b/VirtualFileSystem/VirtualFileSystem.cs
@@ -8,6 +8,10 @@ using System.IO;
using System.Linq;
using System.Reflection;
using Wabbajack.Common;
+using Directory = Alphaleonis.Win32.Filesystem.Directory;
+using File = Alphaleonis.Win32.Filesystem.File;
+using FileInfo = Alphaleonis.Win32.Filesystem.FileInfo;
+using Path = Alphaleonis.Win32.Filesystem.Path;
namespace VFS
{
@@ -26,7 +30,7 @@ namespace VFS
static VirtualFileSystem()
{
VFS = new VirtualFileSystem();
- RootFolder = ".\\";
+ RootFolder = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
_stagedRoot = Path.Combine(RootFolder, "vfs_staged_files");
if (Directory.Exists(_stagedRoot))
DeleteDirectory(_stagedRoot);
diff --git a/VirtualFileSystem/VirtualFileSystem.csproj b/VirtualFileSystem/VirtualFileSystem.csproj
index 169e9dd9..42ceba52 100644
--- a/VirtualFileSystem/VirtualFileSystem.csproj
+++ b/VirtualFileSystem/VirtualFileSystem.csproj
@@ -32,6 +32,9 @@
4
+
+ ..\packages\AlphaFS.2.2.6\lib\net452\AlphaFS.dll
+
..\packages\SharpZipLib.1.2.0\lib\net45\ICSharpCode.SharpZipLib.dll
@@ -44,6 +47,7 @@
+
diff --git a/VirtualFileSystem/packages.config b/VirtualFileSystem/packages.config
index 50dc981e..a49a0ac7 100644
--- a/VirtualFileSystem/packages.config
+++ b/VirtualFileSystem/packages.config
@@ -1,5 +1,6 @@
+
diff --git a/Wabbajack.Common/FileExtractor.cs b/Wabbajack.Common/FileExtractor.cs
index 3915fb35..f3684851 100644
--- a/Wabbajack.Common/FileExtractor.cs
+++ b/Wabbajack.Common/FileExtractor.cs
@@ -3,12 +3,12 @@ using ICSharpCode.SharpZipLib.Zip;
using System;
using System.Collections.Generic;
using System.Diagnostics;
-using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
+using Alphaleonis.Win32.Filesystem;
using ICSharpCode.SharpZipLib.GZip;
using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
@@ -98,7 +98,11 @@ namespace Wabbajack.Common
p.Start();
ChildProcessTracker.AddProcess(p);
- p.PriorityClass = ProcessPriorityClass.BelowNormal;
+ try
+ {
+ p.PriorityClass = ProcessPriorityClass.BelowNormal;
+ }
+ catch (Exception) { }
p.WaitForExit();
if (p.ExitCode != 0)
diff --git a/Wabbajack.Common/Wabbajack.Common.csproj b/Wabbajack.Common/Wabbajack.Common.csproj
index fc674bfe..06ebff3c 100644
--- a/Wabbajack.Common/Wabbajack.Common.csproj
+++ b/Wabbajack.Common/Wabbajack.Common.csproj
@@ -50,6 +50,9 @@
MinimumRecommendedRules.ruleset
+
+ ..\packages\AlphaFS.2.2.6\lib\net452\AlphaFS.dll
+
..\packages\SharpZipLib.1.1.0\lib\net45\ICSharpCode.SharpZipLib.dll
@@ -69,6 +72,7 @@
+
diff --git a/Wabbajack.Common/packages.config b/Wabbajack.Common/packages.config
index 1d6931e8..b23d8446 100644
--- a/Wabbajack.Common/packages.config
+++ b/Wabbajack.Common/packages.config
@@ -1,5 +1,6 @@
+
diff --git a/Wabbajack/Compiler.cs b/Wabbajack/Compiler.cs
index 97263c67..50cc8fda 100644
--- a/Wabbajack/Compiler.cs
+++ b/Wabbajack/Compiler.cs
@@ -749,17 +749,21 @@ namespace Wabbajack
var stack = default_include ? microstack_with_include : microstack;
- var matches = source_files.PMap(e => RunStack(stack, new RawSourceFile(e)));
-
var id = Guid.NewGuid().ToString();
+ var matches = source_files.PMap(e => RunStack(stack, new RawSourceFile(e)
+ {
+ Path = Path.Combine(Consts.BSACreationDir, id, e.Paths.Last())
+
+ }));
+
+
foreach (var match in matches)
{
if (match is IgnoredDirectly)
{
Error($"File required for BSA creation doesn't exist: {match.To}");
}
- match.To = Path.Combine(Consts.BSACreationDir, id, match.To);
ExtraFiles.Add(match);
};
@@ -818,7 +822,7 @@ namespace Wabbajack
return source =>
{
- if (indexed.TryGetValue(Path.GetFileName(source.Path.ToLower()), out var value))
+ if (indexed.TryGetValue(Path.GetFileName(source.File.Paths.Last().ToLower()), out var value))
{
// TODO: Improve this
var found = value.First();