diff --git a/installer/AMXXRelease/ABuild.cs b/installer/AMXXRelease/ABuild.cs
deleted file mode 100755
index a7a4b3a3..00000000
--- a/installer/AMXXRelease/ABuild.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System;
-using System.Collections;
-
-namespace AMXXRelease
-{
- ///
- /// Summary description for ABuild.
- ///
- public abstract class ABuild
- {
- protected ArrayList m_Mods;
-
- public ABuild()
- {
- m_Mods = new ArrayList();
- }
-
- public abstract string GetName();
-
- public virtual int GetMods()
- {
- return m_Mods.Count;
- }
-
- public virtual AMod GetMod(int i)
- {
- return (AMod)m_Mods[i];
- }
- }
-}
diff --git a/installer/AMXXRelease/ABuilder.cs b/installer/AMXXRelease/ABuilder.cs
new file mode 100755
index 00000000..5cf155dc
--- /dev/null
+++ b/installer/AMXXRelease/ABuilder.cs
@@ -0,0 +1,226 @@
+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.
+ 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
- /// Summary description for Config.
- ///
+ //Reads in config file info
public class Config
{
+ private string m_SourceTree;
+ private string m_OutputPath;
+ private string m_DevenvPath;
+ private string m_PathToCompress;
+ private string m_ReleaseName;
+ private string m_MakeOpts;
+
public Config()
{
}
public string GetSourceTree()
{
- return "C:\\real\\code\\amxmodx";
+ return m_SourceTree;
}
public string OutputPath()
{
- return "C:\\real\\done";
+ return m_OutputPath;
}
public string DevenvPath()
{
- return "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\IDE\\devenv.com";
+ return m_DevenvPath;
}
- public string PathToZip()
+ public string CompressPath()
{
- return "C:\\Windows\\zip.exe";
+ return m_PathToCompress;
+ }
+
+ public string GetReleaseName()
+ {
+ return m_ReleaseName;
+ }
+
+ public string MakeOpts()
+ {
+ return m_MakeOpts;
+ }
+
+ public bool ReadFromFile(string file)
+ {
+ try
+ {
+ StreamReader sr = new StreamReader(file);
+
+ string line;
+ string delim = "\t \n\r\v";
+ string splt = "=";
+ while ( (line = sr.ReadLine()) != null )
+ {
+ line = line.Trim(delim.ToCharArray());
+ if (line.Length < 1 || line[0] == ';')
+ continue;
+ string [] s = line.Split(splt.ToCharArray());
+ string key, val="";
+ if (s.GetLength(0) >= 1)
+ {
+ key = s[0];
+ if (s.GetLength(0) >= 2)
+ {
+ for(int i=1; i
- /// Summary description for ModDoD.
- ///
+ //Day of Defeat
public class ModDoD : AMod
{
public ModDoD()
diff --git a/installer/AMXXRelease/ModEsf.cs b/installer/AMXXRelease/ModEsf.cs
index 97c4a025..04de828a 100755
--- a/installer/AMXXRelease/ModEsf.cs
+++ b/installer/AMXXRelease/ModEsf.cs
@@ -2,9 +2,7 @@
namespace AMXXRelease
{
- ///
- /// Summary description for ModEsf.
- ///
+ //Earth's Special Forces
public class ModEsf : AMod
{
public ModEsf()
diff --git a/installer/AMXXRelease/ModNs.cs b/installer/AMXXRelease/ModNs.cs
index 469278d9..660f2fc0 100755
--- a/installer/AMXXRelease/ModNs.cs
+++ b/installer/AMXXRelease/ModNs.cs
@@ -2,9 +2,7 @@
namespace AMXXRelease
{
- ///
- /// Summary description for ModNs.
- ///
+ //Natural Selection
public class ModNs : AMod
{
public ModNs()
diff --git a/installer/AMXXRelease/ModTFC.cs b/installer/AMXXRelease/ModTFC.cs
index 482f0bb9..af675f17 100755
--- a/installer/AMXXRelease/ModTFC.cs
+++ b/installer/AMXXRelease/ModTFC.cs
@@ -2,9 +2,7 @@
namespace AMXXRelease
{
- ///
- /// Summary description for ModTFC.
- ///
+ //Team Fortress Classic
public class ModTFC : AMod
{
public ModTFC()
diff --git a/installer/AMXXRelease/ModTs.cs b/installer/AMXXRelease/ModTs.cs
index 9ee29442..a090f76f 100755
--- a/installer/AMXXRelease/ModTs.cs
+++ b/installer/AMXXRelease/ModTs.cs
@@ -2,9 +2,7 @@
namespace AMXXRelease
{
- ///
- /// Summary description for ModTs.
- ///
+ //The Specialists
public class ModTs : AMod
{
public ModTs()
diff --git a/installer/AMXXRelease/Release15.cs b/installer/AMXXRelease/Release15.cs
deleted file mode 100755
index d9dd2d86..00000000
--- a/installer/AMXXRelease/Release15.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-
-namespace AMXXRelease
-{
- ///
- /// Summary description for Release15.
- ///
- public class Release15 : ABuild
- {
- public Release15()
- {
- CoreMod core = new CoreMod();
- ModCstrike cstrike = new ModCstrike();
- ModDoD dod = new ModDoD();
- ModEsf esf = new ModEsf();
- ModNs ns = new ModNs();
- ModTFC tfc = new ModTFC();
- ModTs ts = new ModTs();
-
- m_Mods.Add(core);
- m_Mods.Add(cstrike);
- m_Mods.Add(dod);
- m_Mods.Add(esf);
- m_Mods.Add(ns);
- m_Mods.Add(tfc);
- m_Mods.Add(ts);
- }
-
- public override sealed string GetName()
- {
- return "amxmodx-1.5";
- }
- }
-}
diff --git a/installer/AMXXRelease/Win32Builder.cs b/installer/AMXXRelease/Win32Builder.cs
new file mode 100755
index 00000000..4b3d4a06
--- /dev/null
+++ b/installer/AMXXRelease/Win32Builder.cs
@@ -0,0 +1,81 @@
+using System;
+using System.Diagnostics;
+using System.IO;
+
+namespace AMXXRelease
+{
+ //Build process for Windows (32bit)
+ public class Win32Builder : ABuilder
+ {
+ private string m_AmxxPc;
+
+ public override void OnBuild()
+ {
+ m_AmxxPc = PropSlashes(m_Cfg.GetSourceTree() + "\\plugins\\amxxpc.exe");
+ }
+
+ public override void CompressDir(string target, string dir)
+ {
+ ProcessStartInfo info = new ProcessStartInfo();
+
+ info.FileName = m_Cfg.CompressPath();
+ info.WorkingDirectory = m_Cfg.OutputPath();
+ info.Arguments = "-r " + target + " " + dir;
+ info.UseShellExecute = false;
+
+ Process p = Process.Start(info);
+ p.WaitForExit();
+ }
+
+ public override void AmxxPc(string inpath, string args)
+ {
+ ProcessStartInfo info = new ProcessStartInfo();
+
+ info.WorkingDirectory = PropSlashes(m_Cfg.GetSourceTree() + "\\plugins");
+ info.FileName = (string)m_AmxxPc.Clone();
+ info.Arguments = inpath + ".sma";
+ if (args != null)
+ info.Arguments += " " + args;
+ info.UseShellExecute = false;
+
+ Process p = Process.Start(info);
+ p.WaitForExit();
+ }
+
+ public override string GetLibExt()
+ {
+ return ".dll";
+ }
+
+ public override string BuildModule(Module module)
+ {
+ ProcessStartInfo info = new ProcessStartInfo();
+
+ string dir = m_Cfg.GetSourceTree() + "\\" + module.sourcedir;
+ if (module.bindir != null)
+ dir += "\\" + module.bindir;
+ string file = dir;
+ if (module.bindir == null)
+ file += "\\" + module.bindir;
+ file += "\\" + module.build + "\\" + module.projname + ".dll";
+ file = PropSlashes(file);
+
+ if (File.Exists(file))
+ File.Delete(file);
+
+ info.WorkingDirectory = PropSlashes(dir);
+ info.FileName = m_Cfg.DevenvPath();
+ info.Arguments = "/build " + module.build + " " + module.vcproj + ".vcproj";
+ info.UseShellExecute = false;
+
+ Process p = Process.Start(info);
+ p.WaitForExit();
+
+ if (!File.Exists(file))
+ return null;
+
+ return file;
+ }
+ }
+}
+
diff --git a/installer/AMXXRelease/linux32.info b/installer/AMXXRelease/linux32.info
new file mode 100755
index 00000000..5130a4ee
--- /dev/null
+++ b/installer/AMXXRelease/linux32.info
@@ -0,0 +1,6 @@
+compress = /bin/tar
+source = /home1/dvander/amxx
+makeopts =
+output = /home1/dvander/done
+devenv = /usr/bin/make
+release = amxmodx-1.55
diff --git a/installer/AMXXRelease/linux64.info b/installer/AMXXRelease/linux64.info
new file mode 100755
index 00000000..dd2c0a78
--- /dev/null
+++ b/installer/AMXXRelease/linux64.info
@@ -0,0 +1,6 @@
+compress = /bin/tar
+source = /home1/dvander/amxx
+makeopts = amd64
+output = /home1/dvander/done
+devenv = /usr/bin/make
+release = amxmodx-1.55