mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Same for header features
This commit is contained in:
@@ -201,10 +201,6 @@ Options:
|
|||||||
Normally, the DAT will be created with the date in the file name in
|
Normally, the DAT will be created with the date in the file name in
|
||||||
brackets. This flag removes that instead of the default.
|
brackets. This flag removes that instead of the default.
|
||||||
|
|
||||||
-fp=, --forcepacking= Set force packing
|
|
||||||
Set the forcepacking tag to the given value.
|
|
||||||
Possible values are: None, Zip, Unzip
|
|
||||||
|
|
||||||
-aaf, --archives-as-files Treat archives as files
|
-aaf, --archives-as-files Treat archives as files
|
||||||
Instead of trying to enumerate the files within archives, treat the
|
Instead of trying to enumerate the files within archives, treat the
|
||||||
archives as files themselves. This is good for uncompressed sets that
|
archives as files themselves. This is good for uncompressed sets that
|
||||||
@@ -270,6 +266,9 @@ Options:
|
|||||||
-c=, --category= Set the category of the DAT
|
-c=, --category= Set the category of the DAT
|
||||||
Set the category header field for the output DAT(s)
|
Set the category header field for the output DAT(s)
|
||||||
|
|
||||||
|
-r=, --root= Set a new rootdir
|
||||||
|
Set the rootdir (as used by SuperDAT mode) for the output DAT(s).
|
||||||
|
|
||||||
-v=, --version= Set the version of the DAT
|
-v=, --version= Set the version of the DAT
|
||||||
Set the version header field for the output DAT(s)
|
Set the version header field for the output DAT(s)
|
||||||
|
|
||||||
@@ -293,6 +292,18 @@ Options:
|
|||||||
preserving the directory structure of the inputted folder, if
|
preserving the directory structure of the inputted folder, if
|
||||||
applicable.
|
applicable.
|
||||||
|
|
||||||
|
-fm=, --forcemerging= Set force merging
|
||||||
|
Set the forcemerging tag to the given value.
|
||||||
|
Possible values are: None, Split, Merged, Nonmerged, Full
|
||||||
|
|
||||||
|
-fn=, --forcenodump= Set force nodump
|
||||||
|
Set the forcenodump tag to the given value.
|
||||||
|
Possible values are: None, Obsolete, Required, Ignore
|
||||||
|
|
||||||
|
-fp=, --forcepacking= Set force packing
|
||||||
|
Set the forcepacking tag to the given value.
|
||||||
|
Possible values are: None, Zip, Unzip
|
||||||
|
|
||||||
-ef=, --exclude-field= Exclude a game/rom field from outputs
|
-ef=, --exclude-field= Exclude a game/rom field from outputs
|
||||||
Exclude any valid item or machine field from outputs. Examples
|
Exclude any valid item or machine field from outputs. Examples
|
||||||
include: romof, publisher, and offset.
|
include: romof, publisher, and offset.
|
||||||
|
|||||||
@@ -2206,6 +2206,8 @@ Some special strings that can be used:
|
|||||||
|
|
||||||
private class SabreToolsFeature : TopLevel
|
private class SabreToolsFeature : TopLevel
|
||||||
{
|
{
|
||||||
|
#region Fields
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Pre-configured Filter
|
/// Pre-configured Filter
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -2221,6 +2223,10 @@ Some special strings that can be used:
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected string OutputDir { get; set; }
|
protected string OutputDir { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Add Feature Groups
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add Filter-specific features
|
/// Add Filter-specific features
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -2265,6 +2271,38 @@ Some special strings that can be used:
|
|||||||
AddFeature(NotRunnableFlag);
|
AddFeature(NotRunnableFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Add Header-specific features
|
||||||
|
/// </summary>
|
||||||
|
protected void AddHeaderFeatures()
|
||||||
|
{
|
||||||
|
// Header Values
|
||||||
|
AddFeature(FilenameStringInput);
|
||||||
|
AddFeature(NameStringInput);
|
||||||
|
AddFeature(DescriptionStringInput);
|
||||||
|
AddFeature(RootStringInput);
|
||||||
|
AddFeature(CategoryStringInput);
|
||||||
|
AddFeature(VersionStringInput);
|
||||||
|
AddFeature(DateStringInput);
|
||||||
|
AddFeature(AuthorStringInput);
|
||||||
|
AddFeature(EmailStringInput);
|
||||||
|
AddFeature(HomepageStringInput);
|
||||||
|
AddFeature(UrlStringInput);
|
||||||
|
AddFeature(CommentStringInput);
|
||||||
|
AddFeature(HeaderStringInput);
|
||||||
|
AddFeature(SuperdatFlag);
|
||||||
|
AddFeature(ForceMergingStringInput);
|
||||||
|
AddFeature(ForceNodumpStringInput);
|
||||||
|
AddFeature(ForcePackingStringInput);
|
||||||
|
|
||||||
|
// Header Filters
|
||||||
|
AddFeature(ExcludeFieldListInput);
|
||||||
|
AddFeature(OneGamePerRegionFlag);
|
||||||
|
this[OneGamePerRegionFlag].AddFeature(RegionListInput);
|
||||||
|
AddFeature(OneRomPerGameFlag);
|
||||||
|
AddFeature(SceneDateStripFlag);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add internal split/merge features
|
/// Add internal split/merge features
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -2277,6 +2315,8 @@ Some special strings that can be used:
|
|||||||
AddFeature(DatFullNonMergedFlag);
|
AddFeature(DatFullNonMergedFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
public override void ProcessFeatures(Dictionary<string, Feature> features)
|
public override void ProcessFeatures(Dictionary<string, Feature> features)
|
||||||
{
|
{
|
||||||
// Generic feature flags
|
// Generic feature flags
|
||||||
@@ -2893,6 +2933,7 @@ Some special strings that can be used:
|
|||||||
this.LongDescription = "Create a DAT file from an input directory or set of files. By default, this will output a DAT named based on the input directory and the current date. It will also treat all archives as possible games and add all three hashes (CRC, MD5, SHA-1) for each file.";
|
this.LongDescription = "Create a DAT file from an input directory or set of files. By default, this will output a DAT named based on the input directory and the current date. It will also treat all archives as possible games and add all three hashes (CRC, MD5, SHA-1) for each file.";
|
||||||
this.Features = new Dictionary<string, Feature>();
|
this.Features = new Dictionary<string, Feature>();
|
||||||
|
|
||||||
|
// Hash Features
|
||||||
AddFeature(SkipMd5Flag);
|
AddFeature(SkipMd5Flag);
|
||||||
#if NET_FRAMEWORK
|
#if NET_FRAMEWORK
|
||||||
AddFeature(SkipRipeMd160Flag);
|
AddFeature(SkipRipeMd160Flag);
|
||||||
@@ -2901,30 +2942,15 @@ Some special strings that can be used:
|
|||||||
AddFeature(SkipSha256Flag);
|
AddFeature(SkipSha256Flag);
|
||||||
AddFeature(SkipSha384Flag);
|
AddFeature(SkipSha384Flag);
|
||||||
AddFeature(SkipSha512Flag);
|
AddFeature(SkipSha512Flag);
|
||||||
|
|
||||||
AddFeature(NoAutomaticDateFlag);
|
AddFeature(NoAutomaticDateFlag);
|
||||||
AddFeature(ForcePackingStringInput);
|
|
||||||
AddFeature(ArchivesAsFilesFlag);
|
AddFeature(ArchivesAsFilesFlag);
|
||||||
AddFeature(OutputTypeListInput);
|
AddFeature(OutputTypeListInput);
|
||||||
this[OutputTypeListInput].AddFeature(DeprecatedFlag);
|
this[OutputTypeListInput].AddFeature(DeprecatedFlag);
|
||||||
AddFeature(RombaFlag);
|
AddFeature(RombaFlag);
|
||||||
AddFeature(SkipArchivesFlag);
|
AddFeature(SkipArchivesFlag);
|
||||||
AddFeature(SkipFilesFlag);
|
AddFeature(SkipFilesFlag);
|
||||||
AddFeature(FilenameStringInput);
|
AddHeaderFeatures();
|
||||||
AddFeature(NameStringInput);
|
|
||||||
AddFeature(DescriptionStringInput);
|
|
||||||
AddFeature(CategoryStringInput);
|
|
||||||
AddFeature(VersionStringInput);
|
|
||||||
AddFeature(AuthorStringInput);
|
|
||||||
AddFeature(EmailStringInput);
|
|
||||||
AddFeature(HomepageStringInput);
|
|
||||||
AddFeature(UrlStringInput);
|
|
||||||
AddFeature(CommentStringInput);
|
|
||||||
AddFeature(SuperdatFlag);
|
|
||||||
AddFeature(ExcludeFieldListInput);
|
|
||||||
AddFeature(OneGamePerRegionFlag);
|
|
||||||
this[OneGamePerRegionFlag].AddFeature(RegionListInput);
|
|
||||||
AddFeature(OneRomPerGameFlag);
|
|
||||||
AddFeature(SceneDateStripFlag);
|
|
||||||
AddFeature(AddBlankFilesFlag);
|
AddFeature(AddBlankFilesFlag);
|
||||||
AddFeature(AddDateFlag);
|
AddFeature(AddDateFlag);
|
||||||
AddFeature(CopyFilesFlag);
|
AddFeature(CopyFilesFlag);
|
||||||
@@ -3351,6 +3377,7 @@ The stats that are outputted are as follows:
|
|||||||
this.LongDescription = "This is the multitool part of the program, allowing for almost every manipulation to a DAT, or set of DATs. This is also a combination of many different programs that performed DAT manipulation that work better together.";
|
this.LongDescription = "This is the multitool part of the program, allowing for almost every manipulation to a DAT, or set of DATs. This is also a combination of many different programs that performed DAT manipulation that work better together.";
|
||||||
this.Features = new Dictionary<string, Feature>();
|
this.Features = new Dictionary<string, Feature>();
|
||||||
|
|
||||||
|
// Output Formats
|
||||||
AddFeature(OutputTypeListInput);
|
AddFeature(OutputTypeListInput);
|
||||||
this[OutputTypeListInput].AddFeature(PrefixStringInput);
|
this[OutputTypeListInput].AddFeature(PrefixStringInput);
|
||||||
this[OutputTypeListInput].AddFeature(PostfixStringInput);
|
this[OutputTypeListInput].AddFeature(PostfixStringInput);
|
||||||
@@ -3362,29 +3389,9 @@ The stats that are outputted are as follows:
|
|||||||
this[OutputTypeListInput].AddFeature(RemoveExtensionsFlag);
|
this[OutputTypeListInput].AddFeature(RemoveExtensionsFlag);
|
||||||
this[OutputTypeListInput].AddFeature(RombaFlag);
|
this[OutputTypeListInput].AddFeature(RombaFlag);
|
||||||
this[OutputTypeListInput].AddFeature(DeprecatedFlag);
|
this[OutputTypeListInput].AddFeature(DeprecatedFlag);
|
||||||
AddFeature(FilenameStringInput);
|
|
||||||
AddFeature(NameStringInput);
|
AddHeaderFeatures();
|
||||||
AddFeature(DescriptionStringInput);
|
|
||||||
AddFeature(RootStringInput);
|
|
||||||
AddFeature(CategoryStringInput);
|
|
||||||
AddFeature(VersionStringInput);
|
|
||||||
AddFeature(DateStringInput);
|
|
||||||
AddFeature(AuthorStringInput);
|
|
||||||
AddFeature(EmailStringInput);
|
|
||||||
AddFeature(HomepageStringInput);
|
|
||||||
AddFeature(UrlStringInput);
|
|
||||||
AddFeature(CommentStringInput);
|
|
||||||
AddFeature(HeaderStringInput);
|
|
||||||
AddFeature(SuperdatFlag);
|
|
||||||
AddFeature(ForceMergingStringInput);
|
|
||||||
AddFeature(ForceNodumpStringInput);
|
|
||||||
AddFeature(ForcePackingStringInput);
|
|
||||||
AddFeature(ExcludeFieldListInput);
|
|
||||||
AddFeature(OneGamePerRegionFlag);
|
|
||||||
this[OneGamePerRegionFlag].AddFeature(RegionListInput);
|
|
||||||
AddFeature(OneRomPerGameFlag);
|
|
||||||
AddFeature(KeepEmptyGamesFlag);
|
AddFeature(KeepEmptyGamesFlag);
|
||||||
AddFeature(SceneDateStripFlag);
|
|
||||||
AddFeature(CleanFlag);
|
AddFeature(CleanFlag);
|
||||||
AddFeature(RemoveUnicodeFlag);
|
AddFeature(RemoveUnicodeFlag);
|
||||||
AddFeature(DescriptionAsNameFlag);
|
AddFeature(DescriptionAsNameFlag);
|
||||||
|
|||||||
Reference in New Issue
Block a user