diff --git a/programs/nstool/source/AssetProcess.h b/programs/nstool/source/AssetProcess.h index aae5177..64efbc7 100644 --- a/programs/nstool/source/AssetProcess.h +++ b/programs/nstool/source/AssetProcess.h @@ -6,7 +6,7 @@ #include "NacpProcess.h" #include "RomfsProcess.h" -#include "nstool.h" +#include "common.h" class AssetProcess { diff --git a/programs/nstool/source/CnmtProcess.h b/programs/nstool/source/CnmtProcess.h index 83535ba..2fbcd15 100644 --- a/programs/nstool/source/CnmtProcess.h +++ b/programs/nstool/source/CnmtProcess.h @@ -4,7 +4,7 @@ #include #include -#include "nstool.h" +#include "common.h" class CnmtProcess { diff --git a/programs/nstool/source/EsTikProcess.h b/programs/nstool/source/EsTikProcess.h index ae77ec3..94f5b05 100644 --- a/programs/nstool/source/EsTikProcess.h +++ b/programs/nstool/source/EsTikProcess.h @@ -7,7 +7,7 @@ #include #include #include "KeyConfiguration.h" -#include "nstool.h" +#include "common.h" class EsTikProcess { diff --git a/programs/nstool/source/HashTreeWrappedIFile.cpp b/programs/nstool/source/HashTreeWrappedIFile.cpp index 3b147e9..7ff7e7c 100644 --- a/programs/nstool/source/HashTreeWrappedIFile.cpp +++ b/programs/nstool/source/HashTreeWrappedIFile.cpp @@ -1,4 +1,4 @@ -#include "nstool.h" +#include "common.h" #include "HashTreeWrappedIFile.h" #include "OffsetAdjustedIFile.h" diff --git a/programs/nstool/source/NacpProcess.h b/programs/nstool/source/NacpProcess.h index 8d6eb6e..0e6aed3 100644 --- a/programs/nstool/source/NacpProcess.h +++ b/programs/nstool/source/NacpProcess.h @@ -4,7 +4,7 @@ #include #include -#include "nstool.h" +#include "common.h" class NacpProcess { diff --git a/programs/nstool/source/NcaProcess.h b/programs/nstool/source/NcaProcess.h index b263278..f467945 100644 --- a/programs/nstool/source/NcaProcess.h +++ b/programs/nstool/source/NcaProcess.h @@ -7,7 +7,7 @@ #include "KeyConfiguration.h" -#include "nstool.h" +#include "common.h" class NcaProcess { diff --git a/programs/nstool/source/NpdmProcess.h b/programs/nstool/source/NpdmProcess.h index 68c3523..a203c0e 100644 --- a/programs/nstool/source/NpdmProcess.h +++ b/programs/nstool/source/NpdmProcess.h @@ -5,7 +5,7 @@ #include #include "KeyConfiguration.h" -#include "nstool.h" +#include "common.h" class NpdmProcess { diff --git a/programs/nstool/source/NroProcess.h b/programs/nstool/source/NroProcess.h index 12f1eb8..7d27553 100644 --- a/programs/nstool/source/NroProcess.h +++ b/programs/nstool/source/NroProcess.h @@ -7,7 +7,7 @@ #include #include "AssetProcess.h" -#include "nstool.h" +#include "common.h" #include "RoMetadataProcess.h" class NroProcess diff --git a/programs/nstool/source/NsoProcess.h b/programs/nstool/source/NsoProcess.h index 0cf57c0..a74beaf 100644 --- a/programs/nstool/source/NsoProcess.h +++ b/programs/nstool/source/NsoProcess.h @@ -6,7 +6,7 @@ #include #include -#include "nstool.h" +#include "common.h" #include "RoMetadataProcess.h" class NsoProcess diff --git a/programs/nstool/source/PfsProcess.h b/programs/nstool/source/PfsProcess.h index 96c56aa..562dd21 100644 --- a/programs/nstool/source/PfsProcess.h +++ b/programs/nstool/source/PfsProcess.h @@ -4,7 +4,7 @@ #include #include -#include "nstool.h" +#include "common.h" class PfsProcess { diff --git a/programs/nstool/source/PkiCertProcess.h b/programs/nstool/source/PkiCertProcess.h index 964a70d..c281ae7 100644 --- a/programs/nstool/source/PkiCertProcess.h +++ b/programs/nstool/source/PkiCertProcess.h @@ -7,7 +7,7 @@ #include #include #include "KeyConfiguration.h" -#include "nstool.h" +#include "common.h" class PkiCertProcess { diff --git a/programs/nstool/source/RoMetadataProcess.h b/programs/nstool/source/RoMetadataProcess.h index e1dbff2..664e06c 100644 --- a/programs/nstool/source/RoMetadataProcess.h +++ b/programs/nstool/source/RoMetadataProcess.h @@ -6,7 +6,7 @@ #include -#include "nstool.h" +#include "common.h" #include "SdkApiString.h" #include "ElfSymbolParser.h" diff --git a/programs/nstool/source/RomfsProcess.h b/programs/nstool/source/RomfsProcess.h index 475576c..7132bba 100644 --- a/programs/nstool/source/RomfsProcess.h +++ b/programs/nstool/source/RomfsProcess.h @@ -6,7 +6,7 @@ #include #include -#include "nstool.h" +#include "common.h" class RomfsProcess { diff --git a/programs/nstool/source/UserSettings.cpp b/programs/nstool/source/UserSettings.cpp index fd4cf97..bf97fb8 100644 --- a/programs/nstool/source/UserSettings.cpp +++ b/programs/nstool/source/UserSettings.cpp @@ -45,10 +45,10 @@ void UserSettings::parseCmdArgs(const std::vector& arg_list) void UserSettings::showHelp() { - printf("NSTool v%d.%d.%d (C) %s\n", VER_MAJOR, VER_MINOR, VER_PATCH, AUTHORS); + printf("%s v%d.%d.%d (C) %s\n", APP_NAME, VER_MAJOR, VER_MINOR, VER_PATCH, AUTHORS); printf("Built: %s %s\n\n", __TIME__, __DATE__); - printf("Usage: nstool [options... ] \n"); + printf("Usage: %s [options... ] \n", BIN_NAME); printf("\n General Options:\n"); printf(" -d, --dev Use devkit keyset.\n"); printf(" -k, --keyset Specify keyset file.\n"); @@ -59,18 +59,18 @@ void UserSettings::showHelp() printf(" --showlayout Show layout metadata.\n"); printf(" -v, --verbose Verbose output.\n"); printf("\n XCI (GameCard Image)\n"); - printf(" nstool [--listfs] [--update --logo --normal --secure ] <.xci file>\n"); + printf(" %s [--listfs] [--update --logo --normal --secure ] <.xci file>\n", BIN_NAME); printf(" --listfs Print file system in embedded partitions.\n"); printf(" --update Extract \"update\" partition to directory.\n"); printf(" --logo Extract \"logo\" partition to directory.\n"); printf(" --normal Extract \"normal\" partition to directory.\n"); printf(" --secure Extract \"secure\" partition to directory.\n"); printf("\n PFS0/HFS0 (PartitionFs), RomFs, NSP (Ninendo Submission Package)\n"); - printf(" nstool [--listfs] [--fsdir ] \n"); + printf(" %s [--listfs] [--fsdir ] \n", BIN_NAME); printf(" --listfs Print file system.\n"); printf(" --fsdir Extract file system to directory.\n"); printf("\n NCA (Nintendo Content Archive)\n"); - printf(" nstool [--listfs] [--bodykey --titlekey ] [--part0 ...] <.nca file>\n"); + printf(" %s [--listfs] [--bodykey --titlekey ] [--part0 ...] <.nca file>\n", BIN_NAME); printf(" --listfs Print file system in embedded partitions.\n"); printf(" --titlekey Specify title key extracted from ticket.\n"); printf(" --bodykey Specify body encryption key.\n"); @@ -81,12 +81,12 @@ void UserSettings::showHelp() printf(" --part2 Extract \"partition 2\" to directory.\n"); printf(" --part3 Extract \"partition 3\" to directory.\n"); printf("\n NSO (Nintendo Software Object), NRO (Nintendo Relocatable Object)\n"); - printf(" nstool [--listapi --listsym] [--insttype ] \n"); + printf(" %s [--listapi --listsym] [--insttype ] \n", BIN_NAME); printf(" --listapi Print SDK API List.\n"); printf(" --listsym Print Code Symbols.\n"); printf(" --insttype Specify instruction type [64bit|32bit] (64bit is assumed).\n"); printf("\n ASET (Homebrew Asset Blob)\n"); - printf(" nstool [--listfs] [--icon --nacp --fsdir ] \n"); + printf(" %s [--listfs] [--icon --nacp --fsdir ] \n", BIN_NAME); printf(" --listfs Print filesystem in embedded RomFS partition.\n"); printf(" --icon Extract icon partition to file.\n"); printf(" --nacp Extract NACP partition to file.\n"); diff --git a/programs/nstool/source/UserSettings.h b/programs/nstool/source/UserSettings.h index a3c61db..eeddd6f 100644 --- a/programs/nstool/source/UserSettings.h +++ b/programs/nstool/source/UserSettings.h @@ -7,7 +7,7 @@ #include #include #include -#include "nstool.h" +#include "common.h" #include "KeyConfiguration.h" class UserSettings diff --git a/programs/nstool/source/XciProcess.h b/programs/nstool/source/XciProcess.h index 0978b18..bb9009c 100644 --- a/programs/nstool/source/XciProcess.h +++ b/programs/nstool/source/XciProcess.h @@ -7,7 +7,7 @@ #include "KeyConfiguration.h" #include "PfsProcess.h" -#include "nstool.h" +#include "common.h" class XciProcess { diff --git a/programs/nstool/source/nstool.h b/programs/nstool/source/common.h similarity index 100% rename from programs/nstool/source/nstool.h rename to programs/nstool/source/common.h diff --git a/programs/nstool/source/version.h b/programs/nstool/source/version.h index 88311a6..184fe13 100644 --- a/programs/nstool/source/version.h +++ b/programs/nstool/source/version.h @@ -1,4 +1,6 @@ #pragma once +#define APP_NAME "NSTool" +#define BIN_NAME "nstool" #define VER_MAJOR 1 #define VER_MINOR 0 #define VER_PATCH 3