mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
delete BSA folder, include size/hash as part of installed files
This commit is contained in:
parent
47fa4339fc
commit
4f92b2ffa9
@ -22,6 +22,8 @@
|
||||
* Switch out folder selection routines for Win32 APIs, should fix issue #27
|
||||
* Disable the UI while working on things, so users don't accidentally mis-click during installation/loading
|
||||
* Disabled "ignore missing files", it didn't work anyways
|
||||
* Properly delete BSA temp folder after install
|
||||
* Include size and hash for installed files
|
||||
|
||||
#### Version 0.9.1 - 9/5/2019
|
||||
* Fixed a bug where having only one profile selected would result in no profiles being selected
|
||||
|
@ -55,7 +55,7 @@ namespace VFS
|
||||
|
||||
public VirtualFile this[string path] => Lookup(path);
|
||||
|
||||
private static void DeleteDirectory(string path)
|
||||
public static void DeleteDirectory(string path)
|
||||
{
|
||||
var info = new ProcessStartInfo
|
||||
{
|
||||
|
@ -17,6 +17,10 @@ using Newtonsoft.Json;
|
||||
using VFS;
|
||||
using Wabbajack.Common;
|
||||
using static Wabbajack.NexusAPI;
|
||||
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 Wabbajack
|
||||
{
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Alphaleonis.Win32.Filesystem;
|
||||
using Newtonsoft.Json;
|
||||
using VFS;
|
||||
|
||||
@ -24,6 +25,8 @@ namespace Wabbajack
|
||||
{
|
||||
var v = new T();
|
||||
v.To = Path;
|
||||
v.Hash = Hash;
|
||||
v.Size = File.Size;
|
||||
return v;
|
||||
}
|
||||
}
|
||||
@ -59,6 +62,8 @@ namespace Wabbajack
|
||||
/// location the file will be copied to, relative to the install path.
|
||||
/// </summary>
|
||||
public string To;
|
||||
public long Size;
|
||||
public string Hash;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
@ -14,6 +14,10 @@ using Compression.BSA;
|
||||
using K4os.Compression.LZ4.Streams;
|
||||
using VFS;
|
||||
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 Wabbajack
|
||||
{
|
||||
@ -89,8 +93,10 @@ namespace Wabbajack
|
||||
"Existing MO2 installation in install folder",
|
||||
MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Exclamation) == MessageBoxResult.No)
|
||||
{
|
||||
Utils.Log("Existing installation at the request of the user, existing mods folder found.");
|
||||
return;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (ModList.Directives.OfType<RemappedInlineFile>().FirstOrDefault() != null ||
|
||||
@ -245,10 +251,12 @@ namespace Wabbajack
|
||||
}
|
||||
});
|
||||
|
||||
if (Directory.Exists(Consts.BSACreationDir))
|
||||
|
||||
var bsa_dir = Path.Combine(Outputfolder, Consts.BSACreationDir);
|
||||
if (Directory.Exists(bsa_dir))
|
||||
{
|
||||
Info($"Removing temp folder {Consts.BSACreationDir}");
|
||||
Directory.Delete(Path.Combine(Outputfolder, Consts.BSACreationDir), true);
|
||||
VirtualFileSystem.DeleteDirectory(bsa_dir);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,6 +96,9 @@
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="AlphaFS, Version=2.2.0.0, Culture=neutral, PublicKeyToken=4d31a58f7d7ad5c9, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\AlphaFS.2.2.6\lib\net452\AlphaFS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CommonMark, Version=0.1.0.0, Culture=neutral, PublicKeyToken=001ef8810438905d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CommonMark.NET.0.15.1\lib\net45\CommonMark.dll</HintPath>
|
||||
</Reference>
|
||||
@ -153,6 +156,7 @@
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="AlphaFS" version="2.2.6" targetFramework="net472" />
|
||||
<package id="CommonMark.NET" version="0.15.1" targetFramework="net472" />
|
||||
<package id="Costura.Fody" version="4.0.0" targetFramework="net472" />
|
||||
<package id="Fody" version="5.1.1" targetFramework="net472" developmentDependency="true" />
|
||||
|
Loading…
Reference in New Issue
Block a user