common: adjust formatting of usage line

-remove version hash as it's printed above
-rename `usage` variable to `programDescription`
This commit is contained in:
Eric Wasylishen 2022-05-15 17:44:17 -06:00
parent b54edf704e
commit 8fe5d9d694
5 changed files with 7 additions and 5 deletions

View File

@ -67,7 +67,7 @@ void setting_container::copyFrom(const setting_container& other)
void setting_container::printHelp()
{
fmt::print("{} ({})usage: {} [-help/-h/-?] [-options] {}\n\n", usage, stringify(ERICWTOOLS_VERSION), programName, remainderName);
fmt::print("{}usage: {} [-help/-h/-?] [-options] {}\n\n", programDescription, programName, remainderName);
for (auto grouped : grouped()) {
if (grouped.first) {

View File

@ -723,7 +723,9 @@ class setting_container
std::map<const setting_group *, std::set<setting_base *>, less> _groupedSettings;
public:
std::string programName, remainderName = "filename", usage;
std::string programName;
std::string remainderName = "filename";
std::string programDescription;
inline setting_container() {}

View File

@ -500,7 +500,7 @@ public:
void setParameters(int argc, const char **argv) override
{
common_settings::setParameters(argc, argv);
usage = "light compiles lightmap data for BSPs\n\n";
programDescription = "light compiles lightmap data for BSPs\n\n";
remainderName = "mapname.bsp";
}

View File

@ -228,7 +228,7 @@ public:
void setParameters(int argc, const char **argv) override
{
common_settings::setParameters(argc, argv);
usage = "qbsp performs geometric level processing of Quake .MAP files to create\nQuake .BSP files.\n\n";
programDescription = "qbsp performs geometric level processing of Quake .MAP files to create\nQuake .BSP files.\n\n";
remainderName = "sourcefile.map [destfile.bsp]";
}
void initialize(int argc, const char **argv) override;

View File

@ -235,7 +235,7 @@ public:
void setParameters(int argc, const char **argv) override
{
common_settings::setParameters(argc, argv);
usage = "vis calculates the visibility (and hearability) sets for \n.BSP files.\n\n";
programDescription = "vis calculates the visibility (and hearability) sets for \n.BSP files.\n\n";
remainderName = "mapname.bsp";
}
void initialize(int argc, const char **argv) override;