Commit 220b507d authored by Edlira Nano's avatar Edlira Nano
Browse files

changed win32 schema localization to masschroq executable dir

git-svn-id: https://subversion.renater.fr/masschroq/trunk@2080 e4b6dbb4-9209-464b-83f7-6257456c460c
parent 92f47987
...@@ -61,6 +61,11 @@ MassChroq::getBeginDateTime() { ...@@ -61,6 +61,11 @@ MassChroq::getBeginDateTime() {
return begin_date_time; return begin_date_time;
} }
void
MassChroq::setMasschroqDir(const QString & masschroq_dir_path) {
_masschroq_dir_path = masschroq_dir_path;
}
MassChroq::MassChroq() { MassChroq::MassChroq() {
qDebug() << "MassChroq::MassChroq begin"; qDebug() << "MassChroq::MassChroq begin";
...@@ -145,7 +150,7 @@ MassChroq::validateXmlFile() { ...@@ -145,7 +150,7 @@ MassChroq::validateXmlFile() {
QFile schema_file(MASSCHROQ_XSD); QFile schema_file(MASSCHROQ_XSD);
if ( !QFile::exists(MASSCHROQ_XSD) ) { if ( !QFile::exists(MASSCHROQ_XSD) ) {
QString schema_current = (QDir::current()).absolutePath(); QString schema_current = _masschroq_dir_path;
schema_current.append("/masschroq.xsd"); schema_current.append("/masschroq.xsd");
if (QFile::exists(schema_current)) { if (QFile::exists(schema_current)) {
schema_file.setFileName(schema_current); schema_file.setFileName(schema_current);
......
...@@ -135,9 +135,10 @@ public: ...@@ -135,9 +135,10 @@ public:
QuantificationMethod * findQuantificationMethod(const QString & method_id) const; QuantificationMethod * findQuantificationMethod(const QString & method_id) const;
void debriefing(); void debriefing();
void setMasschroqDir(const QString & masschroq_dir_path);
protected: protected:
QFileInfo _param_file_info; QFileInfo _param_file_info;
...@@ -161,6 +162,8 @@ public: ...@@ -161,6 +162,8 @@ public:
std::map<QString, const Protein *> _p_proteins; std::map<QString, const Protein *> _p_proteins;
QString _masschroq_dir_path;
}; };
#endif /* QUANTI_MS_CPP_H_ */ #endif /* QUANTI_MS_CPP_H_ */
...@@ -41,6 +41,8 @@ int main(int argc, char **argv) { ...@@ -41,6 +41,8 @@ int main(int argc, char **argv) {
QLocale::setDefault(QLocale::system()); QLocale::setDefault(QLocale::system());
const QDateTime dt_begin = QDateTime::currentDateTime(); const QDateTime dt_begin = QDateTime::currentDateTime();
const QString masschroq_dir_path(QCoreApplication::applicationDirPath());
QStringList arguments = app.arguments(); QStringList arguments = app.arguments();
QString fileName; QString fileName;
/// by default, temporary files go in the temporary directory of the system /// by default, temporary files go in the temporary directory of the system
...@@ -116,6 +118,7 @@ int main(int argc, char **argv) { ...@@ -116,6 +118,7 @@ int main(int argc, char **argv) {
try { try {
mass_chroq_engine.setMasschroqDir(masschroq_dir_path);
//mass_chroq_engine.setReporter(mass_chroq_logs); //mass_chroq_engine.setReporter(mass_chroq_logs);
mass_chroq_engine.setXmlFilename(fileName); mass_chroq_engine.setXmlFilename(fileName);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment