From ae8bf10746b3143d1920e3292615a4699258427f Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 18 Sep 2005 03:26:26 +0000 Subject: [PATCH] Fixed bug at18021 (hondaman) Fixed bug at18924 (Arnold) --- installer/AMXXRelease/ABuilder.cs | 21 +++++++++++++-------- installer/AMXXRelease/AMod.cs | 2 +- installer/AMXXRelease/CoreMod.cs | 12 ++++++------ installer/AMXXRelease/LinuxBuilder.cs | 11 +++++++++-- installer/AMXXRelease/ModCstrike.cs | 2 +- 5 files changed, 30 insertions(+), 18 deletions(-) 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