File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -645,13 +645,18 @@ QString QgsApplication::resolvePkgPath()
645645 {
646646 qWarning ( " Application path not initialized" );
647647 }
648+ }
649+
650+ if ( !appPath.isNull () || getenv ( " QGIS_PREFIX_PATH" ) )
651+ {
652+ QString prefix = getenv ( " QGIS_PREFIX_PATH" ) ? getenv ( " QGIS_PREFIX_PATH" ) : appPath;
648653
649654 // check if QGIS is run from build directory (not the install directory)
650655 QFile f;
651656 // "/../../.." is for Mac bundled app in build directory
652657 Q_FOREACH ( const QString &path, QStringList () << " " << " /.." << " /bin" << " /../../.." )
653658 {
654- f.setFileName ( appPath + path + " /qgisbuildpath.txt" );
659+ f.setFileName ( prefix + path + " /qgisbuildpath.txt" );
655660 if ( f.exists () )
656661 break ;
657662 }
You can’t perform that action at this time.
0 commit comments