diff --git a/installer/AMXXRelease/ABuilder.cs b/installer/AMXXRelease/ABuilder.cs index de9f9cfe..c51f00bc 100755 --- a/installer/AMXXRelease/ABuilder.cs +++ b/installer/AMXXRelease/ABuilder.cs @@ -14,6 +14,11 @@ public virtual void OnBuild() { } + public virtual void CreateDir(string dir) + { + Directory.CreateDirectory(dir); + } + public virtual bool Build(Config cfg, Build build) { m_Cfg = cfg; @@ -51,7 +56,7 @@ public virtual bool BuildMod(AMod mod) string basedir = PropSlashes(m_Cfg.OutputPath() + "\\" + mod.GetModPath()); string sourcetree = m_Cfg.GetSourceTree(); - if (!mod.CopyExtraFiles(basedir, sourcetree)) + if (!mod.CopyExtraFiles(this, basedir, sourcetree)) return false; return true; @@ -62,7 +67,7 @@ public virtual void CopyConfigs(AMod mod) string basedir = PropSlashes(m_Cfg.OutputPath() + "\\" + mod.GetModPath() + "\\configs"); if (!Directory.Exists(basedir)) - Directory.CreateDirectory(basedir); + CreateDir(basedir); string srcdir = PropSlashes(m_Cfg.GetSourceTree() + "\\configs"); @@ -74,15 +79,15 @@ public virtual void CopyConfigs(AMod mod) srcdir = PropSlashes(srcdir); - CopyNormal(srcdir, basedir); + CopyNormal(this, srcdir, basedir); } - public static void CopyNormal(string src, string dest) + public static void CopyNormal(ABuilder ab, string src, string dest) { string[] files = Directory.GetFiles(src); if (!Directory.Exists(dest)) - Directory.CreateDirectory(dest); + ab.CreateDir(dest); for (int i=0; i