sourcemod/tools/builder/Main.cs
Scott Ehlert 251cced1f8 Spring Cleaning, Part Ichi (1)
Various minor things done to project files
Updated sample extension project file and updated makefile to the new unified version (more changes likely on the way)
Updated regex project file and makefile

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401971
2008-03-30 07:00:22 +00:00

51 lines
916 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);
if (cfg.pdb_log_file != null && File.Exists(cfg.pdb_log_file))
{
File.Delete(cfg.pdb_log_file);
}
}
try
{
bld.BuildPackage(new PkgCore());
}
catch (System.Exception e)
{
Console.WriteLine("Build failed: " + e.Message);
}
}
}
}