Fixed compression on Linux

This commit is contained in:
David Anderson 2005-08-25 08:20:11 +00:00
parent 0176d3a2ae
commit c213c771d2
4 changed files with 16 additions and 5 deletions

View File

@ -32,7 +32,7 @@ public virtual bool Build(Config cfg, Build build)
return false;
}
CompressDir(
PropSlashes(m_Cfg.OutputPath() + "\\" + m_Cfg.GetReleaseName() + "-" + mod.GetName() + ".zip"),
PropSlashes(m_Cfg.OutputPath() + "\\" + m_Cfg.GetReleaseName() + "-" + mod.GetName()),
PropSlashes(m_Cfg.OutputPath() + "\\" + mod.GetName())
);
}

View File

@ -21,12 +21,12 @@ public Build()
ModTFC tfc = new ModTFC();
ModTs ts = new ModTs();
/*m_Mods.Add(core);
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(tfc);
m_Mods.Add(ts);
}

View File

@ -20,7 +20,18 @@ public override void CompressDir(string target, string dir)
info.FileName = m_Cfg.CompressPath();
info.WorkingDirectory = dir;
info.Arguments = "zcvf " + target + " " + "*";
string [] files = Directory.GetFiles(dir);
string file_list = "";
for (int i=0; i<files.Length; i++)
file_list += GetFileName(files[i]) + " ";
files = Directory.GetDirectories(dir);
for (int i=0; i<files.Length; i++)
file_list += GetFileName(files[i]) + " ";
info.Arguments = "zcvf " + target + ".tar.gz " + file_list;
Console.WriteLine(info.WorkingDirectory);
Console.WriteLine(info.Arguments);
info.UseShellExecute = false;
Process p = Process.Start(info);

View File

@ -20,7 +20,7 @@ public override void CompressDir(string target, string dir)
info.FileName = m_Cfg.CompressPath();
info.WorkingDirectory = dir;
info.Arguments = "-r " + target + " " + "*.*";
info.Arguments = "-r " + target + ".zip " + "*.*";
info.UseShellExecute = false;
Process p = Process.Start(info);