2018-09-18 02:18:28 +02:00
|
|
|
|
using System.IO;
|
|
|
|
|
using LibHac;
|
|
|
|
|
|
|
|
|
|
namespace hactoolnet
|
|
|
|
|
{
|
|
|
|
|
internal static class ProcessKip
|
|
|
|
|
{
|
|
|
|
|
public static void ProcessKip1(Context ctx)
|
|
|
|
|
{
|
|
|
|
|
using (var file = new FileStream(ctx.Options.InFile, FileMode.Open, FileAccess.Read))
|
|
|
|
|
{
|
|
|
|
|
var kip = new Kip(file);
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-09-18 02:52:22 +02:00
|
|
|
|
|
|
|
|
|
public static void ProcessIni1(Context ctx)
|
|
|
|
|
{
|
|
|
|
|
using (var file = new FileStream(ctx.Options.InFile, FileMode.Open, FileAccess.Read))
|
|
|
|
|
{
|
|
|
|
|
var ini1 = new Ini1(file);
|
|
|
|
|
|
|
|
|
|
string outDir = ctx.Options.OutDir;
|
|
|
|
|
|
|
|
|
|
if (outDir != null)
|
|
|
|
|
{
|
|
|
|
|
Directory.CreateDirectory(outDir);
|
|
|
|
|
|
|
|
|
|
foreach (Kip kip in ini1.Kips)
|
|
|
|
|
{
|
|
|
|
|
kip.OpenRawFile().WriteAllBytes(Path.Combine(outDir, $"{kip.Header.Name}.kip1"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-09-18 02:18:28 +02:00
|
|
|
|
}
|
|
|
|
|
}
|