This commit is contained in:
Chenx221 2024-10-26 22:50:52 +08:00
parent 608bbb36d6
commit a5e9d161d3
Signed by: chenx221
GPG Key ID: D7A9EC07024C3021
3 changed files with 47 additions and 44 deletions

View File

@ -317,8 +317,9 @@ namespace EscudeTools
if (useCustomKey)
LoadKey(customKeyProviderPath);
GeneratePItem(path);
if(File.Exists(Path.Combine(path, "lzwManifest.json")))
return false; //Q:为什么不支持 //A:因为我实在不想研究lzw算法欢迎PR
//if(File.Exists(Path.Combine(path, "lzwManifest.json")))
// return false;
//Q:为什么不支持LZW打包 //A:因为我实在不想研究lzw算法欢迎PR
m_seed = isLoaded ? LoadedKey : 2210579460;
string outputPath = Path.Combine(Path.GetDirectoryName(path), Path.GetFileName(path) + ".bin");
using (FileStream fs = new(outputPath, FileMode.Create))

View File

@ -328,22 +328,24 @@ namespace EscudeTools
// }
//}
//Batch Repack ESC-ARC Package
if (Directory.Exists(args[0]))// && Directory.Exists(args[1])
{
string[] directories = Directory.GetDirectories(args[0]);
foreach (string directory in directories)
{
PackManager pm = new();
//string providerFilePath = Path.Combine(args[1], Path.GetFileName(directory) + ".bin");
if (pm.Repack(directory, 2, true))
Console.WriteLine("Repack Package Success");
else
{
Console.WriteLine("Repack Package Failed");
}
}
}
////不支持script data打包因为这几个封包游戏强制lzw压缩读取
////而我没写出lzw压缩代码
////Batch Repack ESC-ARC Package
//if (Directory.Exists(args[0]))// && Directory.Exists(args[1])
//{
// string[] directories = Directory.GetDirectories(args[0]);
// foreach (string directory in directories)
// {
// PackManager pm = new();
// //string providerFilePath = Path.Combine(args[1], Path.GetFileName(directory) + ".bin");
// if (pm.Repack(directory, 2, true))
// Console.WriteLine("Repack Package Success");
// else
// {
// Console.WriteLine("Repack Package Failed");
// }
// }
//}
////Batch Unpack Script(Full, Text, Mess)
@ -438,34 +440,34 @@ namespace EscudeTools
//}
////导出db_*.bin
//if (Directory.Exists(args[0]))
//{
// string[] files = Directory.GetFiles(args[0], "db_*.bin");
// DatabaseManager dm = new();
// foreach (string file in files)
// {
// if (dm.LoadDatabase(file))
// {
// Console.WriteLine($"Load {file} Success");
// }
// else
// {
// Console.WriteLine($"Load {file} Failed");
// return;
// }
//导出db_*.bin
if (Directory.Exists(args[0]))
{
string[] files = Directory.GetFiles(args[0], "db_*.bin");
DatabaseManager dm = new();
foreach (string file in files)
{
if (dm.LoadDatabase(file))
{
Console.WriteLine($"Load {file} Success");
}
else
{
Console.WriteLine($"Load {file} Failed");
return;
}
// if (dm.ExportDatabase(Path.GetDirectoryName(args[0])))
// Console.WriteLine("Export Database Success");
// else
// {
// Console.WriteLine("Export Database Failed");
// return;
// }
if (dm.ExportDatabase(Path.GetDirectoryName(args[0])))
Console.WriteLine("Export Database Success");
else
{
Console.WriteLine("Export Database Failed");
return;
}
// }
}
//}
}
// if (args.Length == 0 || args.Length > 2)

View File

@ -2,7 +2,7 @@
"profiles": {
"EscudeTools": {
"commandName": "Project",
"commandLineArgs": "G:\\x221.local\\lab3\\Haison\\output\\output"
"commandLineArgs": "G:\\x221.local\\lab3\\Haison\\output\\data"
}
}
}