From ca5242682541db575db725f65a506ab1f3aff728 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 16 May 2007 23:32:22 +0000 Subject: [PATCH] compressor step is now optional --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40812 --- tools/builder/ABuilder.cs | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/tools/builder/ABuilder.cs b/tools/builder/ABuilder.cs index 0d198ca1..22d83830 100644 --- a/tools/builder/ABuilder.cs +++ b/tools/builder/ABuilder.cs @@ -173,25 +173,28 @@ namespace builder } string pkg_file = null; - if ((pkg_file=CompressPackage(pkg)) == null) + if (cfg.Compressor != null) { - throw new System.Exception("Failed to compress package: " + pkg.GetPackageName()); + if ((pkg_file=CompressPackage(pkg)) == null) + { + throw new System.Exception("Failed to compress package: " + pkg.GetPackageName()); + } + + string lpath = null, ltarget = null; + pkg.GetCompressBases(ref lpath, ref ltarget); + lpath = Config.PathFormat("{0}/{1}/{2}", + cfg.OutputBase, + lpath, + pkg_file); + ltarget = Config.PathFormat("{0}/{1}", cfg.OutputBase, pkg_file); + + if (File.Exists(ltarget)) + { + File.Delete(ltarget); + } + + File.Move(lpath, ltarget); } - - string lpath = null, ltarget = null; - pkg.GetCompressBases(ref lpath, ref ltarget); - lpath = Config.PathFormat("{0}/{1}/{2}", - cfg.OutputBase, - lpath, - pkg_file); - ltarget = Config.PathFormat("{0}/{1}", cfg.OutputBase, pkg_file); - - if (File.Exists(ltarget)) - { - File.Delete(ltarget); - } - - File.Move(lpath, ltarget); } } }