Skip to content

Commit

Permalink
macos support
Browse files Browse the repository at this point in the history
  • Loading branch information
mhogomchungu committed May 18, 2024
1 parent 385b64e commit 2527314
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/engines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,21 @@ static QProcessEnvironment _getEnvPaths( const engines::enginePaths& paths,setti
s += separator + mm + "/" + it ;
s += separator + mm + "/" + it + "/bin" ;
}

}else if( utility::platformIsOSX() ){

auto m = QCoreApplication::applicationDirPath() ;

const auto e = m ;

auto filters = QDir::Filter::Dirs | QDir::Filter::NoDotAndDotDot ;

for( const auto& it : QDir( e ).entryList( filters ) ){

m += separator + e + "/" + it ;
}

s = m + separator + s ;
}

for( const auto& it : m ){
Expand All @@ -92,11 +107,6 @@ static QProcessEnvironment _getEnvPaths( const engines::enginePaths& paths,setti

auto p = env.value( "PATH" ) ;

if( utility::platformIsOSX() ){

s = QCoreApplication::applicationDirPath() + separator + s ;
}

if( s.endsWith( separator ) ){

env.insert( "PATH",s + p ) ;
Expand Down

0 comments on commit 2527314

Please sign in to comment.