Fix to make mapserver export work under OS X

git-svn-id: http://svn.osgeo.org/qgis/trunk@6252 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
gsherman 2006-12-15 03:21:59 +00:00
parent 1907fd64ac
commit 028db9b88d

View File

@ -111,9 +111,12 @@ void QgsMapserverExport::on_buttonOk_clicked()
//TODO Need to append the path to the qgis python files using the path to the
// Python files in the QGIS install directory
PyRun_SimpleString("import sys");
#if defined(Q_WS_MACX) || defined(Q_WS_WIN32)
QString prefixPath = QApplication::applicationDirPath();
QString dataPath = prefixPath + QString("/share/qgis");
// Setup up path to the python script directory based on platform
#ifdef Q_WS_MACX
QString dataPath = prefixPath + "/../../../../share/qgis";
#elif WIN32
QString dataPath = prefixPath + "/share/qgis";
#else
QString dataPath ( PKGDATAPATH );
#endif