public void CreateArchiveTest() { Assert.That(PboArchive.Create("testdata\\cba_common", "cba_common.pbo")); PboArchive pbo = new PboArchive("cba_common.pbo"); Assert.That(pbo.Files.Count == 113); // checksums shoulden't match due to the time. Assert.False(pbo.Checksum.SequenceEqual(_checksum), "Checksum match"); Assert.That(pbo.ProductEntry.Name == "prefix"); Assert.That(pbo.ProductEntry.Prefix == @"x\cba\addons\common"); Assert.That(pbo.ProductEntry.Addtional.Count == 1); // i don't add wonky shit like mikero. }
public static void Main(string[] args) { // ReSharper disable line StringLiteralTypo const string outFolder = "@rof_addons\\addons"; foreach (var directoryPath in Directory.GetDirectories(Directory.GetCurrentDirectory())) { var directory = Path.GetFileName(directoryPath); if (directory is null || directory.StartsWith(".") || directory.StartsWith("@")) { continue; } Console.WriteLine(directory); var outPath = Path.Combine(Directory.GetCurrentDirectory(), outFolder, directory + ".pbo"); PboArchive.Create(directoryPath, outPath); } Console.WriteLine("Done."); }