2017-01-06 18:49:28 +00:00
|
|
|
|
using System;
|
2017-01-10 20:36:03 +00:00
|
|
|
|
using System.Reflection;
|
2017-01-19 13:13:35 +00:00
|
|
|
|
using System.Threading.Tasks;
|
2017-12-15 20:47:45 +00:00
|
|
|
|
using Nibriboard.RippleSpace;
|
2017-01-27 21:24:58 +00:00
|
|
|
|
using SBRL.Utilities;
|
2017-01-06 18:49:28 +00:00
|
|
|
|
|
2017-01-06 18:53:58 +00:00
|
|
|
|
namespace Nibriboard
|
2017-01-06 18:49:28 +00:00
|
|
|
|
{
|
|
|
|
|
class MainClass
|
|
|
|
|
{
|
|
|
|
|
public static void Main(string[] args)
|
|
|
|
|
{
|
2017-07-23 21:02:24 +00:00
|
|
|
|
string packedRippleSpaceFile = "./default.ripplespace.zip";
|
|
|
|
|
|
|
|
|
|
for(int i = 0; i < args.Length; i++)
|
|
|
|
|
{
|
|
|
|
|
switch(args[i])
|
|
|
|
|
{
|
|
|
|
|
case "-h":
|
|
|
|
|
case "--help":
|
|
|
|
|
Console.WriteLine("Nibriboard Server");
|
|
|
|
|
Console.WriteLine("By Starbeamrainbowlabs");
|
|
|
|
|
Console.WriteLine();
|
|
|
|
|
Console.WriteLine("Usage:");
|
|
|
|
|
Console.WriteLine(" ./Nibriboard.exe [options]");
|
|
|
|
|
Console.WriteLine();
|
|
|
|
|
Console.WriteLine("Options:");
|
|
|
|
|
Console.WriteLine(" -h --help Shows this message");
|
|
|
|
|
Console.WriteLine(" -f --file [filepath] Specify the path to the packed ripplespace file to load. Defaults to '{0}'.", packedRippleSpaceFile);
|
|
|
|
|
Console.WriteLine();
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
case "-f":
|
|
|
|
|
case "--file":
|
|
|
|
|
packedRippleSpaceFile = args[++i];
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-23 13:33:00 +00:00
|
|
|
|
Log.WriteLine($"[core] Nibriboard Server {NibriboardServer.Version}, built on {NibriboardServer.BuildDate.ToString("R")}");
|
|
|
|
|
Log.WriteLine("[core] An infinite whiteboard for those big ideas.");
|
|
|
|
|
Log.WriteLine("[core] By Starbeamrainbowlabs");
|
|
|
|
|
Log.WriteLine("[core] Starting");
|
2017-01-19 13:13:35 +00:00
|
|
|
|
|
|
|
|
|
Log.WriteLine("[core] Detected embedded files: ");
|
2017-01-10 20:36:03 +00:00
|
|
|
|
EmbeddedFiles.WriteResourceList();
|
2017-01-19 13:13:35 +00:00
|
|
|
|
|
2017-07-23 21:02:24 +00:00
|
|
|
|
Log.WriteLine("[core] Loading ripple space from \"{0}\".", packedRippleSpaceFile);
|
|
|
|
|
|
|
|
|
|
NibriboardServer server = new NibriboardServer(packedRippleSpaceFile);
|
2017-01-19 13:13:35 +00:00
|
|
|
|
Task.WaitAll(
|
2017-07-20 12:15:11 +00:00
|
|
|
|
server.Start(),
|
|
|
|
|
server.StartCommandListener()
|
2017-01-19 13:13:35 +00:00
|
|
|
|
);
|
2017-01-06 18:49:28 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|