mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Option to export raw RomFS from XCI
This commit is contained in:
parent
8032d3d46a
commit
7b0ae0c954
2 changed files with 12 additions and 3 deletions
|
@ -156,6 +156,7 @@ namespace hactoolnet
|
|||
sb.AppendLine(" --section1dir <dir> Specify Section 1 directory path.");
|
||||
sb.AppendLine(" --section2dir <dir> Specify Section 2 directory path.");
|
||||
sb.AppendLine(" --section3dir <dir> Specify Section 3 directory path.");
|
||||
sb.AppendLine(" --romfsdir <dir> Specify main RomFS directory path.");
|
||||
sb.AppendLine(" --listromfs List files in RomFS.");
|
||||
sb.AppendLine(" --basenca Set Base NCA to use with update partitions.");
|
||||
sb.AppendLine("XCI options:");
|
||||
|
|
|
@ -249,7 +249,7 @@ namespace hactoolnet
|
|||
}
|
||||
}
|
||||
|
||||
if (ctx.Options.RomfsOutDir != null)
|
||||
if (ctx.Options.RomfsOutDir != null || ctx.Options.RomfsOut != null)
|
||||
{
|
||||
if (xci.SecurePartition == null)
|
||||
{
|
||||
|
@ -284,8 +284,16 @@ namespace hactoolnet
|
|||
return;
|
||||
}
|
||||
|
||||
var romfs = new Romfs(mainNca.OpenSection(romfsSection.SectionNum, false));
|
||||
romfs.Extract(ctx.Options.RomfsOutDir, ctx.Logger);
|
||||
if (ctx.Options.RomfsOutDir != null)
|
||||
{
|
||||
var romfs = new Romfs(mainNca.OpenSection(romfsSection.SectionNum, false));
|
||||
romfs.Extract(ctx.Options.RomfsOutDir, ctx.Logger);
|
||||
}
|
||||
|
||||
if (ctx.Options.RomfsOut != null)
|
||||
{
|
||||
mainNca.ExportSection(romfsSection.SectionNum, ctx.Options.RomfsOut, ctx.Options.Raw, ctx.Logger);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue