Merged muonspin/musrfit:root6 into master

This commit is contained in:
Zaher Salman 2020-07-14 19:43:52 +02:00
commit 6a8ec77037

View File

@ -773,6 +773,34 @@ PAdmin::PAdmin() : QObject()
fPrefPathName = pathFln; fPrefPathName = pathFln;
loadPrefs(fPrefPathName); loadPrefs(fPrefPathName);
// make sure that musrfit, musrview, etc are found under the fExecPath provided
QString str = fExecPath + "/musrfit";
QFileInfo info(str);
if (info.exists()) {
if (!info.isExecutable())
QMessageBox::critical(0, "ERROR", "musrfit found but not recognized as executable.\nPlease check!");
} else {
QMessageBox::critical(0, "ERROR", "musrfit not found.\nHave you set the necessary system variables properly?\nPlease check the manual.\nBefore you can use musrfit, this needs to be fixed.");
}
// check if system variables are set properly
bool sysVarMissing = false;
QString msg("Missing System Variables:\n");
path = procEnv.value("ROOTSYS", "");
if (path.isEmpty()) {
msg += "> ROOTSYS\n";
sysVarMissing = true;
}
path = procEnv.value("MUSRFITPATH", "");
if (path.isEmpty()) {
msg += "> MUSRFITPATH\n";
sysVarMissing = true;
}
if (sysVarMissing) {
msg += "Please set this/these system variables.";
QMessageBox::warning(0, "WARNING", msg);
}
} }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------