[nstool] Start CmntProcess

This commit is contained in:
jakcron 2018-05-12 17:37:15 +08:00
parent a02ba43292
commit b36875661e
6 changed files with 21 additions and 8 deletions

View file

@ -163,6 +163,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="source\AesCtrWrappedIFile.h" /> <ClInclude Include="source\AesCtrWrappedIFile.h" />
<ClInclude Include="source\CmntProcess.h" />
<ClInclude Include="source\CopiedIFile.h" /> <ClInclude Include="source\CopiedIFile.h" />
<ClInclude Include="source\NcaProcess.h" /> <ClInclude Include="source\NcaProcess.h" />
<ClInclude Include="source\NpdmProcess.h" /> <ClInclude Include="source\NpdmProcess.h" />
@ -176,6 +177,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="source\AesCtrWrappedIFile.cpp" /> <ClCompile Include="source\AesCtrWrappedIFile.cpp" />
<ClCompile Include="source\CmntProcess.cpp" />
<ClCompile Include="source\main.cpp" /> <ClCompile Include="source\main.cpp" />
<ClCompile Include="source\NcaProcess.cpp" /> <ClCompile Include="source\NcaProcess.cpp" />
<ClCompile Include="source\NpdmProcess.cpp" /> <ClCompile Include="source\NpdmProcess.cpp" />

View file

@ -48,6 +48,9 @@
<ClInclude Include="source\OffsetAdjustedIFile.h"> <ClInclude Include="source\OffsetAdjustedIFile.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="source\CmntProcess.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="source\main.cpp"> <ClCompile Include="source\main.cpp">
@ -77,6 +80,9 @@
<ClCompile Include="source\OffsetAdjustedIFile.cpp"> <ClCompile Include="source\OffsetAdjustedIFile.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="source\CmntProcess.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="makefile" /> <None Include="makefile" />

View file

@ -0,0 +1 @@
#include "CmntProcess.h"

View file

@ -0,0 +1 @@
#pragma once

View file

@ -38,7 +38,7 @@ void UserSettings::showHelp()
printf("\n General Options:\n"); printf("\n General Options:\n");
printf(" -d, --dev Use devkit keyset\n"); printf(" -d, --dev Use devkit keyset\n");
printf(" -k, --keyset Specify keyset file\n"); printf(" -k, --keyset Specify keyset file\n");
printf(" -t, --type Specify input file type [xci, pfs, romfs, nca, npdm]\n"); printf(" -t, --type Specify input file type [xci, pfs, romfs, nca, npdm, cmnt]\n");
printf(" -y, --verify Verify file\n"); printf(" -y, --verify Verify file\n");
printf(" -v, --verbose Verbose output\n"); printf(" -v, --verbose Verbose output\n");
printf(" -q, --quiet Minimal output\n"); printf(" -q, --quiet Minimal output\n");
@ -565,17 +565,19 @@ FileType UserSettings::getFileTypeFromString(const std::string& type_str)
FileType type; FileType type;
if (str == "xci") if (str == "xci")
type = FILE_XCI; type = FILE_XCI;
else if ( str == "partitionfs" \ else if (str == "partitionfs" \
|| str == "pfs" || str == "pfs0" \ || str == "pfs" || str == "pfs0" \
|| str == "hfs" || str == "hfs0" \ || str == "hfs" || str == "hfs0" \
|| str == "nsp") || str == "nsp")
type = FILE_PARTITIONFS; type = FILE_PARTITIONFS;
else if (str == "romfs") else if (str == "romfs")
type = FILE_ROMFS; type = FILE_ROMFS;
else if (str == "nca") else if (str == "nca")
type = FILE_NCA; type = FILE_NCA;
else if (str == "npdm") else if (str == "npdm")
type = FILE_NPDM; type = FILE_NPDM;
else if (str == "cmnt")
type = FILE_CMNT;
else else
type = FILE_INVALID; type = FILE_INVALID;

View file

@ -17,6 +17,7 @@ enum FileType
FILE_ROMFS, FILE_ROMFS,
FILE_NCA, FILE_NCA,
FILE_NPDM, FILE_NPDM,
FILE_CMNT,
FILE_INVALID = -1, FILE_INVALID = -1,
}; };