From b36875661e64328b0c57f2b3adc8c19930b65e00 Mon Sep 17 00:00:00 2001 From: jakcron Date: Sat, 12 May 2018 17:37:15 +0800 Subject: [PATCH] [nstool] Start CmntProcess --- programs/nstool/nstool.vcxproj | 2 ++ programs/nstool/nstool.vcxproj.filters | 6 ++++++ programs/nstool/source/CmntProcess.cpp | 1 + programs/nstool/source/CmntProcess.h | 1 + programs/nstool/source/UserSettings.cpp | 18 ++++++++++-------- programs/nstool/source/nstool.h | 1 + 6 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 programs/nstool/source/CmntProcess.cpp create mode 100644 programs/nstool/source/CmntProcess.h diff --git a/programs/nstool/nstool.vcxproj b/programs/nstool/nstool.vcxproj index d6492f2..150401f 100644 --- a/programs/nstool/nstool.vcxproj +++ b/programs/nstool/nstool.vcxproj @@ -163,6 +163,7 @@ + @@ -176,6 +177,7 @@ + diff --git a/programs/nstool/nstool.vcxproj.filters b/programs/nstool/nstool.vcxproj.filters index 930a7f0..61f7449 100644 --- a/programs/nstool/nstool.vcxproj.filters +++ b/programs/nstool/nstool.vcxproj.filters @@ -48,6 +48,9 @@ Header Files + + Header Files + @@ -77,6 +80,9 @@ Source Files + + Source Files + diff --git a/programs/nstool/source/CmntProcess.cpp b/programs/nstool/source/CmntProcess.cpp new file mode 100644 index 0000000..d321c22 --- /dev/null +++ b/programs/nstool/source/CmntProcess.cpp @@ -0,0 +1 @@ +#include "CmntProcess.h" \ No newline at end of file diff --git a/programs/nstool/source/CmntProcess.h b/programs/nstool/source/CmntProcess.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/programs/nstool/source/CmntProcess.h @@ -0,0 +1 @@ +#pragma once diff --git a/programs/nstool/source/UserSettings.cpp b/programs/nstool/source/UserSettings.cpp index 4f2f963..b71f551 100644 --- a/programs/nstool/source/UserSettings.cpp +++ b/programs/nstool/source/UserSettings.cpp @@ -38,7 +38,7 @@ void UserSettings::showHelp() printf("\n General Options:\n"); printf(" -d, --dev Use devkit keyset\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(" -v, --verbose Verbose output\n"); printf(" -q, --quiet Minimal output\n"); @@ -565,17 +565,19 @@ FileType UserSettings::getFileTypeFromString(const std::string& type_str) FileType type; if (str == "xci") type = FILE_XCI; - else if ( str == "partitionfs" \ - || str == "pfs" || str == "pfs0" \ - || str == "hfs" || str == "hfs0" \ - || str == "nsp") + else if (str == "partitionfs" \ + || str == "pfs" || str == "pfs0" \ + || str == "hfs" || str == "hfs0" \ + || str == "nsp") type = FILE_PARTITIONFS; - else if (str == "romfs") + else if (str == "romfs") type = FILE_ROMFS; - else if (str == "nca") + else if (str == "nca") type = FILE_NCA; - else if (str == "npdm") + else if (str == "npdm") type = FILE_NPDM; + else if (str == "cmnt") + type = FILE_CMNT; else type = FILE_INVALID; diff --git a/programs/nstool/source/nstool.h b/programs/nstool/source/nstool.h index 049cec9..99827fb 100644 --- a/programs/nstool/source/nstool.h +++ b/programs/nstool/source/nstool.h @@ -17,6 +17,7 @@ enum FileType FILE_ROMFS, FILE_NCA, FILE_NPDM, + FILE_CMNT, FILE_INVALID = -1, };