slightly improved handling of the musredit_startup.xml on MacOS X platforms

This commit is contained in:
nemu 2011-06-25 19:49:26 +00:00
parent b55f18289e
commit 79a856483b
2 changed files with 12 additions and 3 deletions

View File

@ -556,7 +556,15 @@ PAdmin::PAdmin()
fMsr2DataParam.global = false;
// XML Parser part
QString fln = "./musredit_startup.xml";
QString fln = "musredit_startup.xml";
// check if it is a MacOSX
#ifdef Q_WS_MAC
fln = "./musredit_startup.xml";
if (!QFile::exists(fln)) {
fln = "/Applications/musredit.app/Contents/Resources/musredit_startup.xml";
}
#else
fln = "./musredit_startup.xml";
if (!QFile::exists(fln)) {
QString path = std::getenv("MUSRFITPATH");
QString rootsys = std::getenv("ROOTSYS");
@ -564,6 +572,7 @@ PAdmin::PAdmin()
path = rootsys + "/bin";
fln = path + "/musredit_startup.xml";
}
#endif
if (QFile::exists(fln)) { // administration file present
PAdminXMLParser handler(this);
QFile xmlFile(fln);

View File

@ -46,14 +46,14 @@ QMAKE_CXX = g++
# install path for the XML configuration file
unix:xml.path = $${MUSREDIT_INSTALL_PATH}
macx:xml.path = $${MUSREDIT_INSTALL_PATH}
macx:xml.path = /Applications/musredit.app/Contents/Resources
win32:xml.path = c:/musrfit/bin
xml.files = musredit_startup.xml
INSTALLS += xml
CONFIG += qt \
warn_on \
debug
release
QT += xml
QT += webkit