2007-09-04 02:59:46 +04:00
|
|
|
/*
|
|
|
|
-----BEGIN QCMOD-----
|
2012-02-20 22:49:31 +04:00
|
|
|
name: Qt >= 4.6
|
2011-01-01 20:03:23 +03:00
|
|
|
arg: enable-debug, Enable debug mode
|
2011-01-01 20:14:52 +03:00
|
|
|
arg: disable-gui, Disable qBittorrent Graphical user interface for headless running
|
2007-09-04 02:59:46 +04:00
|
|
|
-----END QCMOD-----
|
|
|
|
*/
|
|
|
|
class qc_qt4 : public ConfObj
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
qc_qt4(Conf *c) : ConfObj(c) {}
|
2012-02-20 22:49:31 +04:00
|
|
|
QString name() const { return "Qt >= 4.6"; }
|
|
|
|
QString shortname() const { return "Qt 4.6"; }
|
2007-09-04 02:59:46 +04:00
|
|
|
bool exec()
|
|
|
|
{
|
2011-01-01 20:03:23 +03:00
|
|
|
// NOX mode
|
2009-12-15 13:36:18 +03:00
|
|
|
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
2010-11-20 20:21:40 +03:00
|
|
|
conf->addExtra("CONFIG += nox");
|
2011-01-01 20:03:23 +03:00
|
|
|
}
|
|
|
|
// Debug mode
|
|
|
|
if(!conf->getenv("QC_ENABLE_DEBUG").isEmpty()) {
|
2011-04-16 12:22:34 +04:00
|
|
|
conf->addExtra("CONFIG -= release");
|
2011-01-01 20:03:23 +03:00
|
|
|
conf->addExtra("CONFIG += debug");
|
2011-04-16 12:18:58 +04:00
|
|
|
} else {
|
|
|
|
conf->addExtra("CONFIG -= debug");
|
|
|
|
conf->addExtra("CONFIG += release");
|
2011-01-01 20:03:23 +03:00
|
|
|
}
|
2011-01-15 12:30:41 +03:00
|
|
|
#ifdef Q_OS_FREEBSD
|
|
|
|
conf->addLib("-lexecinfo");
|
|
|
|
conf->addExtra("MANPREFIX = $$PREFIX");
|
|
|
|
#else
|
|
|
|
conf->addExtra("MANPREFIX = $$PREFIX/share");
|
|
|
|
#endif
|
2012-02-20 22:49:31 +04:00
|
|
|
return(QT_VERSION >= 0x040600);
|
2007-09-04 02:59:46 +04:00
|
|
|
}
|
|
|
|
};
|