using System; using System.Diagnostics; using System.IO; namespace AMXXRelease { //This class specifies the process that builds a release. //It also implements the functions that are unlikely to change from mod to mod. public abstract class ABuilder { protected Config m_Cfg; public virtual void OnBuild() { } public virtual bool Build(Config cfg, Build build) { m_Cfg = cfg; OnBuild(); int num = build.GetMods(); AMod mod; for (int i=0; i=0; i--) { if ((input[i] == '\\' || input[i] == '/') && i != input.Length-1) { return input.Substring(i+1, input.Length-i-1); } } return input; } public virtual bool BuildModModules(AMod mod) { int num = mod.GetModules(); Module module; string binary, basedir; basedir = m_Cfg.OutputPath(); basedir += "\\" + mod.GetModPath(); basedir = PropSlashes(basedir); string dir; for (int i=0; i