mirror of
https://github.com/jakcron/nstool
synced 2024-11-22 21:49:30 +00:00
Merge branch 'refactor' of https://github.com/jakcron/NXTools into refactor
This commit is contained in:
commit
96927dca8f
1 changed files with 35 additions and 0 deletions
|
@ -62,6 +62,23 @@ std::string kKaekIndexStr[]
|
|||
"System"
|
||||
};
|
||||
|
||||
std::string kContentTypeForMountStr[]
|
||||
{
|
||||
"program",
|
||||
"meta",
|
||||
"control",
|
||||
"manual",
|
||||
"data",
|
||||
"publicdata"
|
||||
};
|
||||
|
||||
std::string kProgramPartitionNameStr[]
|
||||
{
|
||||
"code",
|
||||
"data",
|
||||
"logo"
|
||||
};
|
||||
|
||||
void NcaProcess::generateNcaBodyEncryptionKeys()
|
||||
{
|
||||
// create zeros key
|
||||
|
@ -431,6 +448,15 @@ void NcaProcess::processPartitions()
|
|||
pfs.setInputFile(partition.reader, partition.offset + partition.data_offset, partition.data_size);
|
||||
pfs.setCliOutputMode(mCliOutputType);
|
||||
pfs.setListFs(mListFs);
|
||||
if (mHdr.getContentType() == nx::nca::TYPE_PROGRAM)
|
||||
{
|
||||
pfs.setMountPointName(kContentTypeForMountStr[mHdr.getContentType()] + ":/" + kProgramPartitionNameStr[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
pfs.setMountPointName(kContentTypeForMountStr[mHdr.getContentType()] + ":/");
|
||||
}
|
||||
|
||||
if (mPartitionPath[index].doExtract)
|
||||
pfs.setExtractPath(mPartitionPath[index].path);
|
||||
//printf("pfs.process(%lx)\n",partition.data_offset);
|
||||
|
@ -443,6 +469,15 @@ void NcaProcess::processPartitions()
|
|||
romfs.setInputFile(partition.reader, partition.offset + partition.data_offset, partition.data_size);
|
||||
romfs.setCliOutputMode(mCliOutputType);
|
||||
romfs.setListFs(mListFs);
|
||||
if (mHdr.getContentType() == nx::nca::TYPE_PROGRAM)
|
||||
{
|
||||
romfs.setMountPointName(kContentTypeForMountStr[mHdr.getContentType()] + ":/" + kProgramPartitionNameStr[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
romfs.setMountPointName(kContentTypeForMountStr[mHdr.getContentType()] + ":/");
|
||||
}
|
||||
|
||||
if (mPartitionPath[index].doExtract)
|
||||
romfs.setExtractPath(mPartitionPath[index].path);
|
||||
//printf("romfs.process(%lx)\n", partition.data_offset);
|
||||
|
|
Loading…
Reference in a new issue