[QGIS Commit] r14303 - trunk/qgis/src/mapserver

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Sep 28 16:00:58 EDT 2010


Author: mhugent
Date: 2010-09-28 20:00:58 +0000 (Tue, 28 Sep 2010)
New Revision: 14303

Modified:
   trunk/qgis/src/mapserver/qgis_map_serv.cpp
Log:
Possibility to set prefix path for mapserver by environment variable

Modified: trunk/qgis/src/mapserver/qgis_map_serv.cpp
===================================================================
--- trunk/qgis/src/mapserver/qgis_map_serv.cpp	2010-09-27 21:10:33 UTC (rev 14302)
+++ trunk/qgis/src/mapserver/qgis_map_serv.cpp	2010-09-28 20:00:58 UTC (rev 14303)
@@ -125,9 +125,20 @@
 
   QgsApplication qgsapp( argc, argv, false );
 
-  // init QGIS's paths - true means that all path will be inited from prefix
-  QgsApplication::setPrefixPath( CMAKE_INSTALL_PREFIX, TRUE );
+  //Default prefix path may be altered by environment variable
+  char* prefixPath = getenv( "QGIS_PREFIX_PATH" );
+  if ( prefixPath )
+  {
+    QgsApplication::setPrefixPath( prefixPath, TRUE );
+  }
+  else
+  {
+    // init QGIS's paths - true means that all path will be inited from prefix
+    QgsApplication::setPrefixPath( CMAKE_INSTALL_PREFIX, TRUE );
+  }
 
+
+
   // Instantiate the plugin directory so that providers are loaded
   QgsProviderRegistry::instance( QgsApplication::pluginPath() );
 #ifdef QGSMSDEBUG



More information about the QGIS-commit mailing list