mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Merge pull request #923 from erri120/more-info-manifest
Added InlineFile Directives to the manifest
This commit is contained in:
commit
f4779afd44
@ -144,33 +144,31 @@ namespace Wabbajack.Lib
|
|||||||
ModList.Image = (RelativePath)"modlist-image.png";
|
ModList.Image = (RelativePath)"modlist-image.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
using (var of = await ModListOutputFolder.Combine("modlist").Create())
|
await using (var of = await ModListOutputFolder.Combine("modlist").Create())
|
||||||
ModList.ToJson(of);
|
ModList.ToJson(of);
|
||||||
|
|
||||||
await ModListOutputFile.DeleteAsync();
|
await ModListOutputFile.DeleteAsync();
|
||||||
|
|
||||||
using (var fs = await ModListOutputFile.Create())
|
await using (var fs = await ModListOutputFile.Create())
|
||||||
{
|
{
|
||||||
using (var za = new ZipArchive(fs, ZipArchiveMode.Create))
|
using var za = new ZipArchive(fs, ZipArchiveMode.Create);
|
||||||
|
await ModListOutputFolder.EnumerateFiles()
|
||||||
|
.DoProgress("Compressing ModList",
|
||||||
|
async f =>
|
||||||
{
|
{
|
||||||
await ModListOutputFolder.EnumerateFiles()
|
var ze = za.CreateEntry((string)f.FileName);
|
||||||
.DoProgress("Compressing ModList",
|
await using var os = ze.Open();
|
||||||
async f =>
|
await using var ins = await f.OpenRead();
|
||||||
{
|
await ins.CopyToAsync(os);
|
||||||
var ze = za.CreateEntry((string)f.FileName);
|
});
|
||||||
await using var os = ze.Open();
|
|
||||||
await using var ins = await f.OpenRead();
|
|
||||||
await ins.CopyToAsync(os);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Copy in modimage
|
// Copy in modimage
|
||||||
if (ModListImage.Exists)
|
if (ModListImage.Exists)
|
||||||
{
|
{
|
||||||
var ze = za.CreateEntry((string)ModList.Image);
|
var ze = za.CreateEntry((string)ModList.Image);
|
||||||
await using var os = ze.Open();
|
await using var os = ze.Open();
|
||||||
await using var ins = await ModListImage.OpenRead();
|
await using var ins = await ModListImage.OpenRead();
|
||||||
await ins.CopyToAsync(os);
|
await ins.CopyToAsync(os);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,7 +184,6 @@ namespace Wabbajack.Lib
|
|||||||
};
|
};
|
||||||
metadata.ToJson(ModListOutputFile + ".meta.json");
|
metadata.ToJson(ModListOutputFile + ".meta.json");
|
||||||
|
|
||||||
|
|
||||||
Utils.Log("Removing ModList staging folder");
|
Utils.Log("Removing ModList staging folder");
|
||||||
await Utils.DeleteDirectory(ModListOutputFolder);
|
await Utils.DeleteDirectory(ModListOutputFolder);
|
||||||
}
|
}
|
||||||
|
@ -9,25 +9,26 @@ namespace Wabbajack.Lib
|
|||||||
[JsonName("Manifest")]
|
[JsonName("Manifest")]
|
||||||
public class Manifest
|
public class Manifest
|
||||||
{
|
{
|
||||||
public string Name;
|
public readonly string Name;
|
||||||
public Version Version;
|
public readonly Version Version;
|
||||||
public string Author;
|
public readonly string Author;
|
||||||
public string Description;
|
public readonly string Description;
|
||||||
|
|
||||||
public Game GameType;
|
public readonly Game GameType;
|
||||||
// Enum toString for better parsing in other software
|
// Enum toString for better parsing in other software
|
||||||
public string GameName;
|
public string GameName;
|
||||||
|
|
||||||
public ModManager ModManager;
|
public readonly ModManager ModManager;
|
||||||
// Enum toString for better parsing in other software
|
// Enum toString for better parsing in other software
|
||||||
public string ModManagerName;
|
public string ModManagerName;
|
||||||
|
|
||||||
public long DownloadSize;
|
public readonly long DownloadSize;
|
||||||
public long InstallSize;
|
public readonly long InstallSize;
|
||||||
|
|
||||||
public bool IsNSFW;
|
public bool IsNSFW;
|
||||||
|
|
||||||
public List<Archive> Archives;
|
public readonly List<Archive> Archives;
|
||||||
|
public readonly List<InlineFile> InlinedFiles;
|
||||||
|
|
||||||
public Manifest(ModList modlist)
|
public Manifest(ModList modlist)
|
||||||
{
|
{
|
||||||
@ -54,6 +55,8 @@ namespace Wabbajack.Lib
|
|||||||
Name = a.Name,
|
Name = a.Name,
|
||||||
Size = a.Size,
|
Size = a.Size,
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
|
InlinedFiles = modlist.Directives.OfType<InlineFile>().ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user