Enable merging of the ouput

This commit is contained in:
Matt Nadareski
2016-04-19 16:58:47 -07:00
parent 6dd268c3d5
commit 7595601f47
3 changed files with 15 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ namespace SabreTools
Build.Start("DiffDat");
List<String> inputs = new List<String>();
bool tofile = false, help = false;
bool tofile = false, help = false, merge = false; ;
foreach (string arg in args)
{
switch (arg)
@@ -48,6 +48,10 @@ namespace SabreTools
case "--log":
tofile = true;
break;
case "-m":
case "--merge":
merge = true;
break;
default:
// Add actual files to the list of inputs
if (File.Exists(arg.Replace("\"", "")))
@@ -84,6 +88,13 @@ namespace SabreTools
List<RomData> B = RomManipulation.Parse(input, 0, 0, logger);
A = RomManipulation.Diff(A, B);
}
// If we want a merged list, send it for merging before outputting
if (merge)
{
A = RomManipulation.Merge(A);
}
Output.WriteToDat("diffdat", "diffdat", "", "", "DiffDat", "SabreTools", false, !RomManipulation.IsXmlDat(inputs[0]), "", A, logger);
}
}

View File

@@ -71,9 +71,9 @@ Experimental tool for trimming all files in DAT (or folder of DATs) so that they
<p/>
A program to create a DAT based on the differences between two or more input DATs.
<ul>
<li>Intended for use with DATs in the same "family", e.g. a DAT and a fixdat generated from it or two different fixdats</li>
<li>Read in from commandline, drag-and-drop, a directory, or any combination</li>
<li>Output type automatically determined by the first input file</li>
<li>Merge the output DAT so no partial duplicates are included</li>
</ul>
<b>DatToMiss</b>

View File

@@ -163,7 +163,8 @@ Usage: DiffDat [options] [filename] [filename] ...
Options:
-h, -?, --help Show this help dialog
-l, --log Enable log to file");
-l, --log Enable log to file
-m, --merge Enable merging in the created DAT");
break;
default:
Console.Write("This is the default help output");