Fixed compression on Linux
This commit is contained in:
parent
0176d3a2ae
commit
c213c771d2
|
@ -32,7 +32,7 @@ public virtual bool Build(Config cfg, Build build)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
CompressDir(
|
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())
|
PropSlashes(m_Cfg.OutputPath() + "\\" + mod.GetName())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,12 +21,12 @@ public Build()
|
||||||
ModTFC tfc = new ModTFC();
|
ModTFC tfc = new ModTFC();
|
||||||
ModTs ts = new ModTs();
|
ModTs ts = new ModTs();
|
||||||
|
|
||||||
/*m_Mods.Add(core);
|
m_Mods.Add(core);
|
||||||
m_Mods.Add(cstrike);
|
m_Mods.Add(cstrike);
|
||||||
m_Mods.Add(dod);
|
m_Mods.Add(dod);
|
||||||
m_Mods.Add(esf);
|
m_Mods.Add(esf);
|
||||||
m_Mods.Add(ns);
|
m_Mods.Add(ns);
|
||||||
m_Mods.Add(tfc);*/
|
m_Mods.Add(tfc);
|
||||||
m_Mods.Add(ts);
|
m_Mods.Add(ts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,18 @@ public override void CompressDir(string target, string dir)
|
||||||
|
|
||||||
info.FileName = m_Cfg.CompressPath();
|
info.FileName = m_Cfg.CompressPath();
|
||||||
info.WorkingDirectory = dir;
|
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;
|
info.UseShellExecute = false;
|
||||||
|
|
||||||
Process p = Process.Start(info);
|
Process p = Process.Start(info);
|
||||||
|
|
|
@ -20,7 +20,7 @@ public override void CompressDir(string target, string dir)
|
||||||
|
|
||||||
info.FileName = m_Cfg.CompressPath();
|
info.FileName = m_Cfg.CompressPath();
|
||||||
info.WorkingDirectory = dir;
|
info.WorkingDirectory = dir;
|
||||||
info.Arguments = "-r " + target + " " + "*.*";
|
info.Arguments = "-r " + target + ".zip " + "*.*";
|
||||||
info.UseShellExecute = false;
|
info.UseShellExecute = false;
|
||||||
|
|
||||||
Process p = Process.Start(info);
|
Process p = Process.Start(info);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user