2018-12-07 08:22:15 +00:00
|
|
|
|
using RecrownedAthenaeum.Tools.CommandProcessor;
|
2018-12-09 20:27:31 +00:00
|
|
|
|
using RecrownedAthenaeum.Tools.CommandProcessor.Commands;
|
2018-12-29 06:31:47 +00:00
|
|
|
|
using RecrownedAthenaeum.Tools.NinePatchTools;
|
2018-12-08 22:26:40 +00:00
|
|
|
|
using RecrownedAthenaeum.Tools.TextureAtlasTools;
|
2018-12-05 21:44:26 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Reflection;
|
2018-12-09 20:09:40 +00:00
|
|
|
|
using System.Text;
|
2018-12-05 21:44:26 +00:00
|
|
|
|
|
2018-12-07 08:22:15 +00:00
|
|
|
|
namespace RecrownedAthenaeum.Tools
|
2018-12-05 21:44:26 +00:00
|
|
|
|
{
|
2018-12-07 08:27:34 +00:00
|
|
|
|
internal class Tools
|
2018-12-05 21:44:26 +00:00
|
|
|
|
{
|
|
|
|
|
static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
CommandEngine ce = new CommandEngine();
|
2018-12-09 06:51:33 +00:00
|
|
|
|
ConsoleUtilities.WriteWrappedLine("Recrowned Athenaeum Console Tools version " + Assembly.GetExecutingAssembly().GetName().Version.ToString());
|
|
|
|
|
ConsoleUtilities.WriteWrappedLine("Type \"help\" for help.");
|
|
|
|
|
|
|
|
|
|
ce.commands.Add(new HelpCommand(ce));
|
|
|
|
|
ce.commands.Add(new TexturePackerCommand());
|
|
|
|
|
ce.commands.Add(new StopCommand(ce));
|
2018-12-09 20:27:31 +00:00
|
|
|
|
ce.commands.Add(new ClearConsoleCommand());
|
2018-12-29 06:31:47 +00:00
|
|
|
|
ce.commands.Add(new NinePatchCommand());
|
2018-12-09 20:09:40 +00:00
|
|
|
|
|
2018-12-09 20:27:31 +00:00
|
|
|
|
if (args.Length > 0)
|
2018-12-09 20:09:40 +00:00
|
|
|
|
{
|
|
|
|
|
ConsoleUtilities.WriteWrappedLine("Executing as one time use.");
|
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
|
for (int i = 0; i < args.Length; i++) sb.Append(args[i] + ' ');
|
2019-01-14 04:05:34 +00:00
|
|
|
|
string commandAndArgs = sb.ToString().TrimEnd();
|
2018-12-09 20:27:31 +00:00
|
|
|
|
try
|
|
|
|
|
{
|
2019-01-14 04:05:34 +00:00
|
|
|
|
ConsoleUtilities.WriteWrappedLine("Command and argument received: " + commandAndArgs);
|
|
|
|
|
ce.Process(commandAndArgs);
|
2018-12-09 20:27:31 +00:00
|
|
|
|
}
|
|
|
|
|
catch (ArgumentException e)
|
|
|
|
|
{
|
|
|
|
|
ConsoleUtilities.WriteWrappedLine("An error has occurred: " + e.Message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
2018-12-09 20:09:40 +00:00
|
|
|
|
{
|
|
|
|
|
ce.Run();
|
|
|
|
|
}
|
2018-12-05 21:44:26 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|