Skip to content

Commit 2a29483

Browse files
committedAug 17, 2013
check for bundled GRASS for gisbase on OS X
1 parent 414338f commit 2a29483

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎src/providers/grass/qgsgrass.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,14 @@ void GRASS_LIB_EXPORT QgsGrass::init( void )
142142
// Use the applicationDirPath()/grass
143143
gisBase = shortPath( QCoreApplication::applicationDirPath() + "/grass" );
144144
QgsDebugMsg( QString( "GRASS gisBase = %1" ).arg( gisBase ) );
145+
#elif defined(Q_OS_MACX)
146+
// check for bundled GRASS, fall back to configured path
147+
gisBase = QCoreApplication::applicationDirPath().append("/grass") ;
148+
if ( !isValidGrassBaseDir( gisBase ) )
149+
{
150+
gisBase = GRASS_BASE;
151+
}
152+
QgsDebugMsg( QString( "GRASS gisBase = %1" ).arg( gisBase ) );
145153
#else
146154
// Use the location specified --with-grass during configure
147155
gisBase = GRASS_BASE;

0 commit comments

Comments
 (0)
Please sign in to comment.