-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BuildEvent, BuildMTN, BuiltMDL + SplitTools Cleanup (#279)
- Loading branch information
1 parent
dfaf51e
commit 3181292
Showing
20 changed files
with
2,043 additions
and
1,252 deletions.
There are no files selected for viewing
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
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,79 @@ | ||
using SplitTools.SAArc; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace BuildMDL | ||
{ | ||
internal static class Program | ||
{ | ||
private static void Main(string[] args) | ||
{ | ||
var argQueue = new Queue<string>(args); | ||
|
||
bool? bigEndian = null; | ||
|
||
if (argQueue.Count > 0) | ||
{ | ||
if (argQueue.Peek().Equals("/be", StringComparison.OrdinalIgnoreCase)) | ||
{ | ||
bigEndian = true; | ||
argQueue.Dequeue(); | ||
} | ||
else if (argQueue.Peek().Equals("/le", StringComparison.OrdinalIgnoreCase)) | ||
{ | ||
bigEndian = false; | ||
argQueue.Dequeue(); | ||
} | ||
} | ||
|
||
string mdlFilename; | ||
if (argQueue.Count > 0) | ||
{ | ||
mdlFilename = argQueue.Dequeue(); | ||
Console.WriteLine("File: {0}", mdlFilename); | ||
} | ||
else | ||
{ | ||
Console.WriteLine("File: "); | ||
mdlFilename = Console.ReadLine().Trim('"'); | ||
} | ||
|
||
SA2MDL.Build(bigEndian, mdlFilename); | ||
|
||
/* | ||
if (argQueue.Count > 0) | ||
{ | ||
mdlFilename = argQueue.Dequeue(); | ||
Console.WriteLine("File: {0}", mdlFilename); | ||
var file = File.GetAttributes(mdlFilename); | ||
if (file.HasFlag(FileAttributes.Directory)) | ||
{ | ||
SA2MDL.Build(bigEndian, mdlFilename); | ||
} | ||
else | ||
{ | ||
SA2MDL.Split(mdlFilename, Path.Combine(Environment.CurrentDirectory, Path.GetDirectoryName(mdlFilename)), argQueue.ToArray()); | ||
} | ||
} | ||
else | ||
{ | ||
Console.Write("File: "); | ||
mdlFilename = Console.ReadLine().Trim('"'); | ||
var file = File.GetAttributes(mdlFilename); | ||
if (file.HasFlag(FileAttributes.Directory)) | ||
{ | ||
SA2MDL.Build(be, mdlFilename); | ||
} | ||
else | ||
{ | ||
SA2MDL.Split(mdlFilename, Path.Combine(Environment.CurrentDirectory, Path.GetDirectoryName(mdlFilename)), argQueue.ToArray()); | ||
} | ||
} | ||
*/ | ||
} | ||
} | ||
} |
File renamed without changes.
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
Oops, something went wrong.