mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2024-11-20 11:49:17 +01:00
Added --version
This commit is contained in:
parent
3b4def2ebe
commit
d2421ba4f8
7
main.cpp
7
main.cpp
@ -114,6 +114,7 @@ int main(int argc, char *argv[])
|
|||||||
// Commandline options (no config file)
|
// Commandline options (no config file)
|
||||||
options_cli_no_cfg.add_options()
|
options_cli_no_cfg.add_options()
|
||||||
("help,h", "Print help message")
|
("help,h", "Print help message")
|
||||||
|
("version", "Print version information")
|
||||||
("login", bpo::value<bool>(&config.bLogin)->zero_tokens()->default_value(false), "Login")
|
("login", bpo::value<bool>(&config.bLogin)->zero_tokens()->default_value(false), "Login")
|
||||||
("list", bpo::value<bool>(&config.bList)->zero_tokens()->default_value(false), "List games")
|
("list", bpo::value<bool>(&config.bList)->zero_tokens()->default_value(false), "List games")
|
||||||
("list-details", bpo::value<bool>(&config.bListDetails)->zero_tokens()->default_value(false), "List games with detailed info")
|
("list-details", bpo::value<bool>(&config.bListDetails)->zero_tokens()->default_value(false), "List games with detailed info")
|
||||||
@ -183,6 +184,12 @@ int main(int argc, char *argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vm.count("version"))
|
||||||
|
{
|
||||||
|
std::cout << VERSION_STRING << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (vm.count("chunk-size"))
|
if (vm.count("chunk-size"))
|
||||||
config.iChunkSize <<= 20; // Convert chunk size from bytes to megabytes
|
config.iChunkSize <<= 20; // Convert chunk size from bytes to megabytes
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user