mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2024-11-20 11:49:17 +01:00
Add OS and arch to default user agent
This commit is contained in:
parent
3b733fcb4b
commit
9dc5d4124c
@ -90,8 +90,9 @@ endif(GIT_CHECKOUT)
|
||||
|
||||
set(VERSION_NUMBER ${PROJECT_VERSION})
|
||||
set(VERSION_STRING "LGOGDownloader ${VERSION_NUMBER}")
|
||||
set(DEFAULT_USER_AGENT "LGOGDownloader/${VERSION_NUMBER} (${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR})")
|
||||
|
||||
add_definitions(-D_FILE_OFFSET_BITS=64 -DVERSION_NUMBER="${VERSION_NUMBER}" -DVERSION_STRING="${VERSION_STRING}")
|
||||
add_definitions(-D_FILE_OFFSET_BITS=64 -DVERSION_NUMBER="${VERSION_NUMBER}" -DVERSION_STRING="${VERSION_STRING}" -DDEFAULT_USER_AGENT="${DEFAULT_USER_AGENT}")
|
||||
|
||||
add_executable (${PROJECT_NAME} ${SRC_FILES})
|
||||
|
||||
|
3
main.cpp
3
main.cpp
@ -47,6 +47,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Globals::globalConfig.sVersionString = VERSION_STRING;
|
||||
Globals::globalConfig.sVersionNumber = VERSION_NUMBER;
|
||||
Globals::globalConfig.curlConf.sUserAgent = DEFAULT_USER_AGENT;
|
||||
|
||||
Globals::globalConfig.sCacheDirectory = Util::getCacheHome() + "/lgogdownloader";
|
||||
Globals::globalConfig.sXMLDirectory = Globals::globalConfig.sCacheDirectory + "/xml";
|
||||
@ -176,7 +177,7 @@ int main(int argc, char *argv[])
|
||||
("login-website", bpo::value<bool>(&Globals::globalConfig.bLoginHTTP)->zero_tokens()->default_value(false), "Login (website only)")
|
||||
("cacert", bpo::value<std::string>(&Globals::globalConfig.curlConf.sCACertPath)->default_value(""), "Path to CA certificate bundle in PEM format")
|
||||
("respect-umask", bpo::value<bool>(&Globals::globalConfig.bRespectUmask)->zero_tokens()->default_value(false), "Do not adjust permissions of sensitive files")
|
||||
("user-agent", bpo::value<std::string>(&Globals::globalConfig.curlConf.sUserAgent)->default_value(Globals::globalConfig.sVersionString), "Set user agent")
|
||||
("user-agent", bpo::value<std::string>(&Globals::globalConfig.curlConf.sUserAgent)->default_value(DEFAULT_USER_AGENT), "Set user agent")
|
||||
;
|
||||
// Commandline options (config file)
|
||||
options_cli_cfg.add_options()
|
||||
|
Loading…
Reference in New Issue
Block a user