-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring/code cleanup Unit tests added for IndexPosition math
- Loading branch information
1 parent
758d826
commit e0274c2
Showing
22 changed files
with
1,138 additions
and
385 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace PSXPackager | ||
{ | ||
public static class ApplicationInfo | ||
{ | ||
public static string AppPath { get; private set; } | ||
static ApplicationInfo() | ||
{ | ||
string path = System.Reflection.Assembly.GetExecutingAssembly().CodeBase.Replace("file:\\\\\\", "").Replace("file:///", ""); | ||
AppPath = System.IO.Path.GetDirectoryName(path); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System.IO; | ||
|
||
namespace PSXPackager | ||
{ | ||
public static class FileExtensionHelper | ||
{ | ||
public static bool IsCue(string filename) | ||
{ | ||
return Path.GetExtension(filename).ToLower() == ".cue"; | ||
} | ||
|
||
public static bool IsPbp(string filename) | ||
{ | ||
return Path.GetExtension(filename).ToLower() == ".pbp"; | ||
} | ||
|
||
public static bool IsArchive(string filename) | ||
{ | ||
return Path.GetExtension(filename).ToLower() == ".7z" || | ||
Path.GetExtension(filename).ToLower() == ".rar" || | ||
Path.GetExtension(filename).ToLower() == ".zip"; | ||
} | ||
|
||
public static bool IsBin(string filename) | ||
{ | ||
return Path.GetExtension(filename).ToLower() == ".bin"; | ||
} | ||
|
||
public static bool IsImageFile(string filename) | ||
{ | ||
return Path.GetExtension(filename).ToLower() == ".bin" || | ||
Path.GetExtension(filename).ToLower() == ".img" || | ||
Path.GetExtension(filename).ToLower() == ".iso"; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Popstation; | ||
using System.Collections.Generic; | ||
|
||
namespace PSXPackager | ||
{ | ||
public class MergedBin | ||
{ | ||
public string Path { get; set; } | ||
public List<CueFile> CueFiles { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using CommandLine; | ||
|
||
namespace PSXPackager | ||
{ | ||
public class Options | ||
{ | ||
[Option('v', "verbose", Required = false, HelpText = "Set output to verbose messages.")] | ||
public bool Verbose { get; set; } | ||
|
||
[Option('l', "level", Required = false, HelpText = "Set compression level 0-9, default 5", Default = 5)] | ||
public int CompressionLevel { get; set; } | ||
|
||
[Option('o', "output", Required = false | ||
, HelpText = "The output path where the converted file will be written")] | ||
public string OutputPath { get; set; } | ||
|
||
[Option('i', "input", Group = "input", HelpText = "The input file to convert")] | ||
public string InputPath { get; set; } | ||
|
||
[Option('b', "batch", Group = "input", HelpText = "The path to batch process a set of files")] | ||
public string Batch { get; set; } | ||
|
||
[Option('e', "ext", Required = false, HelpText = "The extension of the files to process in the batch folder, e.g. .7z")] | ||
public string BatchExtension { get; set; } | ||
|
||
} | ||
} |
Oops, something went wrong.