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