mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-23 17:56:50 +03:00
968a5f3017
- GeoIP database is no longer embedded in qBittorrent executable unless --with-geoip-database-embedded parameter is passed to configure (see src/geoip/REAME) - Dropped "CONFIG += x11 network" in project file since it does not seem to be required - Updated configure file to reflect Geoip changes
29 lines
978 B
Text
29 lines
978 B
Text
/*
|
|
-----BEGIN QCMOD-----
|
|
name: geoip-database
|
|
arg: with-geoip-database-embedded, Geoip Database will be embedded in qBittorrent executable (please follow instructions in src/geoip/README)
|
|
-----END QCMOD-----
|
|
*/
|
|
// see Conf::findPkgConfig
|
|
class qc_geoip_database : public ConfObj
|
|
{
|
|
public:
|
|
qc_geoip_database(Conf *c) : ConfObj(c) {}
|
|
QString name() const { return "GeoIP Database (optional)"; }
|
|
QString shortname() const { return "GeoIP Database"; }
|
|
bool exec() {
|
|
#ifdef Q_WS_X11
|
|
if(!conf->getenv("QC_WITH_GEOIP_DATABASE_EMBEDDED").isEmpty()) {
|
|
#endif
|
|
conf->addDefine("WITH_GEOIP_EMBEDDED");
|
|
printf(" embedded and");
|
|
return true;
|
|
#ifdef Q_WS_X11
|
|
}
|
|
if(QFile::exists("/usr/share/GeoIP/GeoIP.dat") || QFile::exists("/usr/local/share/GeoIP/GeoIP.dat"))
|
|
return true;
|
|
printf("\nWarning: GeoIP database was not found at /usr/share/GeoIP/GeoIP.dat\nCountry resolution will be slow.");
|
|
return false;
|
|
#endif
|
|
}
|
|
};
|