tools/builder/LinuxBuilder.cs
changeset 403 fe1c5a3a4ba2
parent 392 12aa3258d020
child 467 8192f64d8f57
     1.1 --- a/tools/builder/LinuxBuilder.cs	Sat Jan 27 09:28:48 2007 +0000
     1.2 +++ b/tools/builder/LinuxBuilder.cs	Sun Jan 28 04:19:46 2007 +0000
     1.3 @@ -11,6 +11,38 @@
     1.4  			cfg = _cfg;
     1.5  		}
     1.6  
     1.7 +		public override string CompressPackage(Package pkg)
     1.8 +		{
     1.9 +			string lpath = null, ltarget = null;
    1.10 +			
    1.11 +			pkg.GetCompressBases(ref lpath, ref ltarget);
    1.12 +
    1.13 +			string local_dir = Config.PathFormat("{0}/{1}", 
    1.14 +				cfg.OutputBase,
    1.15 +				lpath);
    1.16 +
    1.17 +			string name = PackageBuildName(pkg) + ".tar.gz";
    1.18 +
    1.19 +			ProcessStartInfo info = new ProcessStartInfo();
    1.20 +			info.FileName = cfg.Compressor;
    1.21 +			info.WorkingDirectory = local_dir;
    1.22 +			info.Arguments = "zcvf \"" + name + "\" \"" + ltarget + "\"";
    1.23 +			info.UseShellExecute = false;
    1.24 +
    1.25 +			Process p = Process.Start(info);
    1.26 +			p.WaitForExit();
    1.27 +
    1.28 +			local_dir = Config.PathFormat("{0}/{1}", local_dir, name);
    1.29 +
    1.30 +			if (!File.Exists(local_dir))
    1.31 +			{
    1.32 +				return null;
    1.33 +			}
    1.34 +
    1.35 +			return name;
    1.36 +		}
    1.37 +
    1.38 +
    1.39  		public override bool BuildLibrary(Package pkg, Library lib, ref string _binName, ref string _binPath)
    1.40  		{
    1.41  			ProcessStartInfo info = new ProcessStartInfo();