initial commit
This commit is contained in:
commit
9d20827c46
2469 changed files with 470994 additions and 0 deletions
31
qcm/conf.qcm
Normal file
31
qcm/conf.qcm
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Psi Configuration
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// qc_conf
|
||||
//----------------------------------------------------------------------------
|
||||
class qc_conf : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_conf(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "Psi Configuration"; }
|
||||
QString shortname() const { return "conf"; }
|
||||
QString checkString() const { return QString(); }
|
||||
bool exec()
|
||||
{
|
||||
conf->addExtra(QString("PSI_DATADIR=%1/yachat").arg(conf->getenv("DATADIR")));
|
||||
|
||||
QFile file("src/config.h");
|
||||
if ( file.open(QIODevice::WriteOnly | QIODevice::Text) ) {
|
||||
QTextStream stream( &file );
|
||||
stream << "#define PSI_DATADIR \"" << conf->getenv("DATADIR") << "/yachat\"" << endl;
|
||||
}
|
||||
|
||||
conf->addDefine("HAVE_CONFIG");
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
Reference in a new issue