From d1e1d5229b3296d2cff99a076aaf57e72ba3a65a Mon Sep 17 00:00:00 2001 From: jakcron Date: Tue, 9 Nov 2021 16:30:11 +0800 Subject: [PATCH] Clarified help text. --- README.md | 41 +++++++++++++++++++++-------------------- src/Settings.cpp | 41 ++++++++++++++++++++++++----------------- 2 files changed, 45 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 0890c74..9dcf8dc 100644 --- a/README.md +++ b/README.md @@ -31,30 +31,31 @@ Usage: nstool [options... ] --showlayout Show layout metadata. -v, --verbose Verbose output. - XCI (GameCard Image) - nstool [--listfs] [--update --logo --normal --secure ] <.xci file> - --listfs Print file system in embedded partitions. - --update Extract "update" partition to directory. - --logo Extract "logo" partition to directory. - --normal Extract "normal" partition to directory. - --secure Extract "secure" partition to directory. - PFS0/HFS0 (PartitionFs), RomFs, NSP (Nintendo Submission Package) - nstool [--listfs] [--fsdir ] + nstool [--listfs] [--fsdir [] ] --listfs Print file system. - --fsdir Extract file system to directory. + -x, --fsdir Extract file system to directory. + + XCI (GameCard Image) + nstool [--listfs] [--fsdir [] ] [--update --logo --normal --secure ] <.xci file> + --listfs Print file system. + -x, --fsdir Extract file system to directory. + --update Extract "update" partition to directory. (Alias for "-x /update ") + --logo Extract "logo" partition to directory. (Alias for "-x /logo ") + --normal Extract "normal" partition to directory. (Alias for "-x /normal ") + --secure Extract "secure" partition to directory. (Alias for "-x /secure ") NCA (Nintendo Content Archive) - nstool [--listfs] [--bodykey --titlekey ] [--part0 ...] <.nca file> - --listfs Print file system in embedded partitions. + nstool [--listfs] [--bodykey --titlekey ] [--fsdir [] ] [--part0 ...] <.nca file> + --listfs Print file system. + -x, --fsdir Extract file system to directory. --titlekey Specify title key extracted from ticket. - --bodykey Specify body encryption key. --tik Specify ticket to source title key. --cert Specify certificate chain to verify ticket. - --part0 Extract "partition 0" to directory. - --part1 Extract "partition 1" to directory. - --part2 Extract "partition 2" to directory. - --part3 Extract "partition 3" to directory. + --part0 Extract "partition 0" to directory. (Alias for "-x /0 ") + --part1 Extract "partition 1" to directory. (Alias for "-x /1 ") + --part2 Extract "partition 2" to directory. (Alias for "-x /2 ") + --part3 Extract "partition 3" to directory. (Alias for "-x /3 ") NSO (Nintendo Shared Object), NRO (Nintendo Relocatable Object) nstool [--listapi --listsym] [--insttype ] @@ -62,16 +63,16 @@ Usage: nstool [options... ] --listsym Print Code Symbols. --insttype Specify instruction type [64bit|32bit] (64bit is assumed). - INI1 (Initial Program Bundle) + INI (Initial Program Bundle) nstool [--kipdir ] - --kipdir Extract embedded Initial Programs to directory. + --kipdir Extract embedded Inital Programs to directory. ASET (Homebrew Asset Blob) nstool [--listfs] [--icon --nacp --fsdir ] --listfs Print filesystem in embedded RomFS partition. --icon Extract icon partition to file. --nacp Extract NACP partition to file. - --fsdir Extract RomFS partition to directory. + -x, --fsdir Extract RomFS partition to directory. ``` # External Keys diff --git a/src/Settings.cpp b/src/Settings.cpp index 6114501..a826a6c 100644 --- a/src/Settings.cpp +++ b/src/Settings.cpp @@ -404,6 +404,11 @@ public: throw tc::ArgumentOutOfRangeException(fmt::format("Option \"{:s}\" requires a parameter.", option)); } + std::string custom_path_str; + tc::io::PathUtil::pathToUnixUTF8(mCustomPath, custom_path_str); + + fmt::print("[WARNING] \"{:s} {:s}\" is deprecated. Consider using \"-x {:s} {:s}\" instead.\n", option, params[0], custom_path_str, params[0]); + mJobs.push_back({mCustomPath, tc::io::Path(params[0])}); } private: @@ -700,28 +705,30 @@ void nstool::SettingsInitializer::usage_text() const fmt::print(" --showkeys Show keys generated.\n"); fmt::print(" --showlayout Show layout metadata.\n"); fmt::print(" -v, --verbose Verbose output.\n"); - fmt::print("\n XCI (GameCard Image)\n"); - fmt::print(" {:s} [--listfs] [--update --logo --normal --secure ] <.xci file>\n", BIN_NAME); - fmt::print(" --listfs Print file system in embedded partitions.\n"); - fmt::print(" --update Extract \"update\" partition to directory.\n"); - fmt::print(" --logo Extract \"logo\" partition to directory.\n"); - fmt::print(" --normal Extract \"normal\" partition to directory.\n"); - fmt::print(" --secure Extract \"secure\" partition to directory.\n"); fmt::print("\n PFS0/HFS0 (PartitionFs), RomFs, NSP (Nintendo Submission Package)\n"); - fmt::print(" {:s} [--listfs] [--fsdir ] \n", BIN_NAME); + fmt::print(" {:s} [--listfs] [--fsdir [] ] \n", BIN_NAME); fmt::print(" --listfs Print file system.\n"); - fmt::print(" --fsdir Extract file system to directory.\n"); + fmt::print(" -x, --fsdir Extract file system to directory.\n"); + fmt::print("\n XCI (GameCard Image)\n"); + fmt::print(" {:s} [--listfs] [--fsdir [] ] [--update --logo --normal --secure ] <.xci file>\n", BIN_NAME); + fmt::print(" --listfs Print file system.\n"); + fmt::print(" -x, --fsdir Extract file system to directory.\n"); + fmt::print(" --update Extract \"update\" partition to directory. (Alias for \"-x /update \")\n"); + fmt::print(" --logo Extract \"logo\" partition to directory. (Alias for \"-x /logo \")\n"); + fmt::print(" --normal Extract \"normal\" partition to directory. (Alias for \"-x /normal \")\n"); + fmt::print(" --secure Extract \"secure\" partition to directory. (Alias for \"-x /secure \")\n"); fmt::print("\n NCA (Nintendo Content Archive)\n"); - fmt::print(" {:s} [--listfs] [--bodykey --titlekey ] [--part0 ...] <.nca file>\n", BIN_NAME); - fmt::print(" --listfs Print file system in embedded partitions.\n"); + fmt::print(" {:s} [--listfs] [--bodykey --titlekey ] [--fsdir [] ] [--part0 ...] <.nca file>\n", BIN_NAME); + fmt::print(" --listfs Print file system.\n"); + fmt::print(" -x, --fsdir Extract file system to directory.\n"); fmt::print(" --titlekey Specify title key extracted from ticket.\n"); - fmt::print(" --bodykey Specify body encryption key.\n"); + //fmt::print(" --bodykey Specify body encryption key.\n"); fmt::print(" --tik Specify ticket to source title key.\n"); fmt::print(" --cert Specify certificate chain to verify ticket.\n"); - fmt::print(" --part0 Extract \"partition 0\" to directory.\n"); - fmt::print(" --part1 Extract \"partition 1\" to directory.\n"); - fmt::print(" --part2 Extract \"partition 2\" to directory.\n"); - fmt::print(" --part3 Extract \"partition 3\" to directory.\n"); + fmt::print(" --part0 Extract \"partition 0\" to directory. (Alias for \"-x /0 \")\n"); + fmt::print(" --part1 Extract \"partition 1\" to directory. (Alias for \"-x /1 \")\n"); + fmt::print(" --part2 Extract \"partition 2\" to directory. (Alias for \"-x /2 \")\n"); + fmt::print(" --part3 Extract \"partition 3\" to directory. (Alias for \"-x /3 \")\n"); fmt::print("\n NSO (Nintendo Shared Object), NRO (Nintendo Relocatable Object)\n"); fmt::print(" {:s} [--listapi --listsym] [--insttype ] \n", BIN_NAME); fmt::print(" --listapi Print SDK API List.\n"); @@ -735,7 +742,7 @@ void nstool::SettingsInitializer::usage_text() const fmt::print(" --listfs Print filesystem in embedded RomFS partition.\n"); fmt::print(" --icon Extract icon partition to file.\n"); fmt::print(" --nacp Extract NACP partition to file.\n"); - fmt::print(" --fsdir Extract RomFS partition to directory.\n"); + fmt::print(" -x, --fsdir Extract RomFS partition to directory.\n"); } void nstool::SettingsInitializer::dump_keys() const