Remove dependency on liboauth

liboauth is no longer needed.
Removed references to oauth token and secret from code.
I forgot to remove these in 42c71884a2
This commit is contained in:
Sude 2019-11-14 18:57:37 +02:00
parent 42c71884a2
commit 8829f44e37
5 changed files with 1 additions and 49 deletions

View File

@ -40,7 +40,6 @@ if(CURL_FOUND)
endif(READELF_RESULT_VAR EQUAL 0)
endif(CURL_FOUND)
find_package(OAuth REQUIRED)
find_package(Jsoncpp REQUIRED)
find_package(Htmlcxx REQUIRED)
find_package(Tinyxml2 REQUIRED)

View File

@ -5,7 +5,6 @@ This repository contains the code of unofficial [GOG](http://www.gog.com/) downl
## Dependencies
* [libcurl](https://curl.haxx.se/libcurl/) >= 7.32.0
* [liboauth](https://sourceforge.net/projects/liboauth/)
* [librhash](https://github.com/rhash/RHash)
* [jsoncpp](https://github.com/open-source-parsers/jsoncpp)
* [htmlcxx](http://htmlcxx.sourceforge.net/)
@ -24,7 +23,7 @@ This repository contains the code of unofficial [GOG](http://www.gog.com/) downl
### Debian/Ubuntu
# apt install build-essential libcurl4-openssl-dev libboost-regex-dev \
libjsoncpp-dev liboauth-dev librhash-dev libtinyxml2-dev libhtmlcxx-dev \
libjsoncpp-dev librhash-dev libtinyxml2-dev libhtmlcxx-dev \
libboost-system-dev libboost-filesystem-dev libboost-program-options-dev \
libboost-date-time-dev libboost-iostreams-dev help2man cmake libssl-dev \
pkg-config zlib1g-dev qtwebengine5-dev

View File

@ -1,28 +0,0 @@
# - Try to find oauth
#
# Once done this will define
# OAuth_FOUND - System has oauth
# OAuth_INCLUDE_DIRS - The oauth include directories
# OAuth_LIBRARIES - The libraries needed to use oauth
find_package(PkgConfig)
pkg_check_modules(PC_OAUTH REQUIRED oauth)
find_path(OAUTH_INCLUDE_DIR oauth.h
HINTS ${PC_OAUTH_INCLUDEDIR}
${PC_OAUTH_INCLUDE_DIRS}
PATH_SUFFIXES oauth
)
find_library(OAUTH_LIBRARY NAMES oauth
HINTS ${PC_OAUTH_LIBDIR}
${PC_OAUTH_LIBRARY_DIRS}
)
mark_as_advanced(OAUTH_INCLUDE_DIR OAUTH_LIBRARY)
if(PC_OAUTH_FOUND)
set(OAuth_FOUND ON)
set(OAuth_INCLUDE_DIRS ${OAUTH_INCLUDE_DIR})
set(OAuth_LIBRARIES ${OAUTH_LIBRARY})
endif(PC_OAUTH_FOUND)

View File

@ -198,12 +198,6 @@ struct CurlConfig
long int iLowSpeedTimeoutRate;
};
struct GogAPIConfig
{
std::string sToken;
std::string sSecret;
};
class Config
{
public:
@ -280,8 +274,6 @@ class Config
std::string sEmail;
std::string sPassword;
GogAPIConfig apiConf;
// Lists
Blacklist blacklist;
Blacklist ignorelist;

View File

@ -248,11 +248,6 @@ int main(int argc, char *argv[])
("lowspeed-rate", bpo::value<long int>(&Globals::globalConfig.curlConf.iLowSpeedTimeoutRate)->default_value(200), "Set average transfer speed in bytes per second that the transfer should be below during time specified with --lowspeed-timeout for it to be considered too slow and aborted")
("include-hidden-products", bpo::value<bool>(&Globals::globalConfig.bIncludeHiddenProducts)->zero_tokens()->default_value(false), "Include games that have been set hidden in account page")
;
// Options read from config file
options_cfg_only.add_options()
("token", bpo::value<std::string>(&Globals::globalConfig.apiConf.sToken)->default_value(""), "oauth token")
("secret", bpo::value<std::string>(&Globals::globalConfig.apiConf.sSecret)->default_value(""), "oauth secret")
;
options_cli_no_cfg_hidden.add_options()
("login-email", bpo::value<std::string>(&Globals::globalConfig.sEmail)->default_value(""), "login email")
@ -702,11 +697,6 @@ int main(int argc, char *argv[])
std::ofstream ofs(Globals::globalConfig.sConfigFilePath.c_str());
if (ofs)
{
if (!Globals::globalConfig.apiConf.sToken.empty() && !Globals::globalConfig.apiConf.sSecret.empty())
{
ofs << "token = " << Globals::globalConfig.apiConf.sToken << std::endl;
ofs << "secret = " << Globals::globalConfig.apiConf.sSecret << std::endl;
}
ofs.close();
if (!Globals::globalConfig.bRespectUmask)
Util::setFilePermissions(Globals::globalConfig.sConfigFilePath, boost::filesystem::owner_read | boost::filesystem::owner_write);