mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 02:27:43 +00:00
Use UTF-8 exclusively internally
This removes SystemString, SystemChar, etc. All filepaths and log strings are assumed to be UTF-8, with conversions to UTF-16 for Windows APIs as appropriate. Updates amuse, athena, boo, kabufua and nod
This commit is contained in:
@@ -20,50 +20,50 @@ public:
|
||||
static void Help(HelpOutput& help) {
|
||||
/* clang-format off */
|
||||
help.printBold(
|
||||
_SYS_STR(" ___________ \n")
|
||||
_SYS_STR(" ,.-'\"...........``~., \n")
|
||||
_SYS_STR(" ,.-\".......................\"-., \n")
|
||||
_SYS_STR(" ,/..................................\":, \n")
|
||||
_SYS_STR(" .,?........................................, \n")
|
||||
_SYS_STR(" /...........................................,}\n")
|
||||
_SYS_STR(" ./........................................,:`^`..}\n")
|
||||
_SYS_STR(" ./.......................................,:\"...../\n")
|
||||
_SYS_STR(" ?.....__..................................:`...../\n")
|
||||
_SYS_STR(" /__.(...\"~-,_...........................,:`....../\n")
|
||||
_SYS_STR(" /(_....\"~,_....\"~,_.....................,:`...._/ \n")
|
||||
_SYS_STR(" {.._$;_....\"=,_.....\"-,_......,.-~-,},.~\";/....} \n")
|
||||
_SYS_STR(" ((...*~_......\"=-._...\";,,./`........../\"..../ \n")
|
||||
_SYS_STR(" ,,,___.`~,......\"~.,....................`......}....../ \n")
|
||||
_SYS_STR("............(....`=-,,...`.........................(...;_,,-\" \n")
|
||||
_SYS_STR("............/.`~,......`-.................................../ \n")
|
||||
_SYS_STR(".............`~.*-,.....................................|,./...,__ \n")
|
||||
_SYS_STR(",,_..........}.>-._...................................|.......`=~-, \n")
|
||||
_SYS_STR(".....`=~-,__......`,................................. \n")
|
||||
_SYS_STR("...................`=~-,,.,........................... \n")
|
||||
_SYS_STR(".........................`:,,..........................`\n")
|
||||
_SYS_STR("...........................`=-,...............,%%`>--==`` \n")
|
||||
_SYS_STR(".................................._.........._,-%%...` \n")
|
||||
_SYS_STR("...................................,\n"));
|
||||
" ___________ \n"
|
||||
" ,.-'\"...........``~., \n"
|
||||
" ,.-\".......................\"-., \n"
|
||||
" ,/..................................\":, \n"
|
||||
" .,?........................................, \n"
|
||||
" /...........................................,}\n"
|
||||
" ./........................................,:`^`..}\n"
|
||||
" ./.......................................,:\"...../\n"
|
||||
" ?.....__..................................:`...../\n"
|
||||
" /__.(...\"~-,_...........................,:`....../\n"
|
||||
" /(_....\"~,_....\"~,_.....................,:`...._/ \n"
|
||||
" {.._$;_....\"=,_.....\"-,_......,.-~-,},.~\";/....} \n"
|
||||
" ((...*~_......\"=-._...\";,,./`........../\"..../ \n"
|
||||
" ,,,___.`~,......\"~.,....................`......}....../ \n"
|
||||
"............(....`=-,,...`.........................(...;_,,-\" \n"
|
||||
"............/.`~,......`-.................................../ \n"
|
||||
".............`~.*-,.....................................|,./...,__ \n"
|
||||
",,_..........}.>-._...................................|.......`=~-, \n"
|
||||
".....`=~-,__......`,................................. \n"
|
||||
"...................`=~-,,.,........................... \n"
|
||||
".........................`:,,..........................`\n"
|
||||
"...........................`=-,...............,%%`>--==`` \n"
|
||||
".................................._.........._,-%%...` \n"
|
||||
"...................................,\n");
|
||||
/* clang-format on */
|
||||
}
|
||||
|
||||
static void ShowHelp(const hecl::SystemString& toolName) {
|
||||
static void ShowHelp(const std::string& toolName) {
|
||||
/* Select tool's help-text streamer */
|
||||
HelpOutput::HelpFunc helpFunc = nullptr;
|
||||
if (toolName == _SYS_STR("init"))
|
||||
if (toolName == "init")
|
||||
helpFunc = ToolInit::Help;
|
||||
else if (toolName == _SYS_STR("spec"))
|
||||
else if (toolName == "spec")
|
||||
helpFunc = ToolSpec::Help;
|
||||
else if (toolName == _SYS_STR("extract"))
|
||||
else if (toolName == "extract")
|
||||
helpFunc = ToolExtract::Help;
|
||||
else if (toolName == _SYS_STR("cook"))
|
||||
else if (toolName == "cook")
|
||||
helpFunc = ToolCook::Help;
|
||||
else if (toolName == _SYS_STR("package") || toolName == _SYS_STR("pack"))
|
||||
else if (toolName == "package" || toolName == "pack")
|
||||
helpFunc = ToolPackage::Help;
|
||||
else if (toolName == _SYS_STR("help"))
|
||||
else if (toolName == "help")
|
||||
helpFunc = ToolHelp::Help;
|
||||
else {
|
||||
LogModule.report(logvisor::Error, FMT_STRING(_SYS_STR("unrecognized tool '{}' - can't help")), toolName);
|
||||
LogModule.report(logvisor::Error, FMT_STRING("unrecognized tool '{}' - can't help"), toolName);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
ho.go();
|
||||
}
|
||||
|
||||
hecl::SystemStringView toolName() const override { return _SYS_STR("help"sv); }
|
||||
std::string_view toolName() const override { return "help"sv; }
|
||||
|
||||
int run() override {
|
||||
ShowHelp(m_info.args.front());
|
||||
|
||||
Reference in New Issue
Block a user