OSX: Guess actual executable from the app bundle directory
FossilOrigin-Name: 7988e53166771ea71d916a1ab714eb671d07dea8
This commit is contained in:
@@ -54,6 +54,18 @@ QString SelectExe(QWidget *parent, const QString &description)
|
||||
if(!QFile::exists(path))
|
||||
return QString();
|
||||
|
||||
#ifdef Q_OS_MACX
|
||||
// Guess actual executable from bundle dir
|
||||
QFileInfo fi(path);
|
||||
if(fi.isDir() && path.indexOf(".app")!=-1)
|
||||
{
|
||||
path += "/Contents/MacOS/" + fi.baseName();
|
||||
|
||||
if(!QFile::exists(path))
|
||||
return QString();
|
||||
}
|
||||
#endif
|
||||
|
||||
return path;
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user