Some work about adaptive color scheme for Web UI (PR #19901)
http://[316:c51a:62a3:8b9::4]/d4708/qBittorrent/src/branch/adaptive-webui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.6 KiB
70 lines
1.6 KiB
17 years ago
|
/*
|
||
|
-----BEGIN QCMOD-----
|
||
|
name: libzzip
|
||
|
arg: with-libzzip-inc=[path], Path to libzzip++ include files
|
||
|
arg: with-libzzip-lib=[path], Path to libzzip++ library files
|
||
|
-----END QCMOD-----
|
||
|
*/
|
||
|
#include <QProcess>
|
||
|
class qc_libzzip : public ConfObj
|
||
|
{
|
||
|
public:
|
||
|
qc_libzzip(Conf *c) : ConfObj(c) {}
|
||
|
QString name() const { return "Zzip library (libzzip)"; }
|
||
|
QString shortname() const { return "libzzip"; }
|
||
|
QString checkString() const {
|
||
|
if(!conf->getenv("QC_DISABLE_LIBZZIP").isEmpty())
|
||
|
return "";
|
||
|
return ConfObj::checkString();
|
||
|
}
|
||
|
bool exec(){
|
||
|
if(!conf->getenv("QC_DISABLE_LIBZZIP").isEmpty())
|
||
|
return false;
|
||
|
QString s;
|
||
|
s = conf->getenv("QC_WITH_LIBZZIP_INC");
|
||
|
if(!s.isEmpty()) {
|
||
|
if(!conf->checkHeader(s, "zzip/zzip.h")) {
|
||
|
return false;
|
||
|
}
|
||
|
}else{
|
||
|
QStringList sl;
|
||
|
sl << "/usr/include";
|
||
|
sl << "/usr/local/include";
|
||
|
bool found = false;
|
||
|
foreach(s, sl){
|
||
|
if(conf->checkHeader(s, "zzip/zzip.h")){
|
||
|
found = true;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
if(!found)
|
||
|
return false;
|
||
|
}
|
||
|
conf->addIncludePath(s);
|
||
|
|
||
|
s = conf->getenv("QC_WITH_LIBZZIP_LIB");
|
||
|
if(!s.isEmpty()) {
|
||
|
if(!QFile::exists(s+QString("libzzip.so"))){
|
||
|
return false;
|
||
|
}
|
||
|
}else{
|
||
|
QStringList sl;
|
||
|
sl << "/usr/lib/";
|
||
|
sl << "/usr/local/lib/";
|
||
|
bool found = false;
|
||
|
foreach(s, sl){
|
||
|
if(QFile::exists(s+QString("libzzip.so"))){
|
||
|
found = true;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
if(!found)
|
||
|
return false;
|
||
|
}
|
||
|
conf->addLib(QString("-L") + s);
|
||
|
conf->addLib("-lzzip");
|
||
|
conf->addDefine("HAVE_ZZIP");
|
||
|
return true;
|
||
|
}
|
||
|
};
|