[RombaSharp] Write code for "build"

This commit is contained in:
Matt Nadareski
2016-10-12 14:40:21 -07:00
parent 87d019053b
commit ff769ba689
5 changed files with 93 additions and 29 deletions

View File

@@ -108,7 +108,7 @@ namespace SabreTools.Helper
/// Process the DAT and verify the output directory
/// </summary>
/// <returns>True if verification was a success, false otherwise</returns>
public bool VerifyDirectory()
private bool VerifyDirectory()
{
bool success = true;
@@ -194,7 +194,7 @@ namespace SabreTools.Helper
///
/// This is actually rather slow and inefficient. See below for more correct implemenation
/// </remarks>
public bool RebuildToOutput()
private bool RebuildToOutput()
{
bool success = true;
@@ -232,6 +232,14 @@ namespace SabreTools.Helper
{
FileTools.CleanDirectory(_tempDir);
}
if (success && _delete)
{
try
{
File.Delete(files[i]);
}
catch { }
}
}
// Now one final delete of the temp directory
@@ -615,7 +623,7 @@ namespace SabreTools.Helper
/// 4) Order by output game
/// 5) Rebuild all files
/// </remarks>
public bool RebuiltToOutputAlternate()
private bool RebuiltToOutputAlternate()
{
bool success = true;
@@ -781,7 +789,7 @@ namespace SabreTools.Helper
/// <param name="matchdat">Reference to the Dat to add to</param>
/// <param name="logger">Logger object for file and console output</param>
/// <returns>True if the file could be added, false otherwise</returns>
public bool RebuildToOutputAlternateParseRomHelper(string file, ref DatFile matchdat, Logger logger)
private bool RebuildToOutputAlternateParseRomHelper(string file, ref DatFile matchdat, Logger logger)
{
Rom rom = FileTools.GetFileInfo(file, logger);
@@ -851,7 +859,7 @@ namespace SabreTools.Helper
/// </summary>
/// <returns>True if the cleaning succeeded, false otherwise</returns>
/// <remarks>This method is incomplete, it need to be finished before it can be used</remarks>
public bool InplaceRebuild()
private bool InplaceRebuild()
{
bool success = true;