sourcemod/tools/builder/Main.cs
David Anderson 7f44c014ae added build tool
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40394
2007-01-27 03:10:31 +00:00

40 lines
677 B
C#

using System;
using System.IO;
using System.Diagnostics;
namespace builder
{
class Program
{
static void Main(string[] args)
{
if (args.GetLength(0) < 1)
{
System.Console.WriteLine("Usage: <config file>");
return;
}
Config cfg = new Config();
if (!cfg.ReadFromFile(args[0]))
{
return;
}
/* :TODO: Add path validation */
ABuilder bld = null;
if (cfg.Platform == BasePlatform.Platform_Linux)
{
bld = new LinuxBuilder(cfg);
}
else if (cfg.Platform == BasePlatform.Platform_Windows)
{
bld = new Win32Builder(cfg);
}
bld.BuildPackage(new PkgCore());
}
}
}