RV is not old-style CMP is

This commit is contained in:
Matt Nadareski
2016-04-20 21:55:28 -07:00
parent 7e818df8a8
commit 1c4d7dab2c
7 changed files with 51 additions and 49 deletions

View File

@@ -87,6 +87,8 @@ Options:
system= System name (system only)
source= Source name (source only)
url= URL (source only)
-cc, --convert-cmp Convert an XML DAT to CMP
out= Output directory
-cm, --convert-miss
-r, --roms Output roms to miss instead of sets
-gp, --game-prefix Add game name as a prefix to each item
@@ -95,21 +97,22 @@ Options:
-q, --quotes Put double-quotes around each item
-ae=, --add-ext= Add an extension to each item
-re=, --rep-ext= Replace all extensions with specified
-cr, --convert-rv Convert an XML DAT to RV
out= Output directory
-cx, --convert-xml Convert a RV DAT to XML
-cx, --convert-xml Convert a CMP DAT to XML
out= Output directory
-es, --ext-split Split a DAT by two file extensions
exta= First extension to split by
extb= Second extension to split by
out= Output directory
-g, --generate Start tool in generate mode
-ga, --generate-all Start tool in generate all mode
system= Comma-separated list of system IDs
source= Comma-separated list of source IDs
out= Output directory
-nr, --no-rename Don't auto-rename games
-old, --romvault Produce a DAT in RV format
-o, --old Output DAT in CMP format instead of XML
-ga, --generate-all Start tool in generate all mode
out= Output directory
-nr, --no-rename Don't auto-rename games
-o, --old Output DAT in CMP format instead of XML
-i, --import Start tool in import mode
-l, --log Enable logging of program output
-lso, --list-sources List all sources (id <= name)
@@ -147,7 +150,7 @@ Options:
-b, --bare Don't include date in file name
-u, --unzip Force unzipping in created DAT
-f, --files Treat archives as files
-o, --old Output DAT in RV format instead of XML
-o, --old Output DAT in CMP format instead of XML
-n=, --name= Set the name of the DAT
-d=, --desc= Set the description of the DAT
-c=, --cat= Set the category of the DAT
@@ -168,7 +171,7 @@ Options:
-dd, --dedup Enable deduping in the created DAT
-b, --bare Don't include date in file name
-u, --unzip Force unzipping in created DAT
-o, --old Output DAT in RV format instead of XML
-o, --old Output DAT in CMP format instead of XML
-n=, --name= Set the name of the DAT
-d=, --desc= Set the description of the DAT
-c=, --cat= Set the category of the DAT

View File

@@ -17,11 +17,11 @@ namespace SabreTools.Helper
private static string _endPattern = @"^\s*\)\s*$";
/// <summary>
/// Convert a RomVault style DAT to an XML derived DAT
/// Convert a ClrMamePro style DAT to an XML derived DAT
/// </summary>
/// <param name="filecontents">Array of strings representing the input file</param>
/// <returns>XElement representing the output XML DAT file</returns>
public static XElement RomVaultToXML (string[] filecontents)
public static XElement ClrMameProToXML (string[] filecontents)
{
XElement elem = new XElement("datafile");
@@ -30,7 +30,7 @@ namespace SabreTools.Helper
{
string line = filecontents[k];
// Comments in RV DATs start with a #
// Comments in CMP DATs start with a #
if (line.Trim().StartsWith("#"))
{
continue;
@@ -152,11 +152,11 @@ namespace SabreTools.Helper
}
/// <summary>
/// Convert an XML derived DAT to a RomVault style DAT
/// Convert an XML derived DAT to a ClrMamePro style DAT
/// </summary>
/// <param name="root">XElement representing the file</param>
/// <returns>String representing the output RomVault DAT file</returns>
public static String XMLToRomVault(XmlDocument root)
/// <returns>String representing the output ClrMamePro DAT file</returns>
public static String XMLToClrMamePro(XmlDocument root)
{
string output = "";

View File

@@ -45,7 +45,7 @@ namespace SabreTools.Helper
{
try
{
doc.LoadXml(Converters.RomVaultToXML(File.ReadAllLines(filename)).ToString());
doc.LoadXml(Converters.ClrMameProToXML(File.ReadAllLines(filename)).ToString());
}
catch (Exception ex)
{