diff --git a/SabreTools.Core/Constants.cs b/SabreTools.Core/Constants.cs
index 8f5026b1..8f9f3747 100644
--- a/SabreTools.Core/Constants.cs
+++ b/SabreTools.Core/Constants.cs
@@ -1,5 +1,4 @@
-using System;
-using System.IO;
+using System.IO;
using System.Reflection;
namespace SabreTools.Core
@@ -84,381 +83,6 @@ namespace SabreTools.Core
#endregion
- #region Byte (1000-based) size comparisons
-
- public const long KiloByte = 1000;
- public readonly static long MegaByte = (long)Math.Pow(KiloByte, 2);
- public readonly static long GigaByte = (long)Math.Pow(KiloByte, 3);
- public readonly static long TeraByte = (long)Math.Pow(KiloByte, 4);
- public readonly static long PetaByte = (long)Math.Pow(KiloByte, 5);
- public readonly static long ExaByte = (long)Math.Pow(KiloByte, 6);
- public readonly static long ZettaByte = (long)Math.Pow(KiloByte, 7);
- public readonly static long YottaByte = (long)Math.Pow(KiloByte, 8);
-
- #endregion
-
- #region Byte (1024-based) size comparisons
-
- public const long KibiByte = 1024;
- public readonly static long MibiByte = (long)Math.Pow(KibiByte, 2);
- public readonly static long GibiByte = (long)Math.Pow(KibiByte, 3);
- public readonly static long TibiByte = (long)Math.Pow(KibiByte, 4);
- public readonly static long PibiByte = (long)Math.Pow(KibiByte, 5);
- public readonly static long ExiByte = (long)Math.Pow(KibiByte, 6);
- public readonly static long ZittiByte = (long)Math.Pow(KibiByte, 7);
- public readonly static long YittiByte = (long)Math.Pow(KibiByte, 8);
-
- #endregion
-
- #region Database schema
-
- public static string HeadererFileName = Path.Combine(Globals.ExeDir, "Headerer.sqlite");
- public static string HeadererConnectionString = $"Data Source={HeadererFileName};Version = 3;";
-
- #endregion
-
- #region DTDs
-
- public const string LogiqxDTD = @"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-";
- public const string MAMEDTD = @"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-";
- public const string OpenMSXDTD = @"
-
-
-
-
-
-
-
-
-";
- public const string SoftwareListDTD = @"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-";
-
- #endregion
-
#region Hash string length constants
public const int CRCLength = 8;
@@ -473,66 +97,6 @@ namespace SabreTools.Core
#endregion
- #region Magic numbers
-
- public static readonly byte[] SevenZipSignature = { 0x37, 0x7a, 0xbc, 0xaf, 0x27, 0x1c };
- public static readonly byte[] A7800SignatureV1 = { 0x41, 0x54, 0x41, 0x52, 0x49, 0x37, 0x38, 0x30, 0x30 }; // Offset 0x01
- public static readonly byte[] A7800SignatureV2 = { 0x41, 0x43, 0x54, 0x55, 0x41, 0x4c, 0x20, 0x43, 0x41, 0x52, 0x54, 0x20, 0x44, 0x41,
- 0x54, 0x41, 0x20, 0x53, 0x54, 0x41, 0x52, 0x54, 0x53, 0x20, 0x48, 0x45, 0x52, 0x45 }; // Offset 0x64
- public static readonly byte[] AaruFormatSignature = { 0x41, 0x41, 0x52, 0x55, 0x46, 0x52, 0x4d, 0x54 };
- public static readonly byte[] BZ2Signature = { 0x42, 0x5a, 0x68 };
- public static readonly byte[] CabinetSignature = { 0x4d, 0x53, 0x43, 0x46 };
- public static readonly byte[] CHDSignature = { 0x4d, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x48, 0x44 };
- public static readonly byte[] ELFSignature = { 0x7f, 0x45, 0x4c, 0x46 };
- public static readonly byte[] FDSSignatureV1 = { 0x46, 0x44, 0x53, 0x1a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
- public static readonly byte[] FDSSignatureV2 = { 0x46, 0x44, 0x53, 0x1a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
- public static readonly byte[] FDSSignatureV3 = { 0x46, 0x44, 0x53, 0x1a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
- public static readonly byte[] FDSSignatureV4 = { 0x46, 0x44, 0x53, 0x1a, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
- public static readonly byte[] FreeArcSignature = { 0x41, 0x72, 0x43, 0x01 };
- public static readonly byte[] GzSignature = { 0x1f, 0x8b, 0x08 };
- public static readonly byte[] LRZipSignature = { 0x4c, 0x52, 0x5a, 0x49 };
- public static readonly byte[] LynxSignatureV1 = { 0x4c, 0x59, 0x4f, 0x58 };
- public static readonly byte[] LynxSignatureV2 = { 0x42, 0x53, 0x39 }; // Offset 0x06
- public static readonly byte[] LZ4Signature = { 0x18, 0x4d, 0x22, 0x04 };
- public static readonly byte[] LZ4SkippableMinSignature = { 0x18, 0x4d, 0x22, 0x04 };
- public static readonly byte[] LZ4SkippableMaxSignature = { 0x18, 0x4d, 0x2a, 0x5f };
- public static readonly byte[] N64Signature = { 0x40, 0x12, 0x37, 0x80 };
- public static readonly byte[] NESSignature = { 0x4e, 0x45, 0x53, 0x1a };
- public static readonly byte[] PCESignature = { 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xbb, 0x02 };
- public static readonly byte[] PESignature = { 0x4d, 0x5a };
- public static readonly byte[] PSIDSignatureV1 = { 0x50, 0x53, 0x49, 0x44, 0x00, 0x01, 0x00, 0x76 };
- public static readonly byte[] PSIDSignatureV2 = { 0x50, 0x53, 0x49, 0x44, 0x00, 0x02, 0x00, 0x7c };
- public static readonly byte[] PSIDSignatureV3 = { 0x50, 0x53, 0x49, 0x44, 0x00, 0x03, 0x00, 0x7c };
- public static readonly byte[] RarSignature = { 0x52, 0x61, 0x72, 0x21, 0x1a, 0x07, 0x00 };
- public static readonly byte[] RarFiveSignature = { 0x52, 0x61, 0x72, 0x21, 0x1a, 0x07, 0x01, 0x00 };
- public static readonly byte[] SMCSignature = { 0xaa, 0xbb, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00 }; // Offset 0x16
- public static readonly byte[] SPCSignature = { 0x53, 0x4e, 0x45, 0x53, 0x2d, 0x53, 0x50, 0x43 };
- public static readonly byte[] TarSignature = { 0x75, 0x73, 0x74, 0x61, 0x72, 0x20, 0x20, 0x00 };
- public static readonly byte[] TarZeroSignature = { 0x75, 0x73, 0x74, 0x61, 0x72, 0x00, 0x30, 0x30 };
- public static readonly byte[] UFOSignature = { 0x53, 0x55, 0x50, 0x45, 0x52, 0x55, 0x46, 0x4f }; // Offset 0x16
- public static readonly byte[] V64Signature = { 0x80, 0x37, 0x12, 0x40 };
- public static readonly byte[] XZSignature = { 0xfd, 0x37, 0x7a, 0x58, 0x5a, 0x00, 0x00 };
- public static readonly byte[] Z64Signature = { 0x37, 0x80, 0x40, 0x12 };
- public static readonly byte[] ZipSignature = { 0x50, 0x4b, 0x03, 0x04 };
- public static readonly byte[] ZipSignatureEmpty = { 0x50, 0x4b, 0x05, 0x06 };
- public static readonly byte[] ZipSignatureSpanned = { 0x50, 0x4b, 0x07, 0x08 };
- public static readonly byte[] ZPAQSignature = { 0x7a, 0x50, 0x51 };
- public static readonly byte[] ZstdSignature = { 0xfd, 0x2f, 0xb5 };
-
- #endregion
-
- #region Regular Expressions
-
- public const string XmlPattern = @"<(.*?)>(.*?)(.*?)>";
- public const string HeaderPatternCMP = @"(^.*?) \($";
- public const string InternalPatternCMP = @"(^\S*?) (\(.+\))$";
- public const string InternalPatternAttributesCMP = @"[^\s""]+|""[^""]*""";
- //public const string InternalPatternAttributesCMP = @"([^\s]*""[^""]+""[^\s]*)|[^""]?\w+[^""]?";
- public const string ItemPatternCMP = @"^\s*(\S*?) (.*)";
- public const string EndPatternCMP = @"^\s*\)\s*$";
-
- #endregion
-
#region TorrentZip, T7z, and TGZ headers
/* TorrentZip Header Format
diff --git a/SabreTools.DatFiles/Listxml.cs b/SabreTools.DatFiles/Listxml.cs
index 56aea1cc..3e86f431 100644
--- a/SabreTools.DatFiles/Listxml.cs
+++ b/SabreTools.DatFiles/Listxml.cs
@@ -18,6 +18,174 @@ namespace SabreTools.DatFiles
///
internal class Listxml : DatFile
{
+ ///
+ /// DTD for original MAME XML DATs
+ ///
+ private const string MAMEDTD = @"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+";
+
///
/// Constructor designed for casting a base DatFile
///
diff --git a/SabreTools.DatFiles/Logiqx.cs b/SabreTools.DatFiles/Logiqx.cs
index 2ad4b9e2..196248d9 100644
--- a/SabreTools.DatFiles/Logiqx.cs
+++ b/SabreTools.DatFiles/Logiqx.cs
@@ -22,6 +22,110 @@ namespace SabreTools.DatFiles
// Private instance variables specific to Logiqx DATs
private readonly bool _deprecated;
+ ///
+ /// DTD for original Logiqx DATs
+ ///
+ private const string LogiqxDTD = @"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+";
+
///
/// Constructor designed for casting a base DatFile
///
diff --git a/SabreTools.DatFiles/OpenMSX.cs b/SabreTools.DatFiles/OpenMSX.cs
index 8b8dfed7..a1a83473 100644
--- a/SabreTools.DatFiles/OpenMSX.cs
+++ b/SabreTools.DatFiles/OpenMSX.cs
@@ -17,6 +17,20 @@ namespace SabreTools.DatFiles
///
internal class OpenMSX : DatFile
{
+ ///
+ /// DTD for original openMSX DATs
+ ///
+ private const string OpenMSXDTD = @"
+
+
+
+
+
+
+
+
+";
+
///
/// Constructor designed for casting a base DatFile
///
diff --git a/SabreTools.DatFiles/SoftwareList.cs b/SabreTools.DatFiles/SoftwareList.cs
index d2b3dfb0..63c220e0 100644
--- a/SabreTools.DatFiles/SoftwareList.cs
+++ b/SabreTools.DatFiles/SoftwareList.cs
@@ -19,6 +19,73 @@ namespace SabreTools.DatFiles
///
internal class SoftwareList : DatFile
{
+ ///
+ /// DTD for original MAME Software List DATs
+ ///
+ private const string SoftwareListDTD = @"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+";
+
///
/// Constructor designed for casting a base DatFile
///
diff --git a/SabreTools.FileTypes/BaseFile.cs b/SabreTools.FileTypes/BaseFile.cs
index eef31e87..f4ae2578 100644
--- a/SabreTools.FileTypes/BaseFile.cs
+++ b/SabreTools.FileTypes/BaseFile.cs
@@ -13,6 +13,34 @@ namespace SabreTools.FileTypes
{
public class BaseFile
{
+ #region Constants
+
+ private static readonly byte[] SevenZipSignature = { 0x37, 0x7a, 0xbc, 0xaf, 0x27, 0x1c };
+ private static readonly byte[] AaruFormatSignature = { 0x41, 0x41, 0x52, 0x55, 0x46, 0x52, 0x4d, 0x54 };
+ private static readonly byte[] BZ2Signature = { 0x42, 0x5a, 0x68 };
+ private static readonly byte[] CabinetSignature = { 0x4d, 0x53, 0x43, 0x46 };
+ private static readonly byte[] CHDSignature = { 0x4d, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x48, 0x44 };
+ private static readonly byte[] ELFSignature = { 0x7f, 0x45, 0x4c, 0x46 };
+ private static readonly byte[] FreeArcSignature = { 0x41, 0x72, 0x43, 0x01 };
+ private static readonly byte[] GzSignature = { 0x1f, 0x8b, 0x08 };
+ private static readonly byte[] LRZipSignature = { 0x4c, 0x52, 0x5a, 0x49 };
+ private static readonly byte[] LZ4Signature = { 0x18, 0x4d, 0x22, 0x04 };
+ private static readonly byte[] LZ4SkippableMinSignature = { 0x18, 0x4d, 0x22, 0x04 };
+ private static readonly byte[] LZ4SkippableMaxSignature = { 0x18, 0x4d, 0x2a, 0x5f };
+ private static readonly byte[] PESignature = { 0x4d, 0x5a };
+ private static readonly byte[] RarSignature = { 0x52, 0x61, 0x72, 0x21, 0x1a, 0x07, 0x00 };
+ private static readonly byte[] RarFiveSignature = { 0x52, 0x61, 0x72, 0x21, 0x1a, 0x07, 0x01, 0x00 };
+ private static readonly byte[] TarSignature = { 0x75, 0x73, 0x74, 0x61, 0x72, 0x20, 0x20, 0x00 };
+ private static readonly byte[] TarZeroSignature = { 0x75, 0x73, 0x74, 0x61, 0x72, 0x00, 0x30, 0x30 };
+ private static readonly byte[] XZSignature = { 0xfd, 0x37, 0x7a, 0x58, 0x5a, 0x00, 0x00 };
+ private static readonly byte[] ZipSignature = { 0x50, 0x4b, 0x03, 0x04 };
+ private static readonly byte[] ZipSignatureEmpty = { 0x50, 0x4b, 0x05, 0x06 };
+ private static readonly byte[] ZipSignatureSpanned = { 0x50, 0x4b, 0x07, 0x08 };
+ private static readonly byte[] ZPAQSignature = { 0x7a, 0x50, 0x51 };
+ private static readonly byte[] ZstdSignature = { 0xfd, 0x2f, 0xb5 };
+
+ #endregion
+
// TODO: Get all of these values automatically so there is no public "set"
#region Fields
@@ -188,57 +216,57 @@ namespace SabreTools.FileTypes
br.Dispose();
// Now try to match it to a known signature
- if (magic.StartsWith(Constants.SevenZipSignature))
+ if (magic.StartsWith(SevenZipSignature))
{
outFileType = FileType.SevenZipArchive;
}
- else if (magic.StartsWith(Constants.AaruFormatSignature))
+ else if (magic.StartsWith(AaruFormatSignature))
{
outFileType = FileType.AaruFormat;
}
- else if (magic.StartsWith(Constants.CHDSignature))
+ else if (magic.StartsWith(CHDSignature))
{
outFileType = FileType.CHD;
}
- else if (magic.StartsWith(Constants.GzSignature))
+ else if (magic.StartsWith(GzSignature))
{
outFileType = FileType.GZipArchive;
}
- else if (magic.StartsWith(Constants.LRZipSignature))
+ else if (magic.StartsWith(LRZipSignature))
{
outFileType = FileType.LRZipArchive;
}
- else if (magic.StartsWith(Constants.LZ4Signature)
- || magic.StartsWith(Constants.LZ4SkippableMinSignature)
- || magic.StartsWith(Constants.LZ4SkippableMaxSignature))
+ else if (magic.StartsWith(LZ4Signature)
+ || magic.StartsWith(LZ4SkippableMinSignature)
+ || magic.StartsWith(LZ4SkippableMaxSignature))
{
outFileType = FileType.LZ4Archive;
}
- else if (magic.StartsWith(Constants.RarSignature)
- || magic.StartsWith(Constants.RarFiveSignature))
+ else if (magic.StartsWith(RarSignature)
+ || magic.StartsWith(RarFiveSignature))
{
outFileType = FileType.RarArchive;
}
- else if (magic.StartsWith(Constants.TarSignature)
- || magic.StartsWith(Constants.TarZeroSignature))
+ else if (magic.StartsWith(TarSignature)
+ || magic.StartsWith(TarZeroSignature))
{
outFileType = FileType.TapeArchive;
}
- else if (magic.StartsWith(Constants.XZSignature))
+ else if (magic.StartsWith(XZSignature))
{
outFileType = FileType.XZArchive;
}
- else if (magic.StartsWith(Constants.ZipSignature)
- || magic.StartsWith(Constants.ZipSignatureEmpty)
- || magic.StartsWith(Constants.ZipSignatureSpanned))
+ else if (magic.StartsWith(ZipSignature)
+ || magic.StartsWith(ZipSignatureEmpty)
+ || magic.StartsWith(ZipSignatureSpanned))
{
outFileType = FileType.ZipArchive;
}
- else if (magic.StartsWith(Constants.ZPAQSignature))
+ else if (magic.StartsWith(ZPAQSignature))
{
outFileType = FileType.ZPAQArchive;
}
- else if (magic.StartsWith(Constants.ZstdSignature))
+ else if (magic.StartsWith(ZstdSignature))
{
outFileType = FileType.ZstdArchive;
}
diff --git a/SabreTools.IO/ClrMameProReader.cs b/SabreTools.IO/ClrMameProReader.cs
index b2274403..d63f9d9d 100644
--- a/SabreTools.IO/ClrMameProReader.cs
+++ b/SabreTools.IO/ClrMameProReader.cs
@@ -11,6 +11,17 @@ namespace SabreTools.IO
{
public class ClrMameProReader : IDisposable
{
+ #region Constants
+
+ public const string HeaderPatternCMP = @"(^.*?) \($";
+ public const string InternalPatternCMP = @"(^\S*?) (\(.+\))$";
+ public const string InternalPatternAttributesCMP = @"[^\s""]+|""[^""]*""";
+ //public const string InternalPatternAttributesCMP = @"([^\s]*""[^""]+""[^\s]*)|[^""]?\w+[^""]?";
+ public const string ItemPatternCMP = @"^\s*(\S*?) (.*)";
+ public const string EndPatternCMP = @"^\s*\)\s*$";
+
+ #endregion
+
///
/// Internal stream reader for inputting
///
@@ -130,9 +141,9 @@ namespace SabreTools.IO
}
// Top-level
- else if (Regex.IsMatch(CurrentLine, Constants.HeaderPatternCMP))
+ else if (Regex.IsMatch(CurrentLine, HeaderPatternCMP))
{
- GroupCollection gc = Regex.Match(CurrentLine, Constants.HeaderPatternCMP).Groups;
+ GroupCollection gc = Regex.Match(CurrentLine, HeaderPatternCMP).Groups;
string normalizedValue = gc[1].Value.ToLowerInvariant();
Internal = null;
@@ -143,9 +154,9 @@ namespace SabreTools.IO
}
// Internal
- else if (Regex.IsMatch(CurrentLine, Constants.InternalPatternCMP))
+ else if (Regex.IsMatch(CurrentLine, InternalPatternCMP))
{
- GroupCollection gc = Regex.Match(CurrentLine, Constants.InternalPatternCMP).Groups;
+ GroupCollection gc = Regex.Match(CurrentLine, InternalPatternCMP).Groups;
string normalizedValue = gc[1].Value.ToLowerInvariant();
string[] linegc = SplitLineAsCMP(gc[2].Value);
@@ -232,9 +243,9 @@ namespace SabreTools.IO
}
// Standalone
- else if (Regex.IsMatch(CurrentLine, Constants.ItemPatternCMP))
+ else if (Regex.IsMatch(CurrentLine, ItemPatternCMP))
{
- GroupCollection gc = Regex.Match(CurrentLine, Constants.ItemPatternCMP).Groups;
+ GroupCollection gc = Regex.Match(CurrentLine, ItemPatternCMP).Groups;
string itemval = gc[2].Value.Replace("\"", string.Empty);
Internal = null;
@@ -244,7 +255,7 @@ namespace SabreTools.IO
}
// End section
- else if (Regex.IsMatch(CurrentLine, Constants.EndPatternCMP))
+ else if (Regex.IsMatch(CurrentLine, EndPatternCMP))
{
Internal = null;
InternalName = null;
@@ -281,7 +292,7 @@ namespace SabreTools.IO
// Now we get each string, divided up as cleanly as possible
string[] matches = Regex
- .Matches(s, Constants.InternalPatternAttributesCMP)
+ .Matches(s, InternalPatternAttributesCMP)
.Cast()
.Select(m => m.Groups[0].Value)
.ToArray();
diff --git a/SabreTools/Features/BaseFeature.cs b/SabreTools/Features/BaseFeature.cs
index 46d2f1aa..8309f459 100644
--- a/SabreTools/Features/BaseFeature.cs
+++ b/SabreTools/Features/BaseFeature.cs
@@ -71,16 +71,49 @@ namespace SabreTools.Features
#endregion
+ #region Constants
+
+ public static string HeadererFileName = Path.Combine(Globals.ExeDir, "Headerer.sqlite");
+ public static string HeadererConnectionString = $"Data Source={HeadererFileName};Version = 3;";
+
+ #region Byte (1000-based) size comparisons
+
+ private const long KiloByte = 1000;
+ private readonly static long MegaByte = (long)Math.Pow(KiloByte, 2);
+ private readonly static long GigaByte = (long)Math.Pow(KiloByte, 3);
+ private readonly static long TeraByte = (long)Math.Pow(KiloByte, 4);
+ private readonly static long PetaByte = (long)Math.Pow(KiloByte, 5);
+ private readonly static long ExaByte = (long)Math.Pow(KiloByte, 6);
+ private readonly static long ZettaByte = (long)Math.Pow(KiloByte, 7);
+ private readonly static long YottaByte = (long)Math.Pow(KiloByte, 8);
+
+ #endregion
+
+ #region Byte (1024-based) size comparisons
+
+ private const long KibiByte = 1024;
+ private readonly static long MibiByte = (long)Math.Pow(KibiByte, 2);
+ private readonly static long GibiByte = (long)Math.Pow(KibiByte, 3);
+ private readonly static long TibiByte = (long)Math.Pow(KibiByte, 4);
+ private readonly static long PibiByte = (long)Math.Pow(KibiByte, 5);
+ private readonly static long ExiByte = (long)Math.Pow(KibiByte, 6);
+ private readonly static long ZittiByte = (long)Math.Pow(KibiByte, 7);
+ private readonly static long YittiByte = (long)Math.Pow(KibiByte, 8);
+
+ #endregion
+
+ #endregion
+
#region Features
#region Flag features
internal const string AaruFormatsAsFilesValue = "aaruformats-as-files";
- internal static Help.Feature AaruFormatsAsFilesFlag
+ internal static Feature AaruFormatsAsFilesFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
AaruFormatsAsFilesValue,
new List() { "-caf", "--aaruformats-as-files" },
"Treat AaruFormats as files",
@@ -90,11 +123,11 @@ namespace SabreTools.Features
}
internal const string AddBlankFilesValue = "add-blank-files";
- internal static Help.Feature AddBlankFilesFlag
+ internal static Feature AddBlankFilesFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
AddBlankFilesValue,
new List() { "-ab", "--add-blank-files" },
"Output blank files for folders",
@@ -104,11 +137,11 @@ namespace SabreTools.Features
}
internal const string AddDateValue = "add-date";
- internal static Help.Feature AddDateFlag
+ internal static Feature AddDateFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
AddDateValue,
new List() { "-ad", "--add-date" },
"Add dates to items, where possible",
@@ -118,11 +151,11 @@ namespace SabreTools.Features
}
internal const string ArchivesAsFilesValue = "archives-as-files";
- internal static Help.Feature ArchivesAsFilesFlag
+ internal static Feature ArchivesAsFilesFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
ArchivesAsFilesValue,
new List() { "-aaf", "--archives-as-files" },
"Treat archives as files",
@@ -132,11 +165,11 @@ namespace SabreTools.Features
}
internal const string BaddumpColumnValue = "baddump-column";
- internal static Help.Feature BaddumpColumnFlag
+ internal static Feature BaddumpColumnFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
BaddumpColumnValue,
new List() { "-bc", "--baddump-column" },
"Add baddump stats to output",
@@ -146,11 +179,11 @@ namespace SabreTools.Features
}
internal const string BaseValue = "base";
- internal static Help.Feature BaseFlag
+ internal static Feature BaseFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
BaseValue,
new List() { "-ba", "--base" },
"Use source DAT as base name for outputs",
@@ -160,11 +193,11 @@ namespace SabreTools.Features
}
internal const string BaseReplaceValue = "base-replace";
- internal static Help.Feature BaseReplaceFlag
+ internal static Feature BaseReplaceFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
BaseReplaceValue,
new List() { "-br", "--base-replace" },
"Replace from base DATs in order",
@@ -174,11 +207,11 @@ namespace SabreTools.Features
}
internal const string ByGameValue = "by-game";
- internal static Help.Feature ByGameFlag
+ internal static Feature ByGameFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
ByGameValue,
new List() { "-bg", "--by-game" },
"Diff against by game instead of hashes",
@@ -188,11 +221,11 @@ namespace SabreTools.Features
}
internal const string ChdsAsFilesValue = "chds-as-files";
- internal static Help.Feature ChdsAsFilesFlag
+ internal static Feature ChdsAsFilesFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
ChdsAsFilesValue,
new List() { "-ic", "--chds-as-files" },
"Treat CHDs as regular files",
@@ -202,11 +235,11 @@ namespace SabreTools.Features
}
internal const string CleanValue = "clean";
- internal static Help.Feature CleanFlag
+ internal static Feature CleanFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
CleanValue,
new List() { "-clean", "--clean" },
"Clean game names according to WoD standards",
@@ -216,11 +249,11 @@ namespace SabreTools.Features
}
internal const string DatDeviceNonMergedValue = "dat-device-non-merged";
- internal static Help.Feature DatDeviceNonMergedFlag
+ internal static Feature DatDeviceNonMergedFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
DatDeviceNonMergedValue,
new List() { "-dnd", "--dat-device-non-merged" },
"Create device non-merged sets",
@@ -230,11 +263,11 @@ namespace SabreTools.Features
}
internal const string DatFullNonMergedValue = "dat-full-non-merged";
- internal static Help.Feature DatFullNonMergedFlag
+ internal static Feature DatFullNonMergedFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
DatFullNonMergedValue,
new List() { "-df", "--dat-full-non-merged" },
"Create fully non-merged sets",
@@ -244,11 +277,11 @@ namespace SabreTools.Features
}
internal const string DatMergedValue = "dat-merged";
- internal static Help.Feature DatMergedFlag
+ internal static Feature DatMergedFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
DatMergedValue,
new List() { "-dm", "--dat-merged" },
"Force creating merged sets",
@@ -258,11 +291,11 @@ namespace SabreTools.Features
}
internal const string DatNonMergedValue = "dat-non-merged";
- internal static Help.Feature DatNonMergedFlag
+ internal static Feature DatNonMergedFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
DatNonMergedValue,
new List() { "-dnm", "--dat-non-merged" },
"Force creating non-merged sets",
@@ -272,11 +305,11 @@ namespace SabreTools.Features
}
internal const string DatSplitValue = "dat-split";
- internal static Help.Feature DatSplitFlag
+ internal static Feature DatSplitFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
DatSplitValue,
new List() { "-ds", "--dat-split" },
"Force creating split sets",
@@ -286,11 +319,11 @@ namespace SabreTools.Features
}
internal const string DedupValue = "dedup";
- internal static Help.Feature DedupFlag
+ internal static Feature DedupFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
DedupValue,
new List() { "-dd", "--dedup" },
"Enable deduping in the created DAT",
@@ -300,11 +333,11 @@ namespace SabreTools.Features
}
internal const string DeleteValue = "delete";
- internal static Help.Feature DeleteFlag
+ internal static Feature DeleteFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
DeleteValue,
new List() { "-del", "--delete" },
"Delete fully rebuilt input files",
@@ -314,11 +347,11 @@ namespace SabreTools.Features
}
internal const string DepotValue = "depot";
- internal static Help.Feature DepotFlag
+ internal static Feature DepotFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
DepotValue,
new List() { "-dep", "--depot" },
"Assume directories are Romba depots",
@@ -328,11 +361,11 @@ namespace SabreTools.Features
}
internal const string DeprecatedValue = "deprecated";
- internal static Help.Feature DeprecatedFlag
+ internal static Feature DeprecatedFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
DeprecatedValue,
new List() { "-dpc", "--deprecated" },
"Output 'game' instead of 'machine'",
@@ -342,11 +375,11 @@ namespace SabreTools.Features
}
internal const string DescriptionAsNameValue = "description-as-name";
- internal static Help.Feature DescriptionAsNameFlag
+ internal static Feature DescriptionAsNameFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
DescriptionAsNameValue,
new List() { "-dan", "--description-as-name" },
"Use description instead of machine name",
@@ -356,11 +389,11 @@ namespace SabreTools.Features
}
internal const string DiffAgainstValue = "diff-against";
- internal static Help.Feature DiffAgainstFlag
+ internal static Feature DiffAgainstFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
DiffAgainstValue,
new List() { "-dag", "--diff-against" },
"Diff all inputs against a set of base DATs",
@@ -370,11 +403,11 @@ namespace SabreTools.Features
}
internal const string DiffAllValue = "diff-all";
- internal static Help.Feature DiffAllFlag
+ internal static Feature DiffAllFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
DiffAllValue,
new List() { "-di", "--diff-all" },
"Create diffdats from inputs (all standard outputs)",
@@ -384,11 +417,11 @@ namespace SabreTools.Features
}
internal const string DiffCascadeValue = "diff-cascade";
- internal static Help.Feature DiffCascadeFlag
+ internal static Feature DiffCascadeFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
DiffCascadeValue,
new List() { "-dc", "--diff-cascade" },
"Enable cascaded diffing",
@@ -398,11 +431,11 @@ namespace SabreTools.Features
}
internal const string DiffDuplicatesValue = "diff-duplicates";
- internal static Help.Feature DiffDuplicatesFlag
+ internal static Feature DiffDuplicatesFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
DiffDuplicatesValue,
new List() { "-did", "--diff-duplicates" },
"Create diffdat containing just duplicates",
@@ -412,11 +445,11 @@ namespace SabreTools.Features
}
internal const string DiffIndividualsValue = "diff-individuals";
- internal static Help.Feature DiffIndividualsFlag
+ internal static Feature DiffIndividualsFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
DiffIndividualsValue,
new List() { "-dii", "--diff-individuals" },
"Create diffdats for individual DATs",
@@ -426,11 +459,11 @@ namespace SabreTools.Features
}
internal const string DiffNoDuplicatesValue = "diff-no-duplicates";
- internal static Help.Feature DiffNoDuplicatesFlag
+ internal static Feature DiffNoDuplicatesFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
DiffNoDuplicatesValue,
new List() { "-din", "--diff-no-duplicates" },
"Create diffdat containing no duplicates",
@@ -440,11 +473,11 @@ namespace SabreTools.Features
}
internal const string DiffReverseCascadeValue = "diff-reverse-cascade";
- internal static Help.Feature DiffReverseCascadeFlag
+ internal static Feature DiffReverseCascadeFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
DiffReverseCascadeValue,
new List() { "-drc", "--diff-reverse-cascade" },
"Enable reverse cascaded diffing",
@@ -454,11 +487,11 @@ namespace SabreTools.Features
}
internal const string ExtensionValue = "extension";
- internal static Help.Feature ExtensionFlag
+ internal static Feature ExtensionFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
ExtensionValue,
new List() { "-es", "--extension" },
"Split DAT(s) by two file extensions",
@@ -468,11 +501,11 @@ namespace SabreTools.Features
}
internal const string GameDedupValue = "game-dedup";
- internal static Help.Feature GameDedupFlag
+ internal static Feature GameDedupFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
GameDedupValue,
new List() { "-gdd", "--game-dedup" },
"Enable deduping within games in the created DAT",
@@ -482,11 +515,11 @@ namespace SabreTools.Features
}
internal const string GamePrefixValue = "game-prefix";
- internal static Help.Feature GamePrefixFlag
+ internal static Feature GamePrefixFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
GamePrefixValue,
new List() { "-gp", "--game-prefix" },
"Add game name as a prefix",
@@ -496,11 +529,11 @@ namespace SabreTools.Features
}
internal const string HashValue = "hash";
- internal static Help.Feature HashFlag
+ internal static Feature HashFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
HashValue,
new List() { "-hs", "--hash" },
"Split DAT(s) or folder by best-available hashes",
@@ -510,11 +543,11 @@ namespace SabreTools.Features
}
internal const string HashOnlyValue = "hash-only";
- internal static Help.Feature HashOnlyFlag
+ internal static Feature HashOnlyFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
HashOnlyValue,
new List() { "-ho", "--hash-only" },
"Check files by hash only",
@@ -524,11 +557,11 @@ namespace SabreTools.Features
}
internal const string IndividualValue = "individual";
- internal static Help.Feature IndividualFlag
+ internal static Feature IndividualFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
IndividualValue,
new List() { "-ind", "--individual" },
"Process input DATs individually",
@@ -538,11 +571,11 @@ namespace SabreTools.Features
}
internal const string InplaceValue = "inplace";
- internal static Help.Feature InplaceFlag
+ internal static Feature InplaceFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
InplaceValue,
new List() { "-ip", "--inplace" },
"Write to the input directories, where possible",
@@ -552,11 +585,11 @@ namespace SabreTools.Features
}
internal const string InverseValue = "inverse";
- internal static Help.Feature InverseFlag
+ internal static Feature InverseFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
InverseValue,
new List() { "-in", "--inverse" },
"Rebuild only files not in DAT",
@@ -566,11 +599,11 @@ namespace SabreTools.Features
}
internal const string KeepEmptyGamesValue = "keep-empty-games";
- internal static Help.Feature KeepEmptyGamesFlag
+ internal static Feature KeepEmptyGamesFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
KeepEmptyGamesValue,
new List() { "-keg", "--keep-empty-games" },
"Keep originally empty sets from the input(s)",
@@ -580,11 +613,11 @@ namespace SabreTools.Features
}
internal const string LevelValue = "level";
- internal static Help.Feature LevelFlag
+ internal static Feature LevelFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
LevelValue,
new List() { "-ls", "--level" },
"Split a SuperDAT or folder by lowest available level",
@@ -594,11 +627,11 @@ namespace SabreTools.Features
}
internal const string MatchOfTagsValue = "match-of-tags";
- internal static Help.Feature MatchOfTagsFlag
+ internal static Feature MatchOfTagsFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
MatchOfTagsValue,
new List() { "-ofg", "--match-of-tags" },
"Allow cloneof and romof tags to match game name filters",
@@ -608,11 +641,11 @@ namespace SabreTools.Features
}
internal const string MergeValue = "merge";
- internal static Help.Feature MergeFlag
+ internal static Feature MergeFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
MergeValue,
new List() { "-m", "--merge" },
"Merge the input DATs",
@@ -622,11 +655,11 @@ namespace SabreTools.Features
}
internal const string NoAutomaticDateValue = "no-automatic-date";
- internal static Help.Feature NoAutomaticDateFlag
+ internal static Feature NoAutomaticDateFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
NoAutomaticDateValue,
new List() { "-b", "--no-automatic-date" },
"Don't include date in file name",
@@ -636,11 +669,11 @@ namespace SabreTools.Features
}
internal const string NodumpColumnValue = "nodump-column";
- internal static Help.Feature NodumpColumnFlag
+ internal static Feature NodumpColumnFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
NodumpColumnValue,
new List() { "-nc", "--nodump-column" },
"Add statistics for nodumps to output",
@@ -650,11 +683,11 @@ namespace SabreTools.Features
}
internal const string NoStoreHeaderValue = "no-store-header";
- internal static Help.Feature NoStoreHeaderFlag
+ internal static Feature NoStoreHeaderFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
NoStoreHeaderValue,
new List() { "-nsh", "--no-store-header" },
"Don't store the extracted header",
@@ -664,11 +697,11 @@ namespace SabreTools.Features
}
internal const string NotRunnableValue = "not-runnable";
- internal static Help.Feature NotRunnableFlag
+ internal static Feature NotRunnableFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
NotRunnableValue,
new List() { "-nrun", "--not-runnable" },
"Include only items that are not marked runnable",
@@ -678,11 +711,11 @@ namespace SabreTools.Features
}
internal const string OneGamePerRegionValue = "one-game-per-region";
- internal static Help.Feature OneGamePerRegionFlag
+ internal static Feature OneGamePerRegionFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
OneGamePerRegionValue,
new List() { "-1g1r", "--one-game-per-region" },
"Try to ensure one game per user-defined region",
@@ -692,11 +725,11 @@ namespace SabreTools.Features
}
internal const string OneRomPerGameValue = "one-rom-per-game";
- internal static Help.Feature OneRomPerGameFlag
+ internal static Feature OneRomPerGameFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
OneRomPerGameValue,
new List() { "-orpg", "--one-rom-per-game" },
"Try to ensure each rom has its own game",
@@ -706,11 +739,11 @@ namespace SabreTools.Features
}
internal const string OnlySameValue = "only-same";
- internal static Help.Feature OnlySameFlag
+ internal static Feature OnlySameFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
OnlySameValue,
new List() { "-ons", "--only-same" },
"Only update description if machine name matches description",
@@ -720,11 +753,11 @@ namespace SabreTools.Features
}
internal const string QuickValue = "quick";
- internal static Help.Feature QuickFlag
+ internal static Feature QuickFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
QuickValue,
new List() { "-qs", "--quick" },
"Enable quick scanning of archives",
@@ -734,11 +767,11 @@ namespace SabreTools.Features
}
internal const string QuotesValue = "quotes";
- internal static Help.Feature QuotesFlag
+ internal static Feature QuotesFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
QuotesValue,
new List() { "-q", "--quotes" },
"Double-quote each item",
@@ -748,11 +781,11 @@ namespace SabreTools.Features
}
internal const string RemoveExtensionsValue = "remove-extensions";
- internal static Help.Feature RemoveExtensionsFlag
+ internal static Feature RemoveExtensionsFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
RemoveExtensionsValue,
new List() { "-rme", "--remove-extensions" },
"Remove all extensions from all items",
@@ -762,11 +795,11 @@ namespace SabreTools.Features
}
internal const string RemoveUnicodeValue = "remove-unicode";
- internal static Help.Feature RemoveUnicodeFlag
+ internal static Feature RemoveUnicodeFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
RemoveUnicodeValue,
new List() { "-ru", "--remove-unicode" },
"Remove unicode characters from names",
@@ -776,11 +809,11 @@ namespace SabreTools.Features
}
internal const string ReverseBaseReplaceValue = "reverse-base-replace";
- internal static Help.Feature ReverseBaseReplaceFlag
+ internal static Feature ReverseBaseReplaceFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
ReverseBaseReplaceValue,
new List() { "-rbr", "--reverse-base-replace" },
"Replace item names from base DATs in reverse",
@@ -790,11 +823,11 @@ namespace SabreTools.Features
}
internal const string RombaValue = "romba";
- internal static Help.Feature RombaFlag
+ internal static Feature RombaFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
RombaValue,
new List() { "-ro", "--romba" },
"Treat like a Romba depot (requires SHA-1)",
@@ -804,11 +837,11 @@ namespace SabreTools.Features
}
internal const string RomsValue = "roms";
- internal static Help.Feature RomsFlag
+ internal static Feature RomsFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
RomsValue,
new List() { "-r", "--roms" },
"Output roms to miss instead of sets",
@@ -818,11 +851,11 @@ namespace SabreTools.Features
}
internal const string RunnableValue = "runnable";
- internal static Help.Feature RunnableFlag
+ internal static Feature RunnableFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
RunnableValue,
new List() { "-run", "--runnable" },
"Include only items that are marked runnable",
@@ -832,11 +865,11 @@ namespace SabreTools.Features
}
internal const string SceneDateStripValue = "scene-date-strip";
- internal static Help.Feature SceneDateStripFlag
+ internal static Feature SceneDateStripFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
SceneDateStripValue,
new List() { "-sds", "--scene-date-strip" },
"Remove date from scene-named sets",
@@ -846,11 +879,11 @@ namespace SabreTools.Features
}
internal const string ShortValue = "short";
- internal static Help.Feature ShortFlag
+ internal static Feature ShortFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
ShortValue,
new List() { "-s", "--short" },
"Use short output names",
@@ -860,11 +893,11 @@ namespace SabreTools.Features
}
internal const string SingleSetValue = "single-set";
- internal static Help.Feature SingleSetFlag
+ internal static Feature SingleSetFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
SingleSetValue,
new List() { "-si", "--single-set" },
"All game names replaced by '!'",
@@ -874,11 +907,11 @@ namespace SabreTools.Features
}
internal const string SizeValue = "size";
- internal static Help.Feature SizeFlag
+ internal static Feature SizeFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
SizeValue,
new List() { "-szs", "--size" },
"Split DAT(s) or folder by file sizes",
@@ -888,11 +921,11 @@ namespace SabreTools.Features
}
internal const string SkipArchivesValue = "skip-archives";
- internal static Help.Feature SkipArchivesFlag
+ internal static Feature SkipArchivesFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
SkipArchivesValue,
new List() { "-ska", "--skip-archives" },
"Skip all archives",
@@ -902,11 +935,11 @@ namespace SabreTools.Features
}
internal const string SkipFilesValue = "skip-files";
- internal static Help.Feature SkipFilesFlag
+ internal static Feature SkipFilesFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
SkipFilesValue,
new List() { "-skf", "--skip-files" },
"Skip all non-archives",
@@ -916,11 +949,11 @@ namespace SabreTools.Features
}
internal const string SkipFirstOutputValue = "skip-first-output";
- internal static Help.Feature SkipFirstOutputFlag
+ internal static Feature SkipFirstOutputFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
SkipFirstOutputValue,
new List() { "-sf", "--skip-first-output" },
"Skip output of first DAT",
@@ -930,11 +963,11 @@ namespace SabreTools.Features
}
internal const string SkipMd5Value = "skip-md5";
- internal static Help.Feature SkipMd5Flag
+ internal static Feature SkipMd5Flag
{
get
{
- return new Help.Feature(
+ return new Feature(
SkipMd5Value,
new List() { "-nm", "--skip-md5" },
"Don't include MD5 in output",
@@ -945,11 +978,11 @@ namespace SabreTools.Features
#if NET_FRAMEWORK
internal const string SkipRipeMd160Value = "skip-ripemd160";
- internal static Help.Feature SkipRipeMd160Flag
+ internal static Feature SkipRipeMd160Flag
{
get
{
- return new Help.Feature(
+ return new Feature(
SkipRipeMd160Value,
new List() { "-nr160", "--skip-ripemd160" },
"Include RIPEMD160 in output", // TODO: This needs to be inverted later
@@ -960,11 +993,11 @@ namespace SabreTools.Features
#endif
internal const string SkipSha1Value = "skip-sha1";
- internal static Help.Feature SkipSha1Flag
+ internal static Feature SkipSha1Flag
{
get
{
- return new Help.Feature(
+ return new Feature(
SkipSha1Value,
new List() { "-ns", "--skip-sha1" },
"Don't include SHA-1 in output",
@@ -974,11 +1007,11 @@ namespace SabreTools.Features
}
internal const string SkipSha256Value = "skip-sha256";
- internal static Help.Feature SkipSha256Flag
+ internal static Feature SkipSha256Flag
{
get
{
- return new Help.Feature(
+ return new Feature(
SkipSha256Value,
new List() { "-ns256", "--skip-sha256" },
"Include SHA-256 in output", // TODO: This needs to be inverted later
@@ -988,11 +1021,11 @@ namespace SabreTools.Features
}
internal const string SkipSha384Value = "skip-sha384";
- internal static Help.Feature SkipSha384Flag
+ internal static Feature SkipSha384Flag
{
get
{
- return new Help.Feature(
+ return new Feature(
SkipSha384Value,
new List() { "-ns384", "--skip-sha384" },
"Include SHA-384 in output", // TODO: This needs to be inverted later
@@ -1002,11 +1035,11 @@ namespace SabreTools.Features
}
internal const string SkipSha512Value = "skip-sha512";
- internal static Help.Feature SkipSha512Flag
+ internal static Feature SkipSha512Flag
{
get
{
- return new Help.Feature(
+ return new Feature(
SkipSha512Value,
new List() { "-ns512", "--skip-sha512" },
"Include SHA-512 in output", // TODO: This needs to be inverted later
@@ -1016,11 +1049,11 @@ namespace SabreTools.Features
}
internal const string SkipSpamSumValue = "skip-spamsum";
- internal static Help.Feature SkipSpamSumFlag
+ internal static Feature SkipSpamSumFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
SkipSpamSumValue,
new List() { "-nss", "--skip-spamsum" },
"Include SpamSum in output", // TODO: This needs to be inverted later
@@ -1030,11 +1063,11 @@ namespace SabreTools.Features
}
internal const string SuperdatValue = "superdat";
- internal static Help.Feature SuperdatFlag
+ internal static Feature SuperdatFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
SuperdatValue,
new List() { "-sd", "--superdat" },
"Enable SuperDAT creation",
@@ -1044,11 +1077,11 @@ namespace SabreTools.Features
}
internal const string TarValue = "tar";
- internal static Help.Feature TarFlag
+ internal static Feature TarFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
TarValue,
new List() { "-tar", "--tar" },
"Enable Tape ARchive output",
@@ -1058,11 +1091,11 @@ namespace SabreTools.Features
}
internal const string Torrent7zipValue = "torrent-7zip";
- internal static Help.Feature Torrent7zipFlag
+ internal static Feature Torrent7zipFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
Torrent7zipValue,
new List() { "-t7z", "--torrent-7zip" },
"Enable Torrent7Zip output",
@@ -1072,11 +1105,11 @@ namespace SabreTools.Features
}
internal const string TorrentGzipValue = "torrent-gzip";
- internal static Help.Feature TorrentGzipFlag
+ internal static Feature TorrentGzipFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
TorrentGzipValue,
new List() { "-tgz", "--torrent-gzip" },
"Enable Torrent GZip output",
@@ -1086,11 +1119,11 @@ namespace SabreTools.Features
}
internal const string TorrentZipValue = "torrent-zip";
- internal static Help.Feature TorrentZipFlag
+ internal static Feature TorrentZipFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
TorrentZipValue,
new List() { "-tzip", "--torrent-zip" },
"Enable Torrent Zip output",
@@ -1100,11 +1133,11 @@ namespace SabreTools.Features
}
internal const string TrimValue = "trim";
- internal static Help.Feature TrimFlag
+ internal static Feature TrimFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
TrimValue,
new List() { "-trim", "--trim" },
"Trim file names to fit NTFS length",
@@ -1114,11 +1147,11 @@ namespace SabreTools.Features
}
internal const string TypeValue = "type";
- internal static Help.Feature TypeFlag
+ internal static Feature TypeFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
TypeValue,
new List() { "-ts", "--type" },
"Split DAT(s) or folder by file types (rom/disk)",
@@ -1128,11 +1161,11 @@ namespace SabreTools.Features
}
internal const string UpdateDatValue = "update-dat";
- internal static Help.Feature UpdateDatFlag
+ internal static Feature UpdateDatFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
UpdateDatValue,
new List() { "-ud", "--update-dat" },
"Output updated DAT to output directory",
@@ -1142,11 +1175,11 @@ namespace SabreTools.Features
}
internal const string UpdateDescriptionValue = "update-description";
- internal static Help.Feature UpdateDescriptionFlag
+ internal static Feature UpdateDescriptionFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
UpdateDescriptionValue,
new List() { "-udd", "--update-description" },
"Update machine descriptions from base DATs",
@@ -1156,11 +1189,11 @@ namespace SabreTools.Features
}
internal const string UpdateGameTypeValue = "update-game-type";
- internal static Help.Feature UpdateGameTypeFlag
+ internal static Feature UpdateGameTypeFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
UpdateGameTypeValue,
new List() { "-ugt", "--update-game-type" },
"Update machine type from base DATs",
@@ -1170,11 +1203,11 @@ namespace SabreTools.Features
}
internal const string UpdateHashesValue = "update-hashes";
- internal static Help.Feature UpdateHashesFlag
+ internal static Feature UpdateHashesFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
UpdateHashesValue,
new List() { "-uh", "--update-hashes" },
"Update hashes from base DATs",
@@ -1184,11 +1217,11 @@ namespace SabreTools.Features
}
internal const string UpdateManufacturerValue = "update-manufacturer";
- internal static Help.Feature UpdateManufacturerFlag
+ internal static Feature UpdateManufacturerFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
UpdateManufacturerValue,
new List() { "-um", "--update-manufacturer" },
"Update machine manufacturers from base DATs",
@@ -1198,11 +1231,11 @@ namespace SabreTools.Features
}
internal const string UpdateNamesValue = "update-names";
- internal static Help.Feature UpdateNamesFlag
+ internal static Feature UpdateNamesFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
UpdateNamesValue,
new List() { "-un", "--update-names" },
"Update item names from base DATs",
@@ -1212,11 +1245,11 @@ namespace SabreTools.Features
}
internal const string UpdateParentsValue = "update-parents";
- internal static Help.Feature UpdateParentsFlag
+ internal static Feature UpdateParentsFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
UpdateParentsValue,
new List() { "-up", "--update-parents" },
"Update machine parents from base DATs",
@@ -1226,11 +1259,11 @@ namespace SabreTools.Features
}
internal const string UpdateYearValue = "update-year";
- internal static Help.Feature UpdateYearFlag
+ internal static Feature UpdateYearFlag
{
get
{
- return new Help.Feature(
+ return new Feature(
UpdateYearValue,
new List() { "-uy", "--update-year" },
"Update machine years from base DATs",
@@ -1244,11 +1277,11 @@ namespace SabreTools.Features
#region Int32 features
internal const string DepotDepthInt32Value = "depot-depth";
- internal static Help.Feature DepotDepthInt32Input
+ internal static Feature DepotDepthInt32Input
{
get
{
- return new Help.Feature(
+ return new Feature(
DepotDepthInt32Value,
new List() { "-depd", "--depot-depth" },
"Set depth of depot for inputs",
@@ -1258,11 +1291,11 @@ namespace SabreTools.Features
}
internal const string RombaDepthInt32Value = "romba-depth";
- internal static Help.Feature RombaDepthInt32Input
+ internal static Feature RombaDepthInt32Input
{
get
{
- return new Help.Feature(
+ return new Feature(
RombaDepthInt32Value,
new List() { "-depr", "--romba-depth" },
"Set depth of depot for outputs",
@@ -1272,11 +1305,11 @@ namespace SabreTools.Features
}
internal const string ThreadsInt32Value = "threads";
- internal static Help.Feature ThreadsInt32Input
+ internal static Feature ThreadsInt32Input
{
get
{
- return new Help.Feature(
+ return new Feature(
ThreadsInt32Value,
new List() { "-mt", "--threads" },
"Amount of threads to use (default = # cores)",
@@ -1290,11 +1323,11 @@ namespace SabreTools.Features
#region Int64 features
internal const string RadixInt64Value = "radix";
- internal static Help.Feature RadixInt64Input
+ internal static Feature RadixInt64Input
{
get
{
- return new Help.Feature(
+ return new Feature(
RadixInt64Value,
new List() { "-rad", "--radix" },
"Set the midpoint to split at",
@@ -1308,11 +1341,11 @@ namespace SabreTools.Features
#region List features
internal const string BaseDatListValue = "base-dat";
- internal static Help.Feature BaseDatListInput
+ internal static Feature BaseDatListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
BaseDatListValue,
new List() { "-bd", "--base-dat" },
"Add a base DAT for processing",
@@ -1322,11 +1355,11 @@ namespace SabreTools.Features
}
internal const string CategoryListValue = "category-filter";
- internal static Help.Feature CategoryListInput
+ internal static Feature CategoryListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
CategoryListValue,
new List() { "-cat", "--category-filter" },
"Filter by Category",
@@ -1336,11 +1369,11 @@ namespace SabreTools.Features
}
internal const string CrcListValue = "crc";
- internal static Help.Feature CrcListInput
+ internal static Feature CrcListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
CrcListValue,
new List() { "-crc", "--crc" },
"Filter by CRC hash",
@@ -1350,11 +1383,11 @@ namespace SabreTools.Features
}
internal const string DatListValue = "dat";
- internal static Help.Feature DatListInput
+ internal static Feature DatListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
DatListValue,
new List() { "-dat", "--dat" },
"Input DAT to be used",
@@ -1364,11 +1397,11 @@ namespace SabreTools.Features
}
internal const string ExcludeFieldListValue = "exclude-field";
- internal static Help.Feature ExcludeFieldListInput
+ internal static Feature ExcludeFieldListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
ExcludeFieldListValue,
new List() { "-ef", "--exclude-field" },
"Exclude a game/rom field from outputs",
@@ -1378,11 +1411,11 @@ namespace SabreTools.Features
}
internal const string ExtAListValue = "exta";
- internal static Help.Feature ExtaListInput
+ internal static Feature ExtaListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
ExtAListValue,
new List() { "-exta", "--exta" },
"Set extension to be included in first DAT",
@@ -1392,11 +1425,11 @@ namespace SabreTools.Features
}
internal const string ExtBListValue = "extb";
- internal static Help.Feature ExtbListInput
+ internal static Feature ExtbListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
ExtBListValue,
new List() { "-extb", "--extb" },
"Set extension to be included in second DAT",
@@ -1406,11 +1439,11 @@ namespace SabreTools.Features
}
internal const string ExtraIniListValue = "extra-ini";
- internal static Help.Feature ExtraIniListInput
+ internal static Feature ExtraIniListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
ExtraIniListValue,
new List() { "-ini", "--extra-ini" },
"Apply a MAME INI for given field(s)",
@@ -1420,11 +1453,11 @@ namespace SabreTools.Features
}
internal const string FilterListValue = "filter";
- internal static Help.Feature FilterListInput
+ internal static Feature FilterListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
FilterListValue,
new List() { "-fi", "--filter" },
"Filter a game/rom field with the given value(s)",
@@ -1434,11 +1467,11 @@ namespace SabreTools.Features
}
internal const string GameDescriptionListValue = "game-description";
- internal static Help.Feature GameDescriptionListInput
+ internal static Feature GameDescriptionListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
GameDescriptionListValue,
new List() { "-gd", "--game-description" },
"Filter by game description",
@@ -1448,11 +1481,11 @@ namespace SabreTools.Features
}
internal const string GameNameListValue = "game-name";
- internal static Help.Feature GameNameListInput
+ internal static Feature GameNameListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
GameNameListValue,
new List() { "-gn", "--game-name" },
"Filter by game name",
@@ -1462,11 +1495,11 @@ namespace SabreTools.Features
}
internal const string GameTypeListValue = "game-type";
- internal static Help.Feature GameTypeListInput
+ internal static Feature GameTypeListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
GameTypeListValue,
new List() { "-gt", "--game-type" },
"Include only games with a given type",
@@ -1477,11 +1510,11 @@ Possible values are: None, Bios, Device, Mechanical");
}
internal const string ItemNameListValue = "item-name";
- internal static Help.Feature ItemNameListInput
+ internal static Feature ItemNameListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
ItemNameListValue,
new List() { "-rn", "--item-name" },
"Filter by item name",
@@ -1491,11 +1524,11 @@ Possible values are: None, Bios, Device, Mechanical");
}
internal const string ItemTypeListValue = "item-type";
- internal static Help.Feature ItemTypeListInput
+ internal static Feature ItemTypeListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
ItemTypeListValue,
new List() { "-rt", "--item-type" },
"Filter by item type",
@@ -1505,11 +1538,11 @@ Possible values are: None, Bios, Device, Mechanical");
}
internal const string Md5ListValue = "md5";
- internal static Help.Feature Md5ListInput
+ internal static Feature Md5ListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
Md5ListValue,
new List() { "-md5", "--md5" },
"Filter by MD5 hash",
@@ -1519,11 +1552,11 @@ Possible values are: None, Bios, Device, Mechanical");
}
internal const string NotCategoryListValue = "not-category";
- internal static Help.Feature NotCategoryListInput
+ internal static Feature NotCategoryListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
NotCategoryListValue,
new List() { "-ncat", "--not-category" },
"Filter by not Category",
@@ -1533,11 +1566,11 @@ Possible values are: None, Bios, Device, Mechanical");
}
internal const string NotCrcListValue = "not-crc";
- internal static Help.Feature NotCrcListInput
+ internal static Feature NotCrcListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
NotCrcListValue,
new List() { "-ncrc", "--not-crc" },
"Filter by not CRC hash",
@@ -1547,11 +1580,11 @@ Possible values are: None, Bios, Device, Mechanical");
}
internal const string NotGameDescriptionListValue = "not-game-description";
- internal static Help.Feature NotGameDescriptionListInput
+ internal static Feature NotGameDescriptionListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
NotGameDescriptionListValue,
new List() { "-ngd", "--not-game-description" },
"Filter by not game description",
@@ -1561,11 +1594,11 @@ Possible values are: None, Bios, Device, Mechanical");
}
internal const string NotGameNameListValue = "not-game-name";
- internal static Help.Feature NotGameNameListInput
+ internal static Feature NotGameNameListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
NotGameNameListValue,
new List() { "-ngn", "--not-game-name" },
"Filter by not game name",
@@ -1575,11 +1608,11 @@ Possible values are: None, Bios, Device, Mechanical");
}
internal const string NotGameTypeListValue = "not-game-type";
- internal static Help.Feature NotGameTypeListInput
+ internal static Feature NotGameTypeListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
NotGameTypeListValue,
new List() { "-ngt", "--not-game-type" },
"Exclude only games with a given type",
@@ -1590,11 +1623,11 @@ Possible values are: None, Bios, Device, Mechanical");
}
internal const string NotItemNameListValue = "not-item-name";
- internal static Help.Feature NotItemNameListInput
+ internal static Feature NotItemNameListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
NotItemNameListValue,
new List() { "-nrn", "--not-item-name" },
"Filter by not item name",
@@ -1604,11 +1637,11 @@ Possible values are: None, Bios, Device, Mechanical");
}
internal const string NotItemTypeListValue = "not-item-type";
- internal static Help.Feature NotItemTypeListInput
+ internal static Feature NotItemTypeListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
NotItemTypeListValue,
new List() { "-nrt", "--not-item-type" },
"Filter by not item type",
@@ -1618,11 +1651,11 @@ Possible values are: None, Bios, Device, Mechanical");
}
internal const string NotMd5ListValue = "not-md5";
- internal static Help.Feature NotMd5ListInput
+ internal static Feature NotMd5ListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
NotMd5ListValue,
new List() { "-nmd5", "--not-md5" },
"Filter by not MD5 hash",
@@ -1633,11 +1666,11 @@ Possible values are: None, Bios, Device, Mechanical");
#if NET_FRAMEWORK
internal const string NotRipeMd160ListValue = "not-ripemd160";
- internal static Help.Feature NotRipeMd160ListInput
+ internal static Feature NotRipeMd160ListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
NotRipeMd160ListValue,
new List() { "-nripemd160", "--not-ripemd160" },
"Filter by not RIPEMD160 hash",
@@ -1648,11 +1681,11 @@ Possible values are: None, Bios, Device, Mechanical");
#endif
internal const string NotSha1ListValue = "not-sha1";
- internal static Help.Feature NotSha1ListInput
+ internal static Feature NotSha1ListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
NotSha1ListValue,
new List() { "-nsha1", "--not-sha1" },
"Filter by not SHA-1 hash",
@@ -1662,11 +1695,11 @@ Possible values are: None, Bios, Device, Mechanical");
}
internal const string NotSha256ListValue = "not-sha256";
- internal static Help.Feature NotSha256ListInput
+ internal static Feature NotSha256ListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
NotSha256ListValue,
new List() { "-nsha256", "--not-sha256" },
"Filter by not SHA-256 hash",
@@ -1676,11 +1709,11 @@ Possible values are: None, Bios, Device, Mechanical");
}
internal const string NotSha384ListValue = "not-sha384";
- internal static Help.Feature NotSha384ListInput
+ internal static Feature NotSha384ListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
NotSha384ListValue,
new List() { "-nsha384", "--not-sha384" },
"Filter by not SHA-384 hash",
@@ -1690,11 +1723,11 @@ Possible values are: None, Bios, Device, Mechanical");
}
internal const string NotSha512ListValue = "not-sha512";
- internal static Help.Feature NotSha512ListInput
+ internal static Feature NotSha512ListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
NotSha512ListValue,
new List() { "-nsha512", "--not-sha512" },
"Filter by not SHA-512 hash",
@@ -1704,11 +1737,11 @@ Possible values are: None, Bios, Device, Mechanical");
}
internal const string NotStatusListValue = "not-status";
- internal static Help.Feature NotStatusListInput
+ internal static Feature NotStatusListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
NotStatusListValue,
new List() { "-nis", "--not-status" },
"Exclude only items with a given status",
@@ -1719,11 +1752,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified");
}
internal const string OutputTypeListValue = "output-type";
- internal static Help.Feature OutputTypeListInput
+ internal static Feature OutputTypeListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
OutputTypeListValue,
new List() { "-ot", "--output-type" },
"Output DATs to a specified format",
@@ -1765,11 +1798,11 @@ Possible values are:
}
internal const string RegionListValue = "region";
- internal static Help.Feature RegionListInput
+ internal static Feature RegionListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
RegionListValue,
new List() { "-reg", "--region" },
"Add a region for 1G1R",
@@ -1779,11 +1812,11 @@ Possible values are:
}
internal const string ReportTypeListValue = "report-type";
- internal static Help.Feature ReportTypeListInput
+ internal static Feature ReportTypeListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
ReportTypeListValue,
new List() { "-srt", "--report-type" },
"Output statistics to a specified format",
@@ -1802,11 +1835,11 @@ Possible values are:
#if NET_FRAMEWORK
internal const string RipeMd160ListValue = "ripemd160";
- internal static Help.Feature RipeMd160ListInput
+ internal static Feature RipeMd160ListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
RipeMd160ListValue,
new List() { "-ripemd160", "--ripemd160" },
"Filter by RIPEMD160 hash",
@@ -1817,11 +1850,11 @@ Possible values are:
#endif
internal const string Sha1ListValue = "sha1";
- internal static Help.Feature Sha1ListInput
+ internal static Feature Sha1ListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
Sha1ListValue,
new List() { "-sha1", "--sha1" },
"Filter by SHA-1 hash",
@@ -1831,11 +1864,11 @@ Possible values are:
}
internal const string Sha256ListValue = "sha256";
- internal static Help.Feature Sha256ListInput
+ internal static Feature Sha256ListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
Sha256ListValue,
new List() { "-sha256", "--sha256" },
"Filter by SHA-256 hash",
@@ -1845,11 +1878,11 @@ Possible values are:
}
internal const string Sha384ListValue = "sha384";
- internal static Help.Feature Sha384ListInput
+ internal static Feature Sha384ListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
Sha384ListValue,
new List() { "-sha384", "--sha384" },
"Filter by SHA-384 hash",
@@ -1859,11 +1892,11 @@ Possible values are:
}
internal const string Sha512ListValue = "sha512";
- internal static Help.Feature Sha512ListInput
+ internal static Feature Sha512ListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
Sha512ListValue,
new List() { "-sha512", "--sha512" },
"Filter by SHA-512 hash",
@@ -1873,11 +1906,11 @@ Possible values are:
}
internal const string StatusListValue = "status";
- internal static Help.Feature StatusListInput
+ internal static Feature StatusListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
StatusListValue,
new List() { "-is", "--status" },
"Include only items with a given status",
@@ -1888,11 +1921,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified");
}
internal const string UpdateFieldListValue = "update-field";
- internal static Help.Feature UpdateFieldListInput
+ internal static Feature UpdateFieldListInput
{
get
{
- return new Help.Feature(
+ return new Feature(
UpdateFieldListValue,
new List() { "-uf", "--update-field" },
"Update a game/rom field from base DATs",
@@ -1906,11 +1939,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified");
#region String features
internal const string AddExtensionStringValue = "add-extension";
- internal static Help.Feature AddExtensionStringInput
+ internal static Feature AddExtensionStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
AddExtensionStringValue,
new List() { "-ae", "--add-extension" },
"Add an extension to each item",
@@ -1920,11 +1953,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified");
}
internal const string AuthorStringValue = "author";
- internal static Help.Feature AuthorStringInput
+ internal static Feature AuthorStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
AuthorStringValue,
new List() { "-au", "--author" },
"Set the author of the DAT",
@@ -1934,11 +1967,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified");
}
internal const string CategoryStringValue = "category";
- internal static Help.Feature CategoryStringInput
+ internal static Feature CategoryStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
CategoryStringValue,
new List() { "-c", "--category" },
"Set the category of the DAT",
@@ -1948,11 +1981,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified");
}
internal const string CommentStringValue = "comment";
- internal static Help.Feature CommentStringInput
+ internal static Feature CommentStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
CommentStringValue,
new List() { "-co", "--comment" },
"Set a new comment of the DAT",
@@ -1962,11 +1995,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified");
}
internal const string DateStringValue = "date";
- internal static Help.Feature DateStringInput
+ internal static Feature DateStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
DateStringValue,
new List() { "-da", "--date" },
"Set a new date",
@@ -1976,11 +2009,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified");
}
internal const string DescriptionStringValue = "description";
- internal static Help.Feature DescriptionStringInput
+ internal static Feature DescriptionStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
DescriptionStringValue,
new List() { "-de", "--description" },
"Set the description of the DAT",
@@ -1990,11 +2023,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified");
}
internal const string EmailStringValue = "email";
- internal static Help.Feature EmailStringInput
+ internal static Feature EmailStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
EmailStringValue,
new List() { "-em", "--email" },
"Set a new email of the DAT",
@@ -2004,11 +2037,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified");
}
internal const string EqualStringValue = "equal";
- internal static Help.Feature EqualStringInput
+ internal static Feature EqualStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
EqualStringValue,
new List() { "-seq", "--equal" },
"Filter by size ==",
@@ -2018,11 +2051,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified");
}
internal const string FilenameStringValue = "filename";
- internal static Help.Feature FilenameStringInput
+ internal static Feature FilenameStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
FilenameStringValue,
new List() { "-f", "--filename" },
"Set the external name of the DAT",
@@ -2032,11 +2065,11 @@ Possible values are: None, Good, BadDump, Nodump, Verified");
}
internal const string ForceMergingStringValue = "forcemerging";
- internal static Help.Feature ForceMergingStringInput
+ internal static Feature ForceMergingStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
ForceMergingStringValue,
new List() { "-fm", "--forcemerging" },
"Set force merging",
@@ -2047,11 +2080,11 @@ Possible values are: None, Split, Device, Merged, Nonmerged, Full");
}
internal const string ForceNodumpStringValue = "forcenodump";
- internal static Help.Feature ForceNodumpStringInput
+ internal static Feature ForceNodumpStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
ForceNodumpStringValue,
new List() { "-fn", "--forcenodump" },
"Set force nodump",
@@ -2062,11 +2095,11 @@ Possible values are: None, Obsolete, Required, Ignore");
}
internal const string ForcePackingStringValue = "forcepacking";
- internal static Help.Feature ForcePackingStringInput
+ internal static Feature ForcePackingStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
ForcePackingStringValue,
new List() { "-fp", "--forcepacking" },
"Set force packing",
@@ -2077,11 +2110,11 @@ Possible values are: None, Zip, Unzip, Partial, Flat");
}
internal const string GreaterStringValue = "greater";
- internal static Help.Feature GreaterStringInput
+ internal static Feature GreaterStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
GreaterStringValue,
new List() { "-sgt", "--greater" },
"Filter by size >=",
@@ -2091,11 +2124,11 @@ Possible values are: None, Zip, Unzip, Partial, Flat");
}
internal const string HeaderStringValue = "header";
- internal static Help.Feature HeaderStringInput
+ internal static Feature HeaderStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
HeaderStringValue,
new List() { "-h", "--header" },
"Set a header skipper to use, blank means all",
@@ -2106,11 +2139,11 @@ Possible values are: None, Zip, Unzip, Partial, Flat");
}
internal const string HomepageStringValue = "homepage";
- internal static Help.Feature HomepageStringInput
+ internal static Feature HomepageStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
HomepageStringValue,
new List() { "-hp", "--homepage" },
"Set a new homepage of the DAT",
@@ -2120,11 +2153,11 @@ Possible values are: None, Zip, Unzip, Partial, Flat");
}
internal const string LessStringValue = "less";
- internal static Help.Feature LessStringInput
+ internal static Feature LessStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
LessStringValue,
new List() { "-slt", "--less" },
"Filter by size =<",
@@ -2134,11 +2167,11 @@ Possible values are: None, Zip, Unzip, Partial, Flat");
}
internal const string NameStringValue = "name";
- internal static Help.Feature NameStringInput
+ internal static Feature NameStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
NameStringValue,
new List() { "-n", "--name" },
"Set the internal name of the DAT",
@@ -2148,11 +2181,11 @@ Possible values are: None, Zip, Unzip, Partial, Flat");
}
internal const string OutputDirStringValue = "output-dir";
- internal static Help.Feature OutputDirStringInput
+ internal static Feature OutputDirStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
OutputDirStringValue,
new List() { "-out", "--output-dir" },
"Set output directory",
@@ -2162,11 +2195,11 @@ Possible values are: None, Zip, Unzip, Partial, Flat");
}
internal const string PostfixStringValue = "postfix";
- internal static Help.Feature PostfixStringInput
+ internal static Feature PostfixStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
PostfixStringValue,
new List() { "-post", "--postfix" },
"Set postfix for all lines",
@@ -2195,11 +2228,11 @@ Some special strings that can be used:
}
internal const string PrefixStringValue = "prefix";
- internal static Help.Feature PrefixStringInput
+ internal static Feature PrefixStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
PrefixStringValue,
new List() { "-pre", "--prefix" },
"Set prefix for all lines",
@@ -2223,11 +2256,11 @@ Some special strings that can be used:
}
internal const string ReplaceExtensionStringValue = "replace-extension";
- internal static Help.Feature ReplaceExtensionStringInput
+ internal static Feature ReplaceExtensionStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
ReplaceExtensionStringValue,
new List() { "-rep", "--replace-extension" },
"Replace all extensions with specified",
@@ -2237,11 +2270,11 @@ Some special strings that can be used:
}
internal const string RootStringValue = "root";
- internal static Help.Feature RootStringInput
+ internal static Feature RootStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
RootStringValue,
new List() { "-r", "--root" },
"Set a new rootdir",
@@ -2251,11 +2284,11 @@ Some special strings that can be used:
}
internal const string RootDirStringValue = "root-dir";
- internal static Help.Feature RootDirStringInput
+ internal static Feature RootDirStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
RootDirStringValue,
new List() { "-rd", "--root-dir" },
"Set the root directory for calc",
@@ -2265,11 +2298,11 @@ Some special strings that can be used:
}
internal const string TempStringValue = "temp";
- internal static Help.Feature TempStringInput
+ internal static Feature TempStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
TempStringValue,
new List() { "-t", "--temp" },
"Set the temporary directory to use",
@@ -2279,11 +2312,11 @@ Some special strings that can be used:
}
internal const string UrlStringValue = "url";
- internal static Help.Feature UrlStringInput
+ internal static Feature UrlStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
UrlStringValue,
new List() { "-u", "--url" },
"Set a new URL of the DAT",
@@ -2293,11 +2326,11 @@ Some special strings that can be used:
}
internal const string VersionStringValue = "version";
- internal static Help.Feature VersionStringInput
+ internal static Feature VersionStringInput
{
get
{
- return new Help.Feature(
+ return new Feature(
VersionStringValue,
new List() { "-v", "--version" },
"Set the version of the DAT",
@@ -2431,7 +2464,7 @@ Some special strings that can be used:
#endregion
- public override void ProcessFeatures(Dictionary features)
+ public override void ProcessFeatures(Dictionary features)
{
// Generic feature flags
Cleaner = GetCleaner(features);
@@ -2454,7 +2487,7 @@ Some special strings that can be used:
///
/// Get include from scan from feature list
///
- protected Hash GetIncludeInScan(Dictionary features)
+ protected Hash GetIncludeInScan(Dictionary features)
{
Hash includeInScan = Hash.Standard; // TODO: This should be All eventually
@@ -2481,7 +2514,7 @@ Some special strings that can be used:
///
/// Get OutputFormat from feature list
///
- protected OutputFormat GetOutputFormat(Dictionary features)
+ protected OutputFormat GetOutputFormat(Dictionary features)
{
if (GetBoolean(features, TarValue))
return OutputFormat.TapeArchive;
@@ -2510,7 +2543,7 @@ Some special strings that can be used:
///
/// Get SkipFileType from feature list
///
- protected SkipFileType GetSkipFileType(Dictionary features)
+ protected SkipFileType GetSkipFileType(Dictionary features)
{
if (GetBoolean(features, SkipArchivesValue))
return SkipFileType.Archive;
@@ -2523,7 +2556,7 @@ Some special strings that can be used:
///
/// Get SplittingMode from feature list
///
- protected SplittingMode GetSplittingMode(Dictionary features)
+ protected SplittingMode GetSplittingMode(Dictionary features)
{
SplittingMode splittingMode = SplittingMode.None;
@@ -2544,7 +2577,7 @@ Some special strings that can be used:
///
/// Get SplitType from feature list
///
- protected MergingFlag GetSplitType(Dictionary features)
+ protected MergingFlag GetSplitType(Dictionary features)
{
MergingFlag splitType = MergingFlag.None;
if (GetBoolean(features, DatDeviceNonMergedValue))
@@ -2564,7 +2597,7 @@ Some special strings that can be used:
///
/// Get StatReportFormat from feature list
///
- protected StatReportFormat GetStatReportFormat(Dictionary features)
+ protected StatReportFormat GetStatReportFormat(Dictionary features)
{
StatReportFormat statDatFormat = StatReportFormat.None;
@@ -2579,7 +2612,7 @@ Some special strings that can be used:
///
/// Get TreatAsFiles from feature list
///
- protected TreatAsFile GetTreatAsFiles(Dictionary features)
+ protected TreatAsFile GetTreatAsFiles(Dictionary features)
{
TreatAsFile asFiles = 0x00;
if (GetBoolean(features, AaruFormatsAsFilesValue))
@@ -2595,7 +2628,7 @@ Some special strings that can be used:
///
/// Get update fields from feature list
///
- protected List GetUpdateFields(Dictionary features)
+ protected List GetUpdateFields(Dictionary features)
{
List updateFields = new List();
@@ -2663,7 +2696,7 @@ Some special strings that can be used:
///
/// Get UpdateMode from feature list
///
- protected UpdateMode GetUpdateMode(Dictionary features)
+ protected UpdateMode GetUpdateMode(Dictionary features)
{
UpdateMode updateMode = UpdateMode.None;
@@ -2707,7 +2740,7 @@ Some special strings that can be used:
///
/// Get Cleaner from feature list
///
- private Cleaner GetCleaner(Dictionary features)
+ private Cleaner GetCleaner(Dictionary features)
{
Cleaner cleaner = new Cleaner()
{
@@ -2736,7 +2769,7 @@ Some special strings that can be used:
///
/// Get DatHeader from feature list
///
- private DatHeader GetDatHeader(Dictionary features)
+ private DatHeader GetDatHeader(Dictionary features)
{
// TODO: Sort this by region, like the actual header
DatHeader datHeader = new DatHeader
@@ -2792,7 +2825,7 @@ Some special strings that can be used:
///
/// Get DedupeType from feature list
///
- private DedupeType GetDedupeType(Dictionary features)
+ private DedupeType GetDedupeType(Dictionary features)
{
if (GetBoolean(features, DedupValue))
return DedupeType.Full;
@@ -2805,7 +2838,7 @@ Some special strings that can be used:
///
/// Get ExtraIni from feature list
///
- private ExtraIni GetExtras(Dictionary features)
+ private ExtraIni GetExtras(Dictionary features)
{
ExtraIni extraIni = new ExtraIni();
extraIni.PopulateFromList(GetList(features, ExtraIniListValue));
@@ -2815,7 +2848,7 @@ Some special strings that can be used:
///
/// Get Filter from feature list
///
- private Filter GetFilter(Dictionary features)
+ private Filter GetFilter(Dictionary features)
{
Filter filter = new Filter();
@@ -3044,18 +3077,16 @@ Some special strings that can be used:
#region Protected Helpers
///
- /// Ensure that the databse exists and has the proper schema
+ /// Ensure that the database exists and has the proper schema
///
- /// Name of the databse
- /// Connection string for SQLite
- protected static void EnsureDatabase(string db, string connectionString)
+ protected static void EnsureDatabase()
{
// Make sure the file exists
- if (!File.Exists(db))
- File.Create(db);
+ if (!File.Exists(HeadererFileName))
+ File.Create(HeadererFileName);
// Open the database connection
- SqliteConnection dbc = new SqliteConnection(connectionString);
+ SqliteConnection dbc = new SqliteConnection(HeadererConnectionString);
dbc.Open();
// Make sure the database has the correct schema
@@ -3093,25 +3124,25 @@ CREATE TABLE IF NOT EXISTS data (
// Get any trailing size identifiers
long multiplier = 1;
if (sizestring.EndsWith("k") || sizestring.EndsWith("kb"))
- multiplier = Constants.KiloByte;
+ multiplier = KiloByte;
else if (sizestring.EndsWith("ki") || sizestring.EndsWith("kib"))
- multiplier = Constants.KibiByte;
+ multiplier = KibiByte;
else if (sizestring.EndsWith("m") || sizestring.EndsWith("mb"))
- multiplier = Constants.MegaByte;
+ multiplier = MegaByte;
else if (sizestring.EndsWith("mi") || sizestring.EndsWith("mib"))
- multiplier = Constants.MibiByte;
+ multiplier = MibiByte;
else if (sizestring.EndsWith("g") || sizestring.EndsWith("gb"))
- multiplier = Constants.GigaByte;
+ multiplier = GigaByte;
else if (sizestring.EndsWith("gi") || sizestring.EndsWith("gib"))
- multiplier = Constants.GibiByte;
+ multiplier = GibiByte;
else if (sizestring.EndsWith("t") || sizestring.EndsWith("tb"))
- multiplier = Constants.TeraByte;
+ multiplier = TeraByte;
else if (sizestring.EndsWith("ti") || sizestring.EndsWith("tib"))
- multiplier = Constants.TibiByte;
+ multiplier = TibiByte;
else if (sizestring.EndsWith("p") || sizestring.EndsWith("pb"))
- multiplier = Constants.PetaByte;
+ multiplier = PetaByte;
else if (sizestring.EndsWith("pi") || sizestring.EndsWith("pib"))
- multiplier = Constants.PibiByte;
+ multiplier = PibiByte;
// Remove any trailing identifiers
sizestring = sizestring.TrimEnd(new char[] { 'k', 'm', 'g', 't', 'p', 'i', 'b', ' ' });
diff --git a/SabreTools/Features/Extract.cs b/SabreTools/Features/Extract.cs
index 74d8baf9..54f87906 100644
--- a/SabreTools/Features/Extract.cs
+++ b/SabreTools/Features/Extract.cs
@@ -127,10 +127,10 @@ The following systems have headers that this program can work with:
private void AddHeaderToDatabase(string header, string SHA1, string source)
{
// Ensure the database exists
- EnsureDatabase(Constants.HeadererFileName, Constants.HeadererConnectionString);
+ EnsureDatabase();
// Open the database connection
- SqliteConnection dbc = new SqliteConnection(Constants.HeadererConnectionString);
+ SqliteConnection dbc = new SqliteConnection(HeadererConnectionString);
dbc.Open();
string query = $"SELECT * FROM data WHERE sha1='{SHA1}' AND header='{header}'";
diff --git a/SabreTools/Features/Restore.cs b/SabreTools/Features/Restore.cs
index 39b42cb8..97e10e81 100644
--- a/SabreTools/Features/Restore.cs
+++ b/SabreTools/Features/Restore.cs
@@ -90,10 +90,10 @@ The following systems have headers that this program can work with:
private List RetrieveHeadersFromDatabase(string SHA1)
{
// Ensure the database exists
- EnsureDatabase(Constants.HeadererFileName, Constants.HeadererConnectionString);
+ EnsureDatabase();
// Open the database connection
- SqliteConnection dbc = new SqliteConnection(Constants.HeadererConnectionString);
+ SqliteConnection dbc = new SqliteConnection(HeadererConnectionString);
dbc.Open();
// Create the output list of headers